We simulate a differential-drive robot in Gazebo and run SLAM and goal-based navigation in three steps. First, the robot builds an occupancy grid map of its environment using SLAM. Next, we select a goal point on that map. Finally, the robot plans a path and autonomously drives to the goal. Throughout, we show what the robot perceives in ROS 2 using RViz: its laser scans, the camera input and the map as it forms.
The approach is built on the following packages:
map → odom → base_link → sensor frames so that every component shares a consistent picture of where the robot and its sensors are.Gazebo Environment
SLAM
Autonomous Navigation