Overview
RoverX is a simulated two-wheeled differential-drive robot built on ROS 2 Humble and Ignition Gazebo Fortress. A caster ball keeps it stable, a 360° GPU lidar scans the room around it and a forward-facing camera streams what is in front of it.
Every capability lives in its own ROS 2 node, so driving, perception and logging can be swapped or extended independently. Detections are published both as annotated video and as structured JSON, ready for a planner or a dashboard to consume.
How it works
Model and launch
The rover is described in URDF with two driven wheels and a caster. One launch file brings up Gazebo, the ROS bridge, robot_state_publisher and RViz2.
Drive
A WASD teleop node publishes velocity commands on /cmd_vel to Gazebo's diff-drive plugin. The rover moves while a key is held, stops on release, and SPACE is a hard stop.
Sense
The lidar publishes on /scan for RViz2, and the camera publishes 640×480 frames at 30 fps on /camera/image_raw, alongside odometry and TF.
Detect
A YOLOv8 node subscribes to the camera and publishes annotated frames on /detection/image_raw and JSON detections on /detection/objects, with the model and confidence threshold exposed as parameters.
Record
A recorder node writes MP4 video, saves a snapshot every 10 seconds and logs camera, lidar, odometry and TF into a rosbag for later analysis.
Engineering notes
- Ogre 2 rendering does not run on WSL2, so the model uses the Ogre renderer, which in turn makes gpu_lidar the lidar type that works in Fortress.
- cv_bridge on Humble is built against NumPy 1.x, so NumPy and OpenCV are pinned to compatible versions to keep the camera pipeline stable.