Skip to content

This project showcases a 3D SLAM rover built on the ROS 2 Humble framework. Simulated in Gazebo with an Intel RealSense D435 and IMU, it uses RTAB-Map for real-time 3D mapping and visualizes the environment in RViz.

Notifications You must be signed in to change notification settings

Rithwik-Ravi/ROS2-Humble-Turtle-Bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ROS 2 Humble 3D SLAM Rover

This is a ROS 2 Humble project to run a 3D SLAM simulation in Gazebo.

The project configures a differential drive rover with a virtual Intel RealSense D435 depth camera and an IMU.
It is set up to launch rtabmap_ros for 3D mapping and visualize the results in RViz.


🛠️ Installation

1. Install ROS 2 Dependencies

sudo apt update
sudo apt install ros-humble-rtabmap-ros ros-humble-teleop-twist-keyboard ros-humble-xacro

2. Build the Workspace

From the root of the workspace (~/ros2_workspace2):

rm -rf build install log
colcon build

🚀 How to Run (Current State)

You must run each command in a separate, sourced terminal.


🧩 Terminal 1: Launch Gazebo + RViz (This will fail)

This terminal attempts to start Gazebo, RViz, and the robot state publisher.
It will fail with the /spawn_entity timeout error.

source /opt/ros/humble/setup.bash
cd ~/ros2_workspace2
source install/setup.bash
ros2 launch rover 2_gazebo.launch.py

🧭 Terminal 2: Launch SLAM Node

This terminal runs the rtabmap SLAM node in the background.

source /opt/ros/humble/setup.bash
cd ~/ros2_workspace2
source install/setup.bash
ros2 launch rover slam.launch.py

🎮 Terminal 3: Launch Teleop (Keyboard Control)

This terminal runs the keyboard controller.

source /opt/ros/humble/setup.bash
cd ~/ros2_workspace2
source install/setup.bash
ros2 run rover avoid_obstacle

🎮 Terminal 4: Obstical Avoidance Script

This terminal runs the avoid_obstacle.

source /opt/ros/humble/setup.bash
cd ~/ros2_workspace2
source install/setup.bash
ros2 run teleop_twist_keyboard teleop_twist_keyboard

🧱 RViz Configuration (If Gazebo Worked)

If the simulation were running, you would configure RViz as follows:

  • Fixed Frame: map (in Global Options)
  • Add 3D Map: Add a PointCloud2 display with the topic /rtabmap/cloud_map
  • Add Robot Path: Add a Path display with the topic /local_path
  • Add Robot Model: Add a RobotModel display

📦 Package Components

File / Directory Description
urdf/rover.urdf The robot's description file, containing links, joints, and Gazebo plugins for the differential drive, IMU, and RealSense D435.
launch/2_gazebo.launch.py The main simulation launch file. Starts Gazebo, robot_state_publisher, the robot spawner, and RViz. (Currently failing)
launch/slam.launch.py The SLAM launch file. Includes the official rtabmap.launch.py and passes all necessary parameters and topic remappings to it.

⚙️ Summary

This project demonstrates how to set up a 3D SLAM rover simulation in ROS 2 Humble using Gazebo, RTAB-Map, and RViz.
Currently, the Gazebo portion is non-functional, and further debugging is required to resolve the /spawn_entity timeout issue.

About

This project showcases a 3D SLAM rover built on the ROS 2 Humble framework. Simulated in Gazebo with an Intel RealSense D435 and IMU, it uses RTAB-Map for real-time 3D mapping and visualizes the environment in RViz.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published