# rymc-dev/amr-fe01 architecture

> Architecture diagram of the GitHub repository rymc-dev/amr-fe01, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-04-16). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/rymc-dev/amr-fe01
- Repository: https://github.com/rymc-dev/amr-fe01

## Overview

1. **Repository purpose and scope**
   - This repo is a ROS 2-based autonomous mobile robot project for indoor navigation and light outdoor operation.
   - The runtime architecture is centered on simulation, localization/mapping, and navigation, with a design goal of modularity for future payloads and sensors.

2. **Primary software package boundary**
   - The main ROS 2 package is `amr_fe01/`.
   - It contains the robot description, launch files, navigation and SLAM configuration, RViz setup, map data, world/simulation assets, and a small Python module (`vision.py`).

3. **Robot representation and physical model**
   - `urdf/amr_fe01.xacro` defines the robot model used by ROS tools and simulation.
   - `meshes/` holds the geometry for chassis, wheels, lidar parts, and the room/environment models.
   - This is the structural boundary between the robot’s mechanical design and the ROS runtime.

4. **Simulation environment**
   - `world/world.sdf` defines the Gazebo simulation world.
   - `config/ros_gz_bridge_gazebo.yaml` indicates the project uses a ROS–Gazebo bridge to move data between simulation and ROS 2 topics.
   - The robot is intended to run in simulation first, with the simulated sensors and motion feeding the rest of the stack.

5. **Perception / sensing layer**
   - The URDF includes a lidar-based sensing setup, supported by the lidar mesh assets.
   - `vision.py` is the only explicit Python module in the package and likely acts as an auxiliary perception component or sensor-processing helper.
   - The project does not expose a large custom perception stack in this repo; sensing is mostly modeled through the robot description and simulation.

6. **Mapping and localization subsystem**
   - `launch/slam.launch.py` starts the SLAM workflow.
   - `config/slam_toolbox_cfg.yaml`, `sync_slam_toolbox_cfg.yaml`, and `async_slam_toolbox_cfg.yaml` show support for SLAM Toolbox in multiple operating modes.
   - `maps/world_map.pgm` and `world_map.yaml` are the persisted map outputs used for downstream navigation or map-based operation.

7. **Navigation subsystem**
   - `launch/nav2.launch.py` starts the Nav2 stack.
   - `config/nav2_params.yaml` contains navigation parameters for planning, control, and costmaps.
   - The navigation flow is: robot/sensor data -> localization/map -> Nav2 planning/control -> robot motion in simulation or deployment.

8. **Visualization and operator feedback**
   - `rviz/slam_cfg.rviz` is the RViz configuration used to inspect the robot, map, and SLAM state.
   - RViz acts as the primary visualization boundary for development and debugging of the simulation, mapping, and navigation pipeline.

9. **Launch composition**
   - The launch layer is split into two main entry points: one for SLAM and one for navigation.
   - This separation reflects the architecture: mapping/localization can be exercised independently from goal-based navigation.

10. **Mechanical and CAD assets as upstream design inputs**
   - The top-level `cad/` directory contains the original CAD sources and exports: STEP, STL, OBJ, F3Z, drawings, and reference videos.
   - These assets feed the robot description and mesh files under `amr_fe01/`, but they are not part of the ROS runtime path.

11. **Documentation and architecture artifacts**
   - `docs/` contains formal design documentation for mechanical, electrical, software, requirements, BOM, and assembly instructions.
   - These documents define the intended system architecture, but the executable software architecture lives in the ROS 2 package.

12. **Testing and packaging**
   - `test/` contains standard ROS/Python quality checks for copyright, flake8, and PEP 257.
   - `setup.py`, `package.xml`, `requirements.txt`, and `setup.cfg` indicate a packaged ROS 2 Python project with standard lint/test tooling.

13. **Key data flow for an architecture diagram**
   - The most important runtime path is: URDF/world assets define the robot and environment; Gazebo simulates motion and sensors; ROS-Gazebo bridge carries topic data; SLAM Toolbox builds or uses maps; Nav2 consumes map/localization and issues navigation commands; RViz visualizes the entire loop.

14. **Main architectural boundaries to draw**
   - Separate the repo into: simulation/robot description, SLAM/mapping, navigation, visualization, and offline CAD/documentation sources.
   - The repo is not a monolithic application; it is a ROS 2 system assembled from launchable subsystems and shared configuration/assets.

Main entry points: [`amr_fe01/config/ros_gz_bridge_gazebo.yaml`](https://github.com/rymc-dev/amr-fe01/blob/main/amr_fe01/config/ros_gz_bridge_gazebo.yaml) (ROS-GZ bridge), [`amr_fe01/config/slam_toolbox_cfg.yaml`](https://github.com/rymc-dev/amr-fe01/blob/main/amr_fe01/config/slam_toolbox_cfg.yaml) (SLAM config), [`amr_fe01/launch/slam.launch.py`](https://github.com/rymc-dev/amr-fe01/blob/main/amr_fe01/launch/slam.launch.py) (SLAM launch), [`amr_fe01/urdf/amr_fe01.xacro`](https://github.com/rymc-dev/amr-fe01/blob/main/amr_fe01/urdf/amr_fe01.xacro) (Robot model)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["ROS 2 runtime"]
  node_launch_slam["SLAM launch<br/>ROS launch<br/>[slam.launch.py]"]
  node_launch_nav2["Nav2 launch<br/>ROS launch<br/>[nav2.launch.py]"]
  node_urdf_model["Robot model<br/>URDF/Xacro<br/>[amr_fe01.xacro]"]
  node_world_model["World model<br/>SDF world<br/>[world.sdf]"]
  node_bridge_cfg["ROS-GZ bridge<br/>bridge config"]
  node_slam_cfg["SLAM config<br/>SLAM params"]
  node_slam_sync["Sync SLAM<br/>SLAM params"]
  node_slam_async["Async SLAM<br/>SLAM params"]
  node_nav2_cfg["Nav2 params<br/>navigation params<br/>[nav2_params.yaml]"]
  node_map_data["Persisted map<br/>map assets<br/>[world_map.yaml]"]
  node_rviz_cfg["RViz config<br/>visualization config<br/>[slam_cfg.rviz]"]
  node_vision_py["Vision helper<br/>Python module<br/>[vision.py]"]
  node_mesh_assets["Mesh assets<br/>geometry assets"]
end

subgraph group_offline["Offline sources"]
  node_cad_sources["CAD sources<br/>mechanical CAD"]
end

subgraph group_docs["Documentation"]
  node_assembly_docs["Design docs<br/>project docs"]
end

node_launch_slam -->|"loads"| node_slam_cfg
node_launch_slam -.->|"optional mode"| node_slam_sync
node_launch_slam -.->|"optional mode"| node_slam_async
node_launch_nav2 -->|"loads"| node_nav2_cfg
node_urdf_model -->|"references"| node_mesh_assets
node_world_model -->|"publishes"| node_bridge_cfg
node_urdf_model -->|"simulated in"| node_world_model
node_bridge_cfg -->|"feeds"| node_slam_cfg
node_bridge_cfg -->|"feeds"| node_nav2_cfg
node_slam_cfg -->|"produces"| node_map_data
node_map_data -->|"consumed by"| node_nav2_cfg
node_rviz_cfg -->|"visualizes"| node_slam_cfg
node_vision_py -.->|"augments"| node_bridge_cfg
node_cad_sources -->|"exports to"| node_mesh_assets
node_assembly_docs -.->|"documents"| node_urdf_model

click node_launch_slam "https://github.com/rymc-dev/amr-fe01/blob/main/amr_fe01/launch/slam.launch.py"
click node_launch_nav2 "https://github.com/rymc-dev/amr-fe01/blob/main/amr_fe01/launch/nav2.launch.py"
click node_urdf_model "https://github.com/rymc-dev/amr-fe01/blob/main/amr_fe01/urdf/amr_fe01.xacro"
click node_world_model "https://github.com/rymc-dev/amr-fe01/blob/main/amr_fe01/world/world.sdf"
click node_bridge_cfg "https://github.com/rymc-dev/amr-fe01/blob/main/amr_fe01/config/ros_gz_bridge_gazebo.yaml"
click node_slam_cfg "https://github.com/rymc-dev/amr-fe01/blob/main/amr_fe01/config/slam_toolbox_cfg.yaml"
click node_slam_sync "https://github.com/rymc-dev/amr-fe01/blob/main/amr_fe01/config/sync_slam_toolbox_cfg.yaml"
click node_slam_async "https://github.com/rymc-dev/amr-fe01/blob/main/amr_fe01/config/async_slam_toolbox_cfg.yaml"
click node_nav2_cfg "https://github.com/rymc-dev/amr-fe01/blob/main/amr_fe01/config/nav2_params.yaml"
click node_map_data "https://github.com/rymc-dev/amr-fe01/blob/main/amr_fe01/maps/world_map.yaml"
click node_rviz_cfg "https://github.com/rymc-dev/amr-fe01/blob/main/amr_fe01/rviz/slam_cfg.rviz"
click node_vision_py "https://github.com/rymc-dev/amr-fe01/blob/main/amr_fe01/amr_fe01/vision.py"
click node_cad_sources "https://github.com/rymc-dev/amr-fe01/tree/main/cad"
click node_mesh_assets "https://github.com/rymc-dev/amr-fe01/tree/main/amr_fe01/meshes"
click node_assembly_docs "https://github.com/rymc-dev/amr-fe01/tree/main/docs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_launch_slam,node_launch_nav2,node_urdf_model,node_world_model,node_bridge_cfg,node_slam_cfg,node_slam_sync,node_slam_async,node_nav2_cfg,node_map_data,node_rviz_cfg,node_vision_py,node_mesh_assets toneBlue
class node_cad_sources toneAmber
class node_assembly_docs toneMint
```

## Components

### ROS 2 runtime

Launchable robot, simulation, mapping, navigation, and visualization components.

- [SLAM launch](https://github.com/rymc-dev/amr-fe01/blob/main/amr_fe01/launch/slam.launch.py): ROS launch · Entry point for mapping and localization workflows. · `amr_fe01/launch/slam.launch.py`
- [Nav2 launch](https://github.com/rymc-dev/amr-fe01/blob/main/amr_fe01/launch/nav2.launch.py): ROS launch · Entry point for goal-based navigation. · `amr_fe01/launch/nav2.launch.py`
- [Robot model](https://github.com/rymc-dev/amr-fe01/blob/main/amr_fe01/urdf/amr_fe01.xacro): URDF/Xacro · Defines the robot kinematics, sensors, and links used by ROS and simulation. · `amr_fe01/urdf/amr_fe01.xacro`
- [World model](https://github.com/rymc-dev/amr-fe01/blob/main/amr_fe01/world/world.sdf): SDF world · Gazebo simulation world and environment layout. · `amr_fe01/world/world.sdf`
- [ROS-GZ bridge](https://github.com/rymc-dev/amr-fe01/blob/main/amr_fe01/config/ros_gz_bridge_gazebo.yaml): bridge config · Topic bridge between Gazebo simulation and ROS 2. · `amr_fe01/config/ros_gz_bridge_gazebo.yaml`
- [SLAM config](https://github.com/rymc-dev/amr-fe01/blob/main/amr_fe01/config/slam_toolbox_cfg.yaml): SLAM params · Shared SLAM Toolbox configuration for map building and localization. · `amr_fe01/config/slam_toolbox_cfg.yaml`
- [Sync SLAM](https://github.com/rymc-dev/amr-fe01/blob/main/amr_fe01/config/sync_slam_toolbox_cfg.yaml): SLAM params · Synchronous SLAM Toolbox operating mode. · `amr_fe01/config/sync_slam_toolbox_cfg.yaml`
- [Async SLAM](https://github.com/rymc-dev/amr-fe01/blob/main/amr_fe01/config/async_slam_toolbox_cfg.yaml): SLAM params · Asynchronous SLAM Toolbox operating mode. · `amr_fe01/config/async_slam_toolbox_cfg.yaml`
- [Nav2 params](https://github.com/rymc-dev/amr-fe01/blob/main/amr_fe01/config/nav2_params.yaml): navigation params · Planning, control, and costmap configuration for Nav2. · `amr_fe01/config/nav2_params.yaml`
- [Persisted map](https://github.com/rymc-dev/amr-fe01/blob/main/amr_fe01/maps/world_map.yaml): map assets · Saved occupancy map used for map-based navigation. · `amr_fe01/maps/world_map.yaml`
- [RViz config](https://github.com/rymc-dev/amr-fe01/blob/main/amr_fe01/rviz/slam_cfg.rviz): visualization config · Operator view for inspecting robot state, map, and SLAM behavior. · `amr_fe01/rviz/slam_cfg.rviz`
- [Vision helper](https://github.com/rymc-dev/amr-fe01/blob/main/amr_fe01/amr_fe01/vision.py): Python module · Small auxiliary perception or sensor-processing module. · `amr_fe01/amr_fe01/vision.py`
- [Mesh assets](https://github.com/rymc-dev/amr-fe01/tree/main/amr_fe01/meshes): geometry assets · ROS-visible meshes for the chassis, wheels, lidar, and room model. · `amr_fe01/meshes`

### Offline sources

CAD and reference assets that feed the robot description and mesh exports.

- [CAD sources](https://github.com/rymc-dev/amr-fe01/tree/main/cad): mechanical CAD · Original design assets and exports that inform the robot geometry. · `cad`

### Documentation

Design and project documentation outside the executable stack.

- [Design docs](https://github.com/rymc-dev/amr-fe01/tree/main/docs): project docs · Mechanical, electrical, software, BOM, and assembly documentation. · `docs`

## Connections

- SLAM launch → SLAM config: loads · Starts the SLAM workflow with the shared configuration.
- SLAM launch → Sync SLAM: optional mode · Can use synchronous SLAM Toolbox settings.
- SLAM launch → Async SLAM: optional mode · Can use asynchronous SLAM Toolbox settings.
- Nav2 launch → Nav2 params: loads · Starts navigation with the Nav2 parameter set.
- Robot model → Mesh assets: references · Robot links and environment visuals resolve to mesh files.
- World model → ROS-GZ bridge: publishes · Simulation topics are exposed through the bridge into ROS 2.
- Robot model → World model: simulated in · Robot description is placed into the Gazebo world for simulation.
- ROS-GZ bridge → SLAM config: feeds · Bridge-delivered sensor topics drive SLAM.
- ROS-GZ bridge → Nav2 params: feeds · Bridge-delivered robot state and sensor topics support navigation.
- SLAM config → Persisted map: produces · SLAM generates persisted map outputs for later use.
- Persisted map → Nav2 params: consumed by · Nav2 uses the saved map for localization and navigation.
- RViz config → SLAM config: visualizes · RViz is configured to inspect SLAM and map state.
- Vision helper → ROS-GZ bridge: augments · Auxiliary Python logic can process or adapt sensor data.
- CAD sources → Mesh assets: exports to · Mechanical CAD is the upstream source for the ROS mesh assets.
- Design docs → Robot model: documents · Architecture and design docs describe the intended robot model and system.
