How aech-7/ros2-slam-auto-navigation works
This ROS 2 robot package supports simulated exploration and autonomous navigation: launch the robot in Gazebo, build or load a map, send goals through Nav2, and monitor the system in RViz. Its main stages are robot description and simulation, mapping/localization, navigation, and velocity control. The tree also includes standalone goal/waypoint clients and map-based rack detection. Some connections are explicit in the sampled launch files; Nav2, SLAM Toolbox, Gazebo, and controller internals are external dependencies, so their internal flows are not expanded.
Main entry points: launch_sim.launch.py Simulation launch · slam_navigation.launch.py SLAM/navigation launch · rsp.launch.py Robot state launch · rack.py Rack detection
Components 19
Robot and simulation
- Simulation launch
launch/launch_sim.launch.py - Robot state launch
launch/rsp.launch.py - Robot model
description/robot.urdf.xacro - Gazebo
- Simulation world
worlds/simple.world - Robot State Publisher
- Drive controllers
Mapping and localization
- SLAM/navigation launch
launch/slam_navigation.launch.py - SLAM Toolbox
- Saved map
maps/mymap.yaml - EKF filter
Navigation and control
- Nav2
- RViz
- Goal client
scripts/goal.py - Waypoint client
scripts/waypoint.py - Velocity mux
launch/launch_sim.launch.py
Map analysis
- Rack detection
cv/rack.py - Map image and metadata
maps/mymap3.pgm
Other components
- Operator
Connections 23
- Operator → Simulation launch: starts simulation
- Simulation launch → Robot state launch: includes
- Robot state launch → Robot model: processes description
- Robot state launch → Robot State Publisher: starts
- Simulation launch → Gazebo: starts with world
- Simulation launch → Simulation world: loads
- Simulation launch → Gazebo: spawns robot
- Simulation launch → Drive controllers: starts spawners
- Simulation launch → Velocity mux: starts
- Velocity mux → Drive controllers: routes velocity commands
- Operator → SLAM/navigation launch: starts mapping and navigation
- SLAM/navigation launch → SLAM Toolbox: includes
- SLAM/navigation launch → Nav2: includes
- SLAM/navigation launch → EKF filter: starts
- SLAM/navigation launch → RViz: starts
- SLAM Toolbox → Saved map: builds map
- Nav2 → Saved map: loads map
- Operator → RViz: sets navigation goal
- RViz → Nav2: sends goal
- Goal client → Nav2: sends pose goals
- Waypoint client → Nav2: sends waypoints
- Operator → Rack detection: runs analysis
- Rack detection → Map image and metadata: reads image and metadata