How robovision2210/mechaprime_ws works
MechaPrime is a ROS 2 autonomous differential-drive robot for simulation and real hardware. The main workflow is to launch a robot, obtain sensor data, map or localize, then send navigation or autonomy tasks that produce motion commands for the drive system. The repository also includes teleoperation, docking, maze solving, camera/marker tools, and an RPLIDAR ROS driver/SDK. Several connections are documented in the README; unsampled implementation details are represented only at subsystem level, so the graph omits unverified internal wiring.
Main entry points: navigation.launch.py Nav2 Navigation · simulated_robot.launch.py Simulation Bringup · real_robot.launch.py Real Robot Bringup · mechaprime_interface.cpp Hardware Interface
Components 22
Robot Bringup
- Simulation Bringup
src/mechaprime_bringup/launch/simulated_robot.launch.py - Real Robot Bringup
src/mechaprime_bringup/launch/real_robot.launch.py - Robot and Worlds
src/mechaprime_description/launch/gazebo.launch.py - Drive and Joystick
src/mechaprime_controller/launch/controller.launch.py
Sensors and Hardware
- Hardware Interface
src/mechaprime_firmware/src/mechaprime_interface.cpp - LiDAR ROS Node
src/rplidar_ros-24cc9b6dea97e045bda1408eaa867ce730fd3fc3/src/rplidar_node.cpp
Mapping and Navigation
- SLAM Mapping
src/mechaprime_mapping/launch/slam.launch.py - AMCL Localization
src/mechaprime_localization/launch/global_localization.launch.py - Nav2 Navigation
src/mechaprime_navigation/launch/navigation.launch.py - Waypoint Following
src/mechaprime_navigation/mechaprime_navigation/waypoint_following.py
Autonomy Features
- QR Maze Solver
src/mechaprime_scripts/mechaprime_scripts/maze_solver.py - Docking
src/mechaprime_scripts/mechaprime_scripts/auto_docking_undocking.py - Battery Docking
src/mechaprime_scripts/mechaprime_scripts/auto_docking_with_battery.py - Patrol and Dock
src/mechaprime_scripts/mechaprime_scripts/docking_with_patrolling.py - Obstacle Avoidance
src/mechaprime_scripts/mechaprime_scripts/obstacle_avoidance.py - Marker Detection
src/mechaprime_scripts/mechaprime_scripts/detect_marker.py - Sensor Readers
src/mechaprime_scripts/mechaprime_scripts/read_lidar.py
RPLIDAR Driver
- LiDAR SDK Driver
src/rplidar_ros-24cc9b6dea97e045bda1408eaa867ce730fd3fc3/sdk/src/sl_lidar_driver.cpp - Scan Unpacking
src/rplidar_ros-24cc9b6dea97e045bda1408eaa867ce730fd3fc3/sdk/src/dataunpacker/unpacker/handler_capsules.cpp
Other components
- Operator
- ROS 2 Navigation Stack
- Robot Hardware
Connections 29
- Operator → Simulation Bringup: launches simulation
- Operator → Real Robot Bringup: launches robot
- Simulation Bringup → Robot and Worlds: starts Gazebo
- Simulation Bringup → Drive and Joystick: starts control
- Real Robot Bringup → Hardware Interface: starts interface
- Hardware Interface → Robot Hardware: reads and drives
src/mechaprime_firmware/src/mechaprime_interface.cpp - Robot Hardware → LiDAR ROS Node: provides scans
- LiDAR ROS Node → LiDAR SDK Driver: uses driver
- LiDAR SDK Driver → Scan Unpacking: decodes scan data
src/rplidar_ros-24cc9b6dea97e045bda1408eaa867ce730fd3fc3/sdk/src/sl_lidar_driver.cpp - Operator → SLAM Mapping: starts mapping
- Operator → AMCL Localization: starts localization
- Operator → Nav2 Navigation: starts navigation
- AMCL Localization → Nav2 Navigation: provides pose
- Operator → Waypoint Following: sends goals
- Waypoint Following → Nav2 Navigation: requests navigation
- Nav2 Navigation → Drive and Joystick: sends velocity
- Operator → QR Maze Solver: starts maze run
- QR Maze Solver → Robot Hardware: commands motion
- Operator → Docking: starts docking
- Docking → Nav2 Navigation: uses actions
- Operator → Battery Docking: starts battery mode
- Battery Docking → Nav2 Navigation: uses actions
- Operator → Patrol and Dock: starts patrol
- Patrol and Dock → Nav2 Navigation: uses actions
- Operator → Obstacle Avoidance: starts avoidance
- Obstacle Avoidance → Robot Hardware: commands motion
- Operator → Marker Detection: starts detection
- Operator → Sensor Readers: runs readers
- ROS 2 Navigation Stack → Nav2 Navigation: supplies Nav2 stack