This repository contains the ROS2 software stack and Gazebo simulation environment for a custom-built, Ackermann-steered Unmanned Ground Vehicle (UGV). The project focuses on robust localization, mapping, and autonomous navigation using advanced sensor fusion and path planning algorithms tailored for non-holonomic robots.
Unlike standard differential drive robots, this UGV utilizes an Ackermann steering mechanism. The software architecture includes custom controllers to translate standard ROS Twist messages into Ackermann kinematics, enhanced odometry combining wheel encoders, IMU, and LiDAR, and full integration with the Nav2 stack for autonomous obstacle avoidance and goal-directed navigation.
- Path Planning (Smac Hybrid Planner): To accommodate the non-holonomic constraints and minimum turning radius of the Ackermann steering system, the Nav2 stack utilizes the Smac Planner Hybrid. This algorithm generates kinematically feasible, smooth paths (using Reeds-Shepp or Dubins curves) ensuring the robot can reach its goal without requiring in-place rotations.
- Localization & Sensor Fusion: Employs an Extended Kalman Filter (EKF) via the
robot_localizationpackage. It fuses continuous data streams from custom wheel odometry scripts, an enhanced IMU processor, and a custom adaptive laser scan matcher to maintain highly accurate state estimation. - Mapping: Integrates SLAM Toolbox for creating precise 2D occupancy grid maps of the simulation environment using LiDAR data.
- Custom Behavior Trees: Navigation is guided by specific XML behavior trees (
ackermann_to_bt.xml,ackermann_through_bt.xml) optimized for continuous forward motion and reversing logic.
bot_description: Contains the URDF/Xacro models, 3D sensor meshes (Camera, LiDAR), RViz configurations, and the Gazebo simulation world files (living_room.sdf).custom_ackermann_controller: The core package handling Ackermann kinematics, PS4 controller input, and the enhanced odometry/localization nodes (Adaptive Scan Matcher, IMU Processor).bot_navigation: Configuration files for Nav2 and SLAM, custom behavior trees, pre-generated maps (my_map.yaml), and the main navigation launch files.bot_controller: Basic movement and controller parameter configurations.
| Chassis View 1 | Chassis View 2 |
|---|---|
![]() |
![]() |
| UGV Simulation Model | Gazebo Environment |
|---|---|
![]() |
![]() |
- Autonomous Navigation in Gazebo - Goal 1:
Goal.1.mp4
- Autonomous Navigation in Gazebo - Goal 2:
Goal.2.mp4
- Clone the workspace:
mkdir -p ~/ugv_ws/src
cd ~/ugv_ws/src
git clone https://github.com/yenode/Ackermann-Drive-UGV.git- Install dependencies:
cd ~/ugv_ws
rosdep install --from-paths src --ignore-src -r -y- Build the workspace:
colcon build --symlink-install
source install/setup.bash- Launch the simulation environment and robot state publisher:
ros2 launch bot_description gazebo.launch.xml- Launch the bot_controller:
ros2 launch bot_controller bot_controller.launch.xml- Launch the enhanced odometry and localization stack:
ros2 launch custom_ackermann_controller enhanced_localization.launch.py- Launch Navigation2 (for autonomous movement and obstacle avoidance):
ros2 launch bot_navigation navigation.launch.py- For manual teleoperation via PS4 controller:
ros2 launch custom_ackermann_controller joystick_teleop.launch.pyThis project is licensed under the MIT License.



