Skip to content

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

🤖 Prototype — Autonomous Robot Car

A ROS 2 Jazzy autonomous robot car with SLAM mapping, lifecycle-based action controller, and obstacle-aware path planning. Built with a custom URDF, simulated in Gazebo, and visualized in RViz2.


📽️ Demo

Demo Video


✨ Features

  • Custom URDF — Robot model built from scratch with LiDAR and camera sensors
  • SLAM Mapping — Real-time environment mapping using LiDAR
  • Lifecycle Action Controller — C++ action server/client with full ROS 2 lifecycle management
  • Obstacle-Aware Navigation — Python API sends planned paths to avoid obstacles
  • Dynamic Obstacle Avoidance — Real-time map updates via Nav2 costmap
  • Goal-based Keyboard Controller — Each keypress sends an incremental navigation goal to the action server, leveraging the full nav stack for automatic obstacle avoidance
  • Gazebo + RViz2 — Full simulation and visualization pipeline

🏗️ Architecture

┌─────────────────────────────────────────────────┐
│                   ROS 2 Jazzy                   │
│                                                 │
│  [Keyboard Controller]                          │
│       │                                         │
│  (Goal Coordinates)                             │
│       │                                         │
│  [nav_bridge_py] ──► [Nav2 Action Server]       │
│                              │                  │
│                      (Path Planning +           │
│                      Obstacle Avoidance)        │
│                              │                  │
│                     [Action Server]             │
│                     (Lifecycle Node C++)        │
│                              │                  │
│                       [Robot URDF]              │
│                    LiDAR │   Camera             │
│                          │                      │
│                   [SLAM Mapper]                 │
│                          │                      │
│                      /map topic                 │
│                          │                      │
│                       [RViz2]                   │
└─────────────────────────────────────────────────┘

📦 Package Structure

robot_navigator/
└── src/
    ├── my_robot_description/      # Custom URDF + RViz config
    │   ├── urdf/
    │   └── rviz/
    ├── my_robot_bringup/          # Launch files + config
    │   ├── launch/
    │   │   ├── my_robot_gazebo.launch.xml
    │   │   ├── navigation.launch.xml
    │   │   └── bringup_all.launch.py
    │   ├── config/
    │   │   ├── nav2_params_custom.yaml
    │   │   └── gazebo_bridge.yaml
    │   └── worlds/
    ├── my_robot_interfaces/       # Custom ROS 2 interfaces
    │   ├── action/
    │   └── msg/
    ├── robot_controller_cpp/      # Lifecycle action server (C++)
    │   ├── include/
    │   └── src/
    ├── robot_controller_nav2/     # Goal-based keyboard controller (C++)
    │   └── src/
    └── nav_bridge_py/             # Navigation bridge (Python)

🚀 Getting Started

Prerequisites

  • ROS 2 Jazzy
  • Gazebo
  • slam_toolbox
  • nav2_bringup

⚠️ Before Running

Copy the required files to your home directory:

# Map files
mkdir -p ~/maps
cp src/maps/cubes.pgm ~/maps/
cp src/maps/cubes.yaml ~/maps/

# Nav2 params
cp src/my_robot_bringup/config/nav2_params_custom.yaml ~/

Note: Nav2 params are tuned for low-end hardware. Modify if needed.

Build

git clone https://github.com/dgkagkan/robot_navigator.git
cd robot_navigator
colcon build
source install/setup.bash

Run

ros2 launch my_robot_bringup bringup_all.launch.py

This will automatically start:

  1. Gazebo + RViz2
  2. Navigation (SLAM + Nav2) — launches after Gazebo is ready
  3. Keyboard controller — opens in a new terminal when the map is loaded

🛠️ Tech Stack

Component Technology
Framework ROS 2 Jazzy
Language C++ / Python
Simulation Gazebo
Visualization RViz2
Mapping SLAM Toolbox
Controller Lifecycle Action Server
Sensors LiDAR, Camera (URDF)

🔭 Future Work

  • Integrate camera for visual object detection (YOLO)
  • Web UI for remote control (Flask + WebSocket)
  • Deploy on physical hardware

📄 License

MIT License

About

Autonomous robot car with SLAM mapping, Nav2 obstacle avoidance and lifecycle action controller — ROS2 Jazzy + Gazebo

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages