Robobot 4

From Rsewiki
Revision as of 13:20, 1 February 2026 by Jca (talk | contribs) (→‎Start from the command line)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Back to Robobot

Start the robot

At the competition, the robot must be started using the start button.

Press the start button (be prepared that the wheels will turn after a few seconds (to load the Python app)).

Start from the command line

With a SSH connection to the robot, navigate to the directory with the Python app:

cd svn/robobot/mqtt_python

Change the IP address in the mqtt-client.py script to match your robot (in the bottom of the file, localhost should work). The script can also run from another computer if the IP is changed to the robot's IP.

Then execute the script by:

python3 mqtt-client.py

This should do the same as pressing the start button.

The app can take parameters:

python3 mqtt-client.py --help
 -h, --help            show this help message and exit
 -w, --white           Calibrate white tape level
 -i, --hostIP HOSTIP   Set host IP, default is localhost
 -g, --gyro            Calibrate gyro
 -l, --level           Calibrate horizontal (not implemented, but maybe an idea)
 -s, --silent          Print less to console
 -n, --now             Start drive now (do not wait for the start button)
 -m, --meter           Drive 1 m and stop
 -p, --pi              Turn 180 degrees (Pi) and stop
 -e, --edge            Find line and follow the left edge
 -u, --usestate USESTATE
                       set mission state to this value

For further details, see Robobot MQTT-client.