ROS 2 workspace for the Volcanibot, a four-wheel differential-drive field rover for agricultural robotics. It runs both in Gazebo simulation and on the real robot (Roboteq motor controller, Ouster lidar, RealSense camera, Trimble RTK GPS), and includes a YOLO-based person-following demo.
- Ubuntu 24.04
- ROS 2 Jazzy
python3-vcstool- conda (for the Python deps used by YOLO / person-following)
These are the packages developed in this repo:
| Package | What it is |
|---|---|
volcanibot_bringup |
Top-level launch files for sim and real robot, plus GPS/perception sub-launches and configs |
volcanibot_description |
URDF/xacro, meshes, Gazebo worlds, RViz config |
volcanibot_controller |
diff_drive_controller params (shared by sim and real), joystick teleop (Bluetooth/USB profiles) and keyboard teleop, twist_mux arbitration |
volcanibot_hardware_interface |
ros2_control hardware interface for the Roboteq motor controller (C++) with wheel-encoder odometry, udev rule, bench and calibration scripts |
volcanibot_follow_person |
Person-following node: follows the closest person from YOLO detections |
Third-party packages are not committed here. They are pulled into src/
with vcstool (see volcanibot.repos)
and gitignored:
| Package | Source (pinned) |
|---|---|
yolo_ros |
https://github.com/omribu/yolo_ros (fork that drops uv sync for the Jetson) |
trimble_driver_ros |
https://github.com/trimble-oss/trimble_driver_ros (pinned to the pre-rename commit) |
Velocity commands flow through twist_mux, which picks the highest-priority
source and forwards it to the controller:
joystick ──► /joy_vel (priority 100) ─┐
├─► twist_mux ──► /volcanibot_controller/cmd_vel ──► diff_drive_controller ──► wheels
follow-person ──► /nav_vel (priority 50)─┘ ▲
/safety_stop (lock, priority 255) ─┘
Everything is geometry_msgs/TwistStamped end to end. Hold the deadman button
to drive with the joystick; it overrides autonomy.
Camera topics are the same in sim and on the real robot (/camera/image,
/camera/depth_image, /camera/camera_info, /camera/points), so the YOLO
perception layer does not care which one is running.
Clone the workspace:
mkdir -p ~/workspaces && cd ~/workspaces
git clone <this-repo-url> volcanibot_ws
cd volcanibot_wsPull the third-party packages (yolo_ros, trimble_driver_ros):
sudo apt install python3-vcstool
vcs import src < volcanibot.reposInstall the system / ROS dependencies (ouster, realsense, robot_localization, geographiclib, libpcap, boost, and so on):
source /opt/ros/jazzy/setup.bash
rosdep install --from-paths src --ignore-src -r -yCreate a conda env and install the Python deps for YOLO / person-following:
conda create -n volcanibot python=3.12
conda activate volcanibot
pip install -r requirements.txtNote on torch and opencv:
torch: install a CUDA-matched build for your machine (the NVIDIA wheel on the Jetson).opencv: comes from ROS (python3-opencv). Do notpip install opencv-python.
Build and source:
colcon build --symlink-install
source install/setup.bashThe hardware interface expects the Roboteq at the stable symlink /dev/roboteq.
Plug in the controller and run the installer once. It detects the device and
writes the udev rule:
src/volcanibot_hardware_interface/udev/install.shros2 launch volcanibot_bringup sim_bringup.launch.pyUseful args (all default off unless noted):
| Arg | Default | Description |
|---|---|---|
world_name |
feild |
Gazebo world: empty, feild, or farm |
lidar |
false |
Spawn the Ouster lidar and bridge /scan, /scan/points |
camera |
false |
Spawn the RGBD camera and bridge /camera/* |
rviz |
true |
Open RViz with the default config |
joystick |
true |
Launch joystick + joy_teleop (set false if no gamepad) |
joy_profile |
bt |
Joystick mapping profile: bt (Bluetooth) or usb. The Xbox pad's axis/button indices differ between the two |
yolo |
false |
Run YOLO detection on the camera stream (needs camera:=true) |
yolo_device |
cuda:0 |
Inference device. Use cpu on a machine without a GPU |
follow |
false |
Run person-following (needs yolo:=true) |
Example, full perception demo on a CPU laptop:
ros2 launch volcanibot_bringup sim_bringup.launch.py camera:=true yolo:=true follow:=true yolo_device:=cpuLaunch with joystick:=false, then run the keyboard teleop in its own
terminal. It publishes TwistStamped on /joy_vel, so it goes through
twist_mux at the same priority as the gamepad.
# simulation
ros2 run volcanibot_controller keyboard_teleop.py --ros-args -p use_sim_time:=true
# real robot
ros2 run volcanibot_controller keyboard_teleop.py| Key | Action |
|---|---|
W / Up, S / Down |
Forward / backward |
A / Left, D / Right |
Turn left / right in place |
Q / E |
Forward + left / forward + right |
Space / X |
Stop now |
+ / - |
Both speeds up / down |
] / [ and } / { |
Linear only / angular only |
Hold a key to drive; the robot stops about 0.15 s after release. The first
press is held for 0.6 s to bridge the OS key-repeat delay, so motion is smooth
from the start. After stopping, the node goes silent so lower-priority sources
(/nav_vel) can take over again. Speeds, limits and timings are ROS
parameters (linear_speed, angular_speed, max_linear_speed,
max_angular_speed, first_press_hold, repeat_hold).
ros2 launch volcanibot_bringup real_bringup.launch.pyUseful args:
| Arg | Default | Description |
|---|---|---|
lidar |
false |
Include the Ouster lidar and launch ouster_ros |
camera |
false |
Include the RealSense camera and launch its driver |
gps |
false |
Include the GPS antennas and launch the Trimble GSOF client + navsat |
rviz |
true |
Open RViz |
joystick |
true |
Launch joystick + joy_teleop |
joy_profile |
bt |
Joystick mapping profile: bt (Bluetooth) or usb |
yolo |
false |
Run YOLO detection (needs camera:=true) |
yolo_device |
cuda:0 |
Inference device (cuda:0 on the Jetson) |
yolo_model |
yolov8n.pt |
Weights: absolute path or a rebuilt .engine for the field |
follow |
false |
Run person-following (needs yolo:=true) |
serial_port |
/dev/roboteq |
Roboteq serial device |
baud_rate |
115200 |
Roboteq baud rate |
sensor_hostname |
os-122000000000.local |
Ouster lidar hostname/IP |
ouster_params_file |
"" |
Optional custom ouster driver params |
Note: the GPS driver only builds after
rosdep installhas pulled its system deps (geographiclib, libpcap, boost). The receiver IP/port live insrc/volcanibot_bringup/config/gsof_client_params.yaml. For setting up the Trimble receiver itself, seedocs/GPS_RTK_Configuration_Guide.pdf.
For hardware bring-up there are two standalone serial tools in
src/volcanibot_hardware_interface/scripts/ (test_roboteq.py,
interactive_roboteq.py). They send motor commands directly, so they are
bench-only. See the README in that folder before using them.
Two read-only helpers in the same scripts/ folder run alongside
real_bringup (they never publish velocity commands):
calibrate_odom.py: measures wheel revolutions, distance, and yaw between two Enter presses while you drive with the joystick, then prints the multiplier to apply tocounts_per_rev,wheel_radius, orwheel_separation.odom_path.py: accumulates/odomposes into anav_msgs/Pathon/odom_pathso RViz can show the trail the robot made (Add -> Path, Fixed Frame =odom).
The calibrated per-wheel counts_per_rev values live in
src/volcanibot_description/urdf/volcanibot_ros2_control.xacro.
Pull the latest on each third-party repo:
vcs pull srcRefresh the pinned versions in volcanibot.repos:
vcs export src --exact > volcanibot.repos