Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

QBotix 6-Wheeled Autonomous Rover

Overview

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

System Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                        QBotix Rover System                       β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                                                                  β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”       β”‚
β”‚  β”‚   ZED2i      │───▢│  Perception  │───▢│   Nav2       β”‚       β”‚
β”‚  β”‚   Camera     β”‚    β”‚  (YOLO)      β”‚    β”‚   (MPPI)     β”‚       β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜       β”‚
β”‚         β”‚                   β”‚                   β”‚                β”‚
β”‚         β–Ό                   β–Ό                   β–Ό                β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”       β”‚
β”‚  β”‚  Visual      β”‚    β”‚   Target     β”‚    β”‚   Skid       β”‚       β”‚
β”‚  β”‚  Odometry    β”‚    β”‚   Publisher  β”‚    β”‚   Steer Ctrl β”‚       β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜       β”‚
β”‚         β”‚                                       β”‚                β”‚
β”‚         β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                β”‚
β”‚                             β–Ό                                    β”‚
β”‚                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                              β”‚
β”‚                    β”‚    Motors    β”‚                              β”‚
β”‚                    β”‚   (6 wheels) β”‚                              β”‚
β”‚                    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                              β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

TF Tree

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

Hardware Requirements

  • Jetson AGX Orin/Xavier
  • JetPack 6.1 with CUDA 12.6
  • ZED2i Camera
  • 6-Wheel Skid Steering Rover
  • Motor driver (CAN/Serial/PWM)

Software Requirements

  • ROS2 Humble
  • Nav2
  • ZED ROS2 Wrapper
  • Ultralytics (YOLOv8)
  • OpenCV
  • PyTorch (with CUDA)

Installation

1. Prerequisites

# 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-controller

2. Install ZED SDK

Download and install ZED SDK for JetPack 6.1 from: https://www.stereolabs.com/developers/release

# After downloading
chmod +x ZED_SDK_*.run
./ZED_SDK_*.run

3. Clone and Build ZED ROS2 Wrapper

mkdir -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=Release

4. Build QBotix Packages

cd ~/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=Release

5. Install Python Dependencies

pip3 install ultralytics torch torchvision numpy opencv-python

6. Setup Environment

Add to your ~/.bashrc:

source /opt/ros/humble/setup.bash
source ~/zed_ros2_ws/install/setup.bash
source ~/ros2_ws/install/setup.bash

Usage

Quick Start - Full System

ros2 launch qbotix_rover full_system.launch.py

Individual Components

1. Robot Description Only

ros2 launch qbotix_rover rover_bringup.launch.py

2. ZED Camera Only

ros2 launch qbotix_rover zed_camera.launch.py

3. Navigation Only

ros2 launch qbotix_navigation navigation.launch.py

4. Perception Only

ros2 launch qbotix_perception perception.launch.py model_path:=/home/qbotixrover/Documents/small.pt

5. Control Only

ros2 launch qbotix_control control.launch.py

Configuration

Navigation Parameters

Edit src/qbotix_navigation/config/nav2_params.yaml to adjust:

  • MPPI controller parameters
  • Costmap settings
  • Planner settings
  • Speed limits

Perception Parameters

Edit src/qbotix_perception/config/perception_params.yaml to adjust:

  • YOLO model path
  • Detection confidence
  • Goal offset distance

Control Parameters

Edit src/qbotix_control/config/control_params.yaml to adjust:

  • Wheel dimensions
  • Max RPM
  • Motor interface settings

Key Topics

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

MPPI Controller

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

Troubleshooting

Camera not detected

# Check ZED connection
ls /dev/video*

# Reset USB
sudo usbreset /dev/bus/usb/XXX/YYY

Navigation not starting

# Check TF tree
ros2 run tf2_tools view_frames

# Check topics
ros2 topic list
ros2 topic echo /odom

YOLO model errors

# 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')"

File Structure

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

License

Apache-2.0

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages