Running the Robot - SSH only (ROS1)¶
This page covers the full connection sequence for wirelessly controlling the hoverboard base. Two Raspberry Pis must be running simultaneously — one inside the robot (base) and one external (controller).
Step 1: Raspberry Pi and Router Set-Up¶
-
Power on both Raspberry Pis.
-
Power on portable router. Connect laptop to WiFi. (Check router for name & password.)
-
Computer will prompt to open new window with WiFi connection details.
-
Check that 3 devices are connected: 2 Raspberry Pis and host device.
-
Step 2: SSH into Raspberry Pi's¶
Running the robot requires 2 terminals across the two Raspberry Pis.
- Create two terminals and SSH into each RPi:
| Terminal | RPi | Command |
|---|---|---|
| 1 | Base RPi | ssh ubuntu@<off-board-rpi-ip> |
| 2 | Controller RPi | ssh ubuntu@<on-board-rpi-ip> |
Step 2: Calibrate the ODrive¶
-
In Terminal 1, connect to the base (on-board) RPi. Run:
-
If errors appear, address the messages. Unplug and replug the on-board RPi and hoverboard battery, then restart Step 2.
-
Once Calibration commands completed. appears without errors, start the base:
- Check that ODrive connects. Connection issues are often due to faulty cords.
- Run this to ensure no errors:
- Calibrate the ODrive:
odrv0.axis0.requested_state = AXIS_STATE_FULL_CALIBRATION_SEQUENCE odrv0.axis1.requested_state = AXIS_STATE_FULL_CALIBRATION_SEQUENCE- Run
dump_errors(odrv0)multiple times while calibrating to check if there are new errors.- If errors arise, address the error message, run
odrv0.clear_errors(), and continue. Retry calibration if errors persist.
- If errors arise, address the error message, run
- Once calibration completes (base stops moving), quit
odrivetool. Configure the base for controller connection.
Shutdown/Unplug Before Reconnecting
If you
Ctrl + Cin Terminal 1 after a successful base-controller connection or during Step 2, the base will not properly reconnect due to unfinished port clean up.-
When reconnecting after quitting in Terminal 1, run
./shutdown.shto clean up the base connection. -
If errors persist, unplug and replug the off-board RPi and battery. The same terminals can be used once these two are replugged!
-
Step 3: Connect to Controller¶
- Ensure the off-board RPi is connected to a charged controller.
- In Terminal 2, connect to the controller (off-board) RPi:
Step 4: Drive!¶
Use the 8BitDo Lite 2 controller to drive the robot. Place the attachment (trash bin, chair, etc.) on top before operating in public.
Controller Key Mapping
Different controllers may have different key mappings. You can always print /joy topic messages to inspect if the code aligns with the mapping.
Safety button. In our code, you must hold down the top left (L1 / L2) trigger on the controller for the robot to start listening to the joysticks. This is good to have as a safety feature.
Shutdown¶
-
Ctrl + Cin both terminals. - Disconnect both RPi's. Unplug the hoverboard battery.