This project implements an autonomous navigation system for a 6-wheeled skid steering rover using:
- ZED2i Camera for visual odometry and mapping
- YOLO for cone detection
- Nav2 with MPPI Controller for obstacle avoidance and path planning
- ROS2 Humble on Jetson AGX with JetPack 6.1
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β QBotix Rover System β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ β
β β ZED2i βββββΆβ Perception βββββΆβ Nav2 β β
β β Camera β β (YOLO) β β (MPPI) β β
β ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ β
β β β β β
β βΌ βΌ βΌ β
β ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ β
β β Visual β β Target β β Skid β β
β β Odometry β β Publisher β β Steer Ctrl β β
β ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ β
β β β β
β βββββββββββββββββββββ¬ββββββββββββββββββββ β
β βΌ β
β ββββββββββββββββ β
β β Motors β β
β β (6 wheels) β β
β ββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
map
βββ odom (from ZED visual odometry)
βββ base_link
βββ base_footprint
βββ zed_camera_link
β βββ zed_camera_center
β βββ zed_left_camera_frame
β β βββ zed_left_camera_optical_frame
β βββ zed_right_camera_frame
β βββ zed_right_camera_optical_frame
βββ rocker_left
β βββ front_left_wheel
β βββ mid_left_wheel
β βββ bogie_left
β βββ rear_left_wheel
βββ rocker_right
βββ front_right_wheel
βββ mid_right_wheel
βββ bogie_right
βββ rear_right_wheel
- Jetson AGX Orin/Xavier
- JetPack 6.1 with CUDA 12.6
- ZED2i Camera
- 6-Wheel Skid Steering Rover
- Motor driver (CAN/Serial/PWM)
- ROS2 Humble
- Nav2
- ZED ROS2 Wrapper
- Ultralytics (YOLOv8)
- OpenCV
- PyTorch (with CUDA)
# Install ROS2 Humble (if not already installed)
sudo apt update
sudo apt install ros-humble-desktop
# Install Nav2
sudo apt install ros-humble-navigation2 ros-humble-nav2-bringup ros-humble-nav2-mppi-controllerDownload and install ZED SDK for JetPack 6.1 from: https://www.stereolabs.com/developers/release
# After downloading
chmod +x ZED_SDK_*.run
./ZED_SDK_*.runmkdir -p ~/zed_ros2_ws/src
cd ~/zed_ros2_ws/src
git clone --recursive https://github.com/stereolabs/zed-ros2-wrapper.git
cd ~/zed_ros2_ws
source /opt/ros/humble/setup.bash
rosdep install --from-paths src --ignore-src -r -y
colcon build --symlink-install --cmake-args=-DCMAKE_BUILD_TYPE=Releasecd ~/ros2_ws
source /opt/ros/humble/setup.bash
source ~/zed_ros2_ws/install/setup.bash
# Install dependencies
rosdep install --from-paths src --ignore-src -r -y
# Build
colcon build --symlink-install --cmake-args=-DCMAKE_BUILD_TYPE=Releasepip3 install ultralytics torch torchvision numpy opencv-pythonAdd to your ~/.bashrc:
source /opt/ros/humble/setup.bash
source ~/zed_ros2_ws/install/setup.bash
source ~/ros2_ws/install/setup.bashros2 launch qbotix_rover full_system.launch.pyros2 launch qbotix_rover rover_bringup.launch.pyros2 launch qbotix_rover zed_camera.launch.pyros2 launch qbotix_navigation navigation.launch.pyros2 launch qbotix_perception perception.launch.py model_path:=/home/qbotixrover/Documents/small.ptros2 launch qbotix_control control.launch.pyEdit src/qbotix_navigation/config/nav2_params.yaml to adjust:
- MPPI controller parameters
- Costmap settings
- Planner settings
- Speed limits
Edit src/qbotix_perception/config/perception_params.yaml to adjust:
- YOLO model path
- Detection confidence
- Goal offset distance
Edit src/qbotix_control/config/control_params.yaml to adjust:
- Wheel dimensions
- Max RPM
- Motor interface settings
| Topic | Type | Description |
|---|---|---|
/cmd_vel |
geometry_msgs/Twist | Velocity commands |
/odom |
nav_msgs/Odometry | Robot odometry |
/cone_pose |
geometry_msgs/PoseStamped | Detected cone position |
/goal_pose |
geometry_msgs/PoseStamped | Navigation goal |
/wheel_rpm |
std_msgs/Int32MultiArray | Wheel RPM commands |
/cone_markers |
visualization_msgs/MarkerArray | Cone visualizations |
/zed/zed_node/point_cloud/cloud_registered |
sensor_msgs/PointCloud2 | 3D point cloud |
The MPPI (Model Predictive Path Integral) controller is configured for skid steering with:
- Batch size: 2000 samples
- Time steps: 56
- Max velocity: 1.57 m/s (150 RPM)
- Motion model: DiffDrive (differential drive)
Key critics:
- ObstaclesCritic: Avoids obstacles detected by ZED
- GoalCritic: Drives toward the target
- PathFollowCritic: Follows the global path
- PreferForwardCritic: Prefers forward motion
# Check ZED connection
ls /dev/video*
# Reset USB
sudo usbreset /dev/bus/usb/XXX/YYY# Check TF tree
ros2 run tf2_tools view_frames
# Check topics
ros2 topic list
ros2 topic echo /odom# Verify model file
ls -la /home/qbotixrover/Documents/small.pt
# Test YOLO
python3 -c "from ultralytics import YOLO; m = YOLO('/home/qbotixrover/Documents/small.pt')"ros2_ws/
βββ src/
β βββ qbotix_rover/ # Robot description and bringup
β β βββ config/
β β βββ launch/
β β βββ urdf/
β β βββ rviz/
β βββ qbotix_navigation/ # Navigation stack
β β βββ config/
β β βββ launch/
β β βββ scripts/
β βββ qbotix_perception/ # YOLO cone detection
β β βββ config/
β β βββ launch/
β β βββ scripts/
β βββ qbotix_control/ # Motor control
β βββ config/
β βββ launch/
β βββ scripts/
βββ setup_rover.sh # Setup script
Apache-2.0