Skip to content
All projects

Robotics · Computer visionPython

RoverX

A ROS 2 rover that maps its surroundings with lidar, watches the road with a camera and names what it sees with YOLOv8.

crate 0.91/scan · 360° lidar/detection/objects

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

  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. 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.