Robobot 2b

From Rsewiki

Back to Robobot

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.

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 4.1 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 you have no Raspberry, then it is not an issue.

If the power fails during upload, press and hold the power button while the Raspberry boots, and you log on and repeat the upload.

After the upload, check the device name:

ls /dev/ttyACM*
/dev/ttyACM1

The device name will likely change from /dev/ttyACM0 to /dev/ttyACM1. In such a case, a reboot will change the device's name to /dev/ttyACM0.

To reboot, send the Teensy a reboot command:

echo "reboot" >/dev/ttyACM1

A power cycle or another ./upload will do the trick too.