ROS Workspace Setup
This document explains how to build the ROS Workspace, the use cases for different nodes are described here.
How to Clone
The workstation_ros directory contains a ROS 2 workspace that uses git submodules. To clone it properly:
git clone --recurse-submodules -b workstation_ros https://github.com/IMRCLab/pololu3pi2040-rs.git <target_directory>
cd <target_directory>
If you already cloned without --recurse-submodules, run:
git submodule update --init --recursive
How to Build
From the workspace root:
source /opt/ros/<ros_distro>/setup.bash
colcon build
Source the environment before running any nodes:
source install/setup.bash
Troubleshooting
Controller Interface and Robot Issues
Controller not detected:
# Check if controller is recognized
ls /dev/input/js*
# Should show /dev/input/js0 or similar
# Test controller input
ros2 run joy joy_node
ros2 topic echo /joy
No robot response:
- Check robot radio URIs in
controller_interface.yaml- Are the commands sent to the correct robot addresses? - Verify robots are flashed with correct firmware (to accept commands)
- Could it be that the robot has no SD Card? Has the SD Card a trajectory (
TRJ0001.JSN- use exactly THIS NAME)? Is the log full (capped atTR99)? - "Weird behavior" - Does the robot have proper mocap data? Does the robot have an SD Card with the right robot configuration on it (
ROBOTCFG_3Pi.CFGorROBOTCFG_ZUMO.CFG)? - Check ROS logs for connection errors:
ros2 launch pololu controller_interface_launch.py --screen
Build errors:
# Clean build
rm -rf build/ install/ log/
colcon build --cmake-args -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
Submodule issues:
# Reset all submodules and pull them again recursively
git submodule deinit --all
git submodule update --init --recursive
Safety Features
- Emergency stop functionality (BACK button stops all robots) - helpful when running multi-robot experiments
- Individual robot control prevents accidental commands to wrong robots