An autonomous ground vehicle project for the Intelligent Ground Vehicle Competition (IGVC) featuring computer vision, LiDAR navigation, GPS positioning, and real-time object detection.
- Computer Vision: DepthAI OAK-D camera with lane segmentation and object detection
- LiDAR Navigation: RPLidar integration for obstacle detection and mapping
- GPS Positioning: u-blox GPS with RTK support for precise navigation
- Real-time Inference: Roboflow-based object detection and lane segmentation
- ROS2 Integration: Complete ROS2 workspace with custom packages
- Docker Support: Containerized inference server for scalable deployment
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β DepthAI OAK-D β β RPLidar A1 β β u-blox GPS β
β (Vision) β β (LiDAR) β β (Navigation) β
βββββββββββ¬ββββββββ βββββββββββ¬ββββββββ βββββββββββ¬ββββββββ
β β β
ββββββββββββββββββββββββΌβββββββββββββββββββββββ
β
βββββββββββββββ΄ββββββββββββββ
β ROS2 Workspace β
β - sllidar_ros2 β
β - ublox_gps β
β - Custom nodes β
βββββββββββββββ¬ββββββββββββββ
β
βββββββββββββββ΄ββββββββββββββ
β Inference Server β
β (Roboflow/Docker) β
βββββββββββββββββββββββββββββ
- NVIDIA Jetson (recommended) or x86_64 system
- DepthAI OAK-D camera
- RPLidar A1/A2/A3
- u-blox GPS receiver (NEO-F10N or similar)
- USB-serial adapters (CH341SER compatible)
- Ubuntu 22.04 LTS
- ROS2 Humble
- Python 3.8+
- Docker and Docker Compose
- NVIDIA drivers (for Jetson)
git clone https://github.com/your-username/igvc-robot.git
cd igvc-robot# Install ROS2 Humble
sudo apt update
sudo apt install software-properties-common
sudo add-apt-repository universe
sudo apt update && sudo apt install curl -y
sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null
sudo apt update
sudo apt upgrade -y
sudo apt install ros-humble-desktop python3-argcomplete python3-colcon-common-extensions python3-rosdep python3-vcstool -y
# Install Python dependencies
sudo apt install python3-pip python3-opencv python3-numpy python3-flask -y
# Install Docker
sudo apt install docker.io docker-compose -y
sudo usermod -aG docker $USERcd CH341SER
make
sudo make load
sudo cp ch34x.ko /lib/modules/$(uname -r)/kernel/drivers/usb/serial/
sudo depmod -a# For Jetson
pip3 install depthai
# For x86_64
pip3 install depthai[examples]cd ros2_ws
source /opt/ros/humble/setup.bash
colcon build --symlink-install
source install/setup.bashpip3 install -r requirements.txt# Start Roboflow inference server
docker-compose up -d# Terminal 1: Start LiDAR
./start_lidar.sh
# Terminal 2: Start GPS
ros2 launch ublox_gps neo_f10n_nmea.launch.py
# Terminal 3: Start camera processing
python3 oakd_web_stream.py# List available topics
ros2 topic list
# Monitor specific topics
ros2 topic echo /scan
ros2 topic echo /gps/fixigvc-robot/
βββ ros2_ws/ # ROS2 workspace
β βββ src/
β β βββ sllidar_ros2/ # LiDAR ROS2 package
β β βββ ublox/ # GPS ROS2 packages
β βββ build/ # Build directory
β βββ install/ # Install directory
β βββ log/ # Build logs
βββ CH341SER/ # USB-serial driver
βββ depthai-python/ # DepthAI SDK
βββ oakd_*.py # Camera processing scripts
βββ test_*.py # Test scripts
βββ docker-compose.yaml # Docker configuration
βββ Dockerfile.roboflow # Roboflow inference container
βββ requirements.txt # Python dependencies
βββ start_lidar.sh # LiDAR startup script
βββ README.md # This file
Edit ros2_ws/src/ublox/ublox_gps/config/neo_f10n.yaml:
device: /dev/ttyNEO_F10N
uart1:
baudrate: 38400
frame_id: gps
rate: 4Edit ros2_ws/src/sllidar_ros2/launch/sllidar_a1_launch.py:
serial_port: '/dev/ttyUSB0'
serial_baudrate: 115200
frame_id: 'laser'Edit camera scripts to adjust:
- Model IDs and API keys
- Confidence thresholds
- Output directories
- Stream settings
# Test camera
python3 test_oakd.py
# Test Roboflow API
python3 test_roboflow_api.py
# Test local inference
python3 test_local_roboflow.py# Build and test
cd ros2_ws
colcon build --packages-select sllidar_ros2
colcon test --packages-select sllidar_ros2/scan- LiDAR data/gps/fix- GPS position/gps/vel- GPS velocity/camera/image_raw- Camera feed
- Camera stream:
http://localhost:5000 - Inference results:
http://localhost:5000/stream
-
Permission denied on /dev/ttyUSB0
sudo chmod 666 /dev/ttyUSB0 # Or add user to dialout group sudo usermod -a -G dialout $USER
-
GPS not connecting
- Check baud rate settings
- Verify device path:
ls /dev/tty* - Test with:
cat /dev/ttyNEO_F10N
-
Camera not detected
- Check USB connection
- Install DepthAI drivers
- Test with:
python3 test_oakd.py
-
ROS2 nodes not starting
- Source setup files:
source install/setup.bash - Check dependencies:
rosdep install --from-paths src --ignore-src -r -y
- Source setup files:
# Check ROS2 topics
ros2 topic list
ros2 topic echo /scan
# Check device permissions
ls -la /dev/tty*
# Monitor system resources
htop
nvidia-smi # For Jetson- Fork the repository
- Create a feature branch:
git checkout -b feature-name - Commit changes:
git commit -am 'Add feature' - Push to branch:
git push origin feature-name - Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
- DepthAI for OAK-D camera support
- Roboflow for inference infrastructure
- Slamtec for RPLidar drivers
- u-blox for GPS solutions
- ROS2 community for excellent robotics framework
For questions and support:
- Create an issue on GitHub
- Check the troubleshooting section
- Review ROS2 and hardware documentation
Note: This project is designed for educational and competition purposes. Always follow safety guidelines when operating autonomous vehicles.