This repo contains the packages required to ron on roboguard-pi.
Using a dev container ensures consistent environments across development and CI/CD pipelines.
-
Install required software:
- Docker Desktop
- Visual Studio Code
- VcXsrv (Xserver)
- VSCode Remote - Containers extension
-
Setup steps:
- Clone and open the repository
- Click the green button in VSCode's bottom left corner
- Select "Remote-Containers: Reopen in Container"
- Start Xserver with the -nowgl option
Follow the same steps as Windows, excluding Xserver installation. Additionally:
-
Update DISPLAY environment variable in .env:
echo DISPLAY=$DISPLAY
-
Configure controller node permissions:
cat /dev/input/event0
Note: Consider configuring Docker for non-root usage
Requires Ubuntu 22.04 LTS.
-
Install prerequisites:
- ROS2 Humble (use
ros-humble-desktop-full)
- ROS2 Humble (use
-
Install dependencies (from
input_manager):sudo apt install python3-evdev
-
Setup workspace:
git clone --recurse-submodules https://github.com/clubcapra/roboguard_pi.git cd roboguard_pi sudo rosdep init rosdep update rosdep install --from-paths src --ignore-src -r -y colcon build --symlink-install source install/setup.bash
Install docker:
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh ./get-docker.shNote that if you are developing, you should use a different ROS_DOMAIN_ID than the robot's. If you do want to connect to the same domain ID, use:
ROS_DOMAIN_ID=96This command needs to be run in every terminal you intend to communicate with the robot.
You can launch the real-world robot using the following command:
ros2 launch roboguard_bringup real.launch.pyHere are the arguments that can be used:
| Argument | Default | Description |
|---|---|---|
use_mock_odrives |
false |
Set this to true to use mock hardware interfaces. This allows testing out controlling the drives without having the hardware. |
with_ovis |
true |
Choose whether to launch Ovis. When this is true, Ovis will appear in the URDF. |
use_mock_ovis |
false |
Set this to true to use mock hardware interfaces. This allows testing out controlling Ovis without having the hardware. |
with_rosbag |
true |
When this is true, rosbag will start logging and will compress the rosbag on a successful shutdown. |
Use args like so:
ros2 launch roboguard_bringup real.launch.py <arg>:=<value>In order to control the robot, you need to run the teleop nodes:
ros2 launch roboguard_bringup teleop.launch.pyTopics that start with /rove are topics that are handled.
Topics that start with /rove/station are topics that should not be listened to from the robot, they should stay on the station (control station).
topics that start with /rove/robot are topics that should stay on the robot.
Topics that start with /rove/to_robot are topics that should be sent from station to robot.
Topics that start with /rove/to_station are topics that should be sent from robot to station.
Before pushing your code, you should try to deploy it by using:
run_testThis will do essentially what the github action will do. It will start a docker, pull dependencies, install required packages and test the code. This does not ensure the code is working, but it helps catch issues before making a pull request.