Skip to content

Senior2Projects/Autonomus_Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

🏎️ Autonomous Wheeled Mobile Robot

MCT443 – Design of Autonomous Systems


📖 Project Overview

This project presents the design and simulation of an autonomous wheeled mobile robot capable of lane keeping and reactive obstacle avoidance, developed using ROS 2 Jazzy and Gazebo Harmonic.

The robot autonomously navigates a 10-meter track, avoids static obstacles through lane transitions, and detects a color-coded finish line to complete its mission. The work demonstrates a complete robotics pipeline from SolidWorks CAD design to real-time feedback control in simulation.


🏗️ System Architecture

The system follows a modular Sense–Think–Act architecture:

  • Sense: Camera and GPU LiDAR sensors
  • Think: Perception algorithms and finite state machine
  • Act: Feedback control and differential drive actuation

🛰️ Core Modules

🔩 Hardware Layer

  • URDF model derived from SolidWorks CAD
  • Integrated with ros2_control using ign_ros2_control
  • Accurate mass and inertia modeling

👁️ Perception Layer

Lane Detection

  • OpenCV moment-based centroid tracking of the black lane

Obstacle Detection

  • GPU LiDAR (ultrasonic-style range filtering)

Finish Line Detection

  • HSV-based segmentation for green line recognition

🧠 Decision Layer

  • 5-state Finite State Machine (FSM)
  • Handles lane following, obstacle avoidance, and recovery

🎮 Control Layer

  • Proportional (P) Controller
  • Steering correction based on visual lateral error

🔄 Technical Workflow

1️⃣ CAD to URDF Pipeline

  • Designed in SolidWorks for mechanical realism
  • Geometry simplification for stable physics simulation
  • Exported as STL meshes
  • Manual migration to ROS 2 Jazzy / Gazebo Harmonic
  • Added modern sensor plugins and ros2_control tags

2️⃣ Control Strategy (P-Controller)

Lateral Error Definition

Let the image width be ( W_{\text{image}} ) and the detected lane centroid be ( C_x(t) ):

$$ e(t) = \frac{W_{\text{image}}}{2} - C_x(t) $$

Control Law

$$ \omega(t) = K_p \cdot e(t) $$

Parameters

  • Proportional gain:

K_p = 0.005

  • Constant linear velocity:

v_x = 0.2 m/s


🧠 Obstacle Avoidance (FSM)

State Action Trigger Event
FOLLOW_LANE_1 PID lane tracking Obstacle distance < 0.5 m
SWITCH_LEFT Open-loop arc maneuver Timer > 4.0 s
FOLLOW_LANE_2 Adjacent lane tracking Obstacle distance < 0.5 m
SWITCH_RIGHT Open-loop return maneuver Lane / finish visible
FINISH Deceleration and stop Green area > threshold

▶️ Running the Simulation

Launch Gazebo World

ros2 launch autonomous_rob auto_rob.launch.py world:=project_world.sdf

### Start Autonomous Controller
ros2 run autonomous_rob phase2_node

🛠️ Built With

SolidWorks – Mechanical Design & CAD

ROS 2 Jazzy – Middleware & Control

Gazebo Harmonic – Physics Simulation

OpenCV – Computer Vision & Perception

✅ Conclusion

This project demonstrates a complete autonomous navigation pipeline for a differential drive robot. The modular ROS 2 architecture enabled robust lane following, reliable obstacle avoidance, and accurate mission completion in simulation.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages