Robobot 4: Difference between revisions
From Rsewiki
| (One intermediate revision by the same user not shown) | |||
| Line 5: | Line 5: | ||
At the competition, the robot must be started using the start button. | 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). | 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 == | == Start from the command line == | ||
| Line 13: | Line 13: | ||
cd svn/robobot/mqtt_python | cd svn/robobot/mqtt_python | ||
Change the IP address in the | Change the IP address in the <code>mqtt-client.py</code> script to match your robot (in the bottom of the file, <code>localhost</code> 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 | python3 mqtt-client.py | ||
Latest revision as of 13:20, 1 February 2026
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.