This represents the final project for my thesis. It features 4WD Mecanum wheels controlled via Raspberry Pi Pico (micro-ROS) with custom kinematics/odometry. ROS2 Humble on Raspberry Pi 4B integrates RPLiDAR A1 (SLAM via slam_toolbox) and Pi Camera Module 3 with custom YOLOv8 detection. Includes from-scratch implementations of A path planning and Pure Pursuit path tracking for full autonomy.
This project builds upon the excellent work of Jon Durrant and his “DDD Diff Drive Robot” series for Raspberry Pi Pico:
I adapted and extended Jon’s micro-ROS motor-control code to support a 4-wheel Mecanum configuration, redesigned the kinematics/odometry, and integrated a full ROS 2 navigation stack for omnidirectional autonomy.
- Chassis & Drive
- 4× Mecanum wheels
- 4x DC Motors
- 2x Motor driver boards (TB6612FNG)
- Boards
- Raspberry Pi Pico (motor control via micro-ROS)
- Raspberry Pi 4 B (ROS 2 Humble)
- Sensors
- RPLiDAR A1
- Raspberry Pi Camera Module 3
- PID_Testing
- firmware/ Contains the standalone Raspberry Pi Pico firmware for PID loop validation.
- ROS_Implementation
- firmware/ Micro-ROS agent and motor‐control code for the Pi Pico.
- ros2_ws/
- droid1/
config/- YAML files for the joystick controller.launch/- Python launch scripts for SLAM, sensing, and navigation.rviz/- RViz configuration for visualizing robot state & map.urdf/- URDF/XACRO robot description.
- tf_pub/ Custom ROS 2 package that computes and publishes the transform tree between
odomandbase_link, based on your Pico’s odometry output. - yolobot_recognition/ Autonomous perception & navigation stack:
YOLOv8‐based object detector node (Pi Camera integration) andA\*path planner &Pure Pursuitcontroller launch scripts
- droid1/
This project is built and tested on Ubuntu 22.04 LTS with ROS2 Humble LTS.
cd $HOME
git clone https://github.com/cristianooo1/mecanum_ros2_yolo.git
cd ~/mecanum_ros2_yolo/ros2_ws
colcon build --symlink-install
source install/setup.bashsudo micro-ros-agent serial --dev /dev/ttyACM0 baudrate=115200ros2 launch rplidar_ros rplidar_a1_launch.pyros2 run v4l2_camera v4l2_camera_node --ros-args -p image_size:="[640,480]" -p camera_frame_id:=camera_link_opticalros2 launch droid1 online_async_launch.py slam_params_file:=src/droid1/config/mapper_params_online_async.yamlcd /src/droid1
ros2 launch droid1 dispOnly.launch.py model:=urdf/AM.urdf.xacroros2 run tf_pub tf_pubros2 run yolobot_recognition yolov8_ros2_pt.pyros2 run yolobot_recognition detect_object_3D.pyros2 run yolobot_recognition yolov8_follower.pyros2 run yolobot_recognition path_planning.pyros2 run yolobot_recognition pure_pursuit_omni.py