Robobot 2b: Difference between revisions
No edit summary |
|||
| (27 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
Back to [[Robobot_B|Robobot]] | Back to [[Robobot_B|Robobot]] | ||
== Overview == | |||
[[File:robobot-function-blocks.png | 500px]] | |||
The blocks marked with a blue dot are available in the repository as source code, and some may need an update. | |||
== Update software == | == Update software == | ||
| Line 14: | Line 19: | ||
sudo apt dist-upgrade | sudo apt dist-upgrade | ||
The ''sudo'' is required to get administrator (super-user) privileges. | The ''sudo'' is required to get administrator (super-user) privileges. The password is the users password. | ||
=== Update the Robot software === | === Update the Robot software === | ||
| Line 23: | Line 28: | ||
svn update | svn update | ||
If | If ''*.cpp'', ''*.h'', ''CMakeLists.txt'', or ''*.bash'' were updated, then an update is needed; see the next sections. | ||
=== Start-up scripts === | |||
If the Start-up script ''on_reboot.bash'' has changed, copy it to the home directory. | |||
cp ~/svn/robobot/setup/on_reboot.bash ~/ | |||
Any changes will not be implemented until after a reboot of the Raspberry Pi. | |||
sudo reboot now | |||
=== Recompile base software === | === Recompile base software === | ||
| Line 39: | Line 54: | ||
This should be recompiled if there are any changes. | This should be recompiled if there are any changes. | ||
==== Shutdown process ==== | |||
The shutdown is activated over MQTT using this small process. | |||
cd ~/svn/robobot/off_by_mqtt | |||
mkdir -p build | |||
cd build | |||
cmake .. | |||
make -j3 | |||
If anything is compiled, then the new code will be active after a reboot. | |||
==== Teensy - MQTT interface ==== | ==== Teensy - MQTT interface ==== | ||
The ''teensy_interface'' makes the robot interface | The ''teensy_interface'' makes the robot interface with the MQTT protocol and thus makes it available over the net. | ||
In the directory ''/home/local/svn/robobot/ | In the directory ''/home/local/svn/robobot/teensy_interface/build'': | ||
cd /home/local/svn/robobot/ | cd /home/local/svn/robobot/teensy_interface/build | ||
make -j3 | make -j3 | ||
This should be recompiled if there are any changes. | This should be recompiled if there are any changes. | ||
Changes will be implemented after a reboot or the interface is restarted: | |||
==== The Teensy | pkill teensy_int | ||
./teensy_interface -l | |||
==== The Teensy firmware ==== | |||
The Robobot version of the Teensy firmware handles all (most) of the sensor and actuator interfaces. | The Robobot version of the Teensy firmware handles all (most) of the sensor and actuator interfaces. | ||
| Line 58: | Line 89: | ||
cd /home/local/svn/robobot/teensy_firmware_8 | cd /home/local/svn/robobot/teensy_firmware_8 | ||
./compile | ./compile | ||
''(takes 5- | ''(takes 5-50 seconds)'' | ||
./upload | ./upload | ||
''Waiting for Teensy device...'' | ''Waiting for Teensy device...'' | ||
''(hint: press the reset button)'' | ''(hint: press the reset button)'' | ||
'''Do not press the reset button''' (the small button on the Teensy board) without pressing and holding the ''power'' button during the upload. | '''Do not press the reset button''' (the small button on the Teensy board) without pressing and holding the ''power'' button on the main board during the upload. See [[Robobot_circuits|here]] for details on mainboard buttons. | ||
[[file:PCB-with-power-upload-button.png | 700px]] | |||
The ''power'' button ensures the power to the Raspberry during the upload. | |||
If the power fails during upload, press and hold the ''power'' button while the Raspberry boots, and you log on and repeat the upload. | |||
If the teensy_firmware_8 fails to compile, it may help to make a clean recompile. | |||
Clean the already compiled parts by removing the ''build'' directory: | |||
cd ~/svn/robobot/teensy_interface_8/ | |||
rm -r build | |||
Then recompile. | |||
== Update Notes == | |||
15 Mar 2025 [[Robobot SVN version 1179]] | |||
20 Mar 2025, robobot SVN version 1180, error in Teensy_firmware_8 (line sensor related). | |||
Latest revision as of 21:22, 20 March 2025
Back to Robobot
Overview
The blocks marked with a blue dot are available in the repository as source code, and some may need an update.
Update software
Once connected to the Raspberry Pi of the robot, update the software:
Update operating system
The operating system is the recommended PI-OS 64bit system build on Debian.
Update using the commands:
sudo apt update sudo apt dist-upgrade
The sudo is required to get administrator (super-user) privileges. The password is the users password.
Update the Robot software
The Robobot software is on an SVN (subversion) repository, update to newest version using:
cd svn/robobot svn update
If *.cpp, *.h, CMakeLists.txt, or *.bash were updated, then an update is needed; see the next sections.
Start-up scripts
If the Start-up script on_reboot.bash has changed, copy it to the home directory.
cp ~/svn/robobot/setup/on_reboot.bash ~/
Any changes will not be implemented until after a reboot of the Raspberry Pi.
sudo reboot now
Recompile base software
When connected to the robot recompile the relevant software:
IP display
The ip_disp can show the robots IP on the robot display, it further monitors the start button and starts the Python mission app.
In the directory /home/local/svn/robobot/ip_disp/build:
cd /home/local/svn/robobot/ip_disp/build make -j3
This should be recompiled if there are any changes.
Shutdown process
The shutdown is activated over MQTT using this small process.
cd ~/svn/robobot/off_by_mqtt mkdir -p build cd build cmake .. make -j3
If anything is compiled, then the new code will be active after a reboot.
Teensy - MQTT interface
The teensy_interface makes the robot interface with the MQTT protocol and thus makes it available over the net.
In the directory /home/local/svn/robobot/teensy_interface/build:
cd /home/local/svn/robobot/teensy_interface/build make -j3
This should be recompiled if there are any changes. Changes will be implemented after a reboot or the interface is restarted:
pkill teensy_int ./teensy_interface -l
The Teensy firmware
The Robobot version of the Teensy firmware handles all (most) of the sensor and actuator interfaces.
The firmware in the /home/local/svn/robobot/teensy_firmware_8 directory:
cd /home/local/svn/robobot/teensy_firmware_8 ./compile (takes 5-50 seconds) ./upload Waiting for Teensy device... (hint: press the reset button)
Do not press the reset button (the small button on the Teensy board) without pressing and holding the power button on the main board during the upload. See here for details on mainboard buttons.
The power button ensures the power to the Raspberry during the upload.
If the power fails during upload, press and hold the power button while the Raspberry boots, and you log on and repeat the upload.
If the teensy_firmware_8 fails to compile, it may help to make a clean recompile. Clean the already compiled parts by removing the build directory:
cd ~/svn/robobot/teensy_interface_8/ rm -r build
Then recompile.
Update Notes
15 Mar 2025 Robobot SVN version 1179
20 Mar 2025, robobot SVN version 1180, error in Teensy_firmware_8 (line sensor related).