# lariad/offroad-nav architecture

> Architecture diagram of the GitHub repository lariad/offroad-nav, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/lariad/offroad-nav
- Repository: https://github.com/lariad/offroad-nav

## Overview

Offroad-Nav is a ROS 1 autonomous navigation stack for the Barakuda UGV, supporting simulated and real sensor configurations and LiDAR or monocular perception. Its documented workflow turns sensor data into an elevation map, plans obstacle-avoiding routes, and executes navigation goals. The graph includes mission/waypoint handling and a sampled plane-decomposition layer. README documentation establishes the high-level mapping-to-navigation flow; several implementation links are omitted because their source was not sampled.

Main entry points: [`nav_stack/src/Barakuda/elevation_mapping_cupy/elevation_mapping_cupy/script/elevation_mapping_cupy/elevation_mapping.py`](https://github.com/lariad/offroad-nav/blob/main/nav_stack/src/Barakuda/elevation_mapping_cupy/elevation_mapping_cupy/script/elevation_mapping_cupy/elevation_mapping.py) (Elevation Map), [`nav_stack/src/Barakuda/elevation_mapping_cupy/elevation_mapping_cupy/src/elevation_mapping_node.cpp`](https://github.com/lariad/offroad-nav/blob/main/nav_stack/src/Barakuda/elevation_mapping_cupy/elevation_mapping_cupy/src/elevation_mapping_node.cpp) (Elevation Mapping), [`mono_depth/src/depth_rescaling/src/depth_estimation/depth_prediction_node.py`](https://github.com/lariad/offroad-nav/blob/main/mono_depth/src/depth_rescaling/src/depth_estimation/depth_prediction_node.py) (Depth Estimation), [`mono_depth/src/depth_rescaling/src/depth_estimation/depth_rescaling_node.py`](https://github.com/lariad/offroad-nav/blob/main/mono_depth/src/depth_rescaling/src/depth_estimation/depth_rescaling_node.py) (Depth Rescaling)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_sensing["Sensing"]
  node_sim["Isaac Sim"]
  node_sensors["Robot Sensors"]
end

subgraph group_perception["Perception"]
  node_depth["Depth Estimation"]
  node_depth_rescale["Depth Rescaling"]
  node_vins["VINS Estimator<br/>[estimator_node.cpp]"]
  node_feature_tracker["Feature Tracking"]
  node_dlio["LiDAR Odometry<br/>[odom_node.cc]"]
  node_camera_calib["Camera Models<br/>[CameraFactory.cc]"]
end

subgraph group_navigation["Mapping &amp; Planning"]
  node_elevation["Elevation Mapping"]
  node_plane_decomp["Plane Decomposition"]
  node_map[("Elevation Map")]
  node_planner["Path Planner"]
end

subgraph group_robot["Robot Control"]
  node_manager["Mission Manager"]
  node_waypoint["Waypoint Action"]
  node_move_base["move_base"]
  node_controller["Gridmap Controller"]
  node_vehicle["UGV"]
  node_teleop["Teleoperation<br/>[barakuda_joy.py]"]
end

node_operator(("Operator"))

node_sim -.->|"publishes data"| node_sensors
node_sensors -.->|"images"| node_depth
node_depth -->|"depth output"| node_depth_rescale
node_depth_rescale -->|"depth data"| node_elevation
node_sensors -.->|"LiDAR data"| node_dlio
node_dlio -->|"odometry"| node_elevation
node_sensors -.->|"camera images"| node_feature_tracker
node_feature_tracker -->|"tracked features"| node_vins
node_camera_calib -->|"camera model"| node_vins
node_elevation -->|"updates"| node_map
node_map -->|"elevation input"| node_plane_decomp
node_map -->|"map data"| node_planner
node_operator -->|"mission / goal"| node_manager
node_manager -->|"sends path"| node_waypoint
node_waypoint -->|"sends goals"| node_move_base
node_move_base -->|"controller execution"| node_controller
node_controller -->|"velocity commands"| node_vehicle
node_teleop -->|"manual commands"| node_vehicle
node_planner -->|"planned route"| node_move_base

click node_depth "https://github.com/lariad/offroad-nav/blob/main/mono_depth/src/depth_rescaling/src/depth_estimation/depth_prediction_node.py"
click node_depth_rescale "https://github.com/lariad/offroad-nav/blob/main/mono_depth/src/depth_rescaling/src/depth_estimation/depth_rescaling_node.py"
click node_vins "https://github.com/lariad/offroad-nav/blob/main/mono_depth/src/depth_rescaling/VINS-Mono/vins_estimator/src/estimator_node.cpp"
click node_feature_tracker "https://github.com/lariad/offroad-nav/blob/main/mono_depth/src/depth_rescaling/VINS-Mono/feature_tracker/src/feature_tracker_node.cpp"
click node_elevation "https://github.com/lariad/offroad-nav/blob/main/nav_stack/src/Barakuda/elevation_mapping_cupy/elevation_mapping_cupy/src/elevation_mapping_node.cpp"
click node_plane_decomp "https://github.com/lariad/offroad-nav/blob/main/nav_stack/src/Barakuda/elevation_mapping_cupy/plane_segmentation/convex_plane_decomposition/src/PlaneDecompositionPipeline.cpp"
click node_dlio "https://github.com/lariad/offroad-nav/blob/main/nav_stack/src/Barakuda/dlio/src/dlio/odom_node.cc"
click node_map "https://github.com/lariad/offroad-nav/blob/main/nav_stack/src/Barakuda/elevation_mapping_cupy/elevation_mapping_cupy/script/elevation_mapping_cupy/elevation_mapping.py"
click node_manager "https://github.com/lariad/offroad-nav/blob/main/nav_stack/src/Barakuda/barakuda_manager/src/barakuda_manager.cpp"
click node_waypoint "https://github.com/lariad/offroad-nav/blob/main/nav_stack/src/Barakuda/waypoint_manager/src/waypoint_manager.cpp"
click node_controller "https://github.com/lariad/offroad-nav/blob/main/nav_stack/src/Barakuda/mbf_gridmap/mbf_gridmap_core/include/mbf_gridmap_core/gridmap_controller.h"
click node_camera_calib "https://github.com/lariad/offroad-nav/blob/main/mono_depth/src/depth_rescaling/VINS-Mono/camera_model/src/camera_models/CameraFactory.cc"
click node_teleop "https://github.com/lariad/offroad-nav/blob/main/nav_stack/src/Barakuda/barakuda_node/script/barakuda_joy.py"

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_sim,node_sensors toneBlue
class node_depth,node_depth_rescale,node_vins,node_feature_tracker,node_dlio,node_camera_calib toneAmber
class node_elevation,node_plane_decomp,node_map,node_planner toneMint
class node_manager,node_waypoint,node_move_base,node_controller,node_vehicle,node_teleop toneRose
class node_operator toneIndigo
```

## Components

### Sensing

- **Isaac Sim**
- **Robot Sensors**

### Perception

- [Depth Estimation](https://github.com/lariad/offroad-nav/blob/main/mono_depth/src/depth_rescaling/src/depth_estimation/depth_prediction_node.py): `mono_depth/src/depth_rescaling/src/depth_estimation/depth_prediction_node.py`
- [Depth Rescaling](https://github.com/lariad/offroad-nav/blob/main/mono_depth/src/depth_rescaling/src/depth_estimation/depth_rescaling_node.py): `mono_depth/src/depth_rescaling/src/depth_estimation/depth_rescaling_node.py`
- [VINS Estimator](https://github.com/lariad/offroad-nav/blob/main/mono_depth/src/depth_rescaling/VINS-Mono/vins_estimator/src/estimator_node.cpp): `mono_depth/src/depth_rescaling/VINS-Mono/vins_estimator/src/estimator_node.cpp`
- [Feature Tracking](https://github.com/lariad/offroad-nav/blob/main/mono_depth/src/depth_rescaling/VINS-Mono/feature_tracker/src/feature_tracker_node.cpp): `mono_depth/src/depth_rescaling/VINS-Mono/feature_tracker/src/feature_tracker_node.cpp`
- [LiDAR Odometry](https://github.com/lariad/offroad-nav/blob/main/nav_stack/src/Barakuda/dlio/src/dlio/odom_node.cc): `nav_stack/src/Barakuda/dlio/src/dlio/odom_node.cc`
- [Camera Models](https://github.com/lariad/offroad-nav/blob/main/mono_depth/src/depth_rescaling/VINS-Mono/camera_model/src/camera_models/CameraFactory.cc): `mono_depth/src/depth_rescaling/VINS-Mono/camera_model/src/camera_models/CameraFactory.cc`

### Mapping & Planning

- [Elevation Mapping](https://github.com/lariad/offroad-nav/blob/main/nav_stack/src/Barakuda/elevation_mapping_cupy/elevation_mapping_cupy/src/elevation_mapping_node.cpp): `nav_stack/src/Barakuda/elevation_mapping_cupy/elevation_mapping_cupy/src/elevation_mapping_node.cpp`
- [Plane Decomposition](https://github.com/lariad/offroad-nav/blob/main/nav_stack/src/Barakuda/elevation_mapping_cupy/plane_segmentation/convex_plane_decomposition/src/PlaneDecompositionPipeline.cpp): `nav_stack/src/Barakuda/elevation_mapping_cupy/plane_segmentation/convex_plane_decomposition/src/PlaneDecompositionPipeline.cpp`
- [Elevation Map](https://github.com/lariad/offroad-nav/blob/main/nav_stack/src/Barakuda/elevation_mapping_cupy/elevation_mapping_cupy/script/elevation_mapping_cupy/elevation_mapping.py): `nav_stack/src/Barakuda/elevation_mapping_cupy/elevation_mapping_cupy/script/elevation_mapping_cupy/elevation_mapping.py`
- **Path Planner**

### Robot Control

- [Mission Manager](https://github.com/lariad/offroad-nav/blob/main/nav_stack/src/Barakuda/barakuda_manager/src/barakuda_manager.cpp): `nav_stack/src/Barakuda/barakuda_manager/src/barakuda_manager.cpp`
- [Waypoint Action](https://github.com/lariad/offroad-nav/blob/main/nav_stack/src/Barakuda/waypoint_manager/src/waypoint_manager.cpp): `nav_stack/src/Barakuda/waypoint_manager/src/waypoint_manager.cpp`
- **move_base**
- [Gridmap Controller](https://github.com/lariad/offroad-nav/blob/main/nav_stack/src/Barakuda/mbf_gridmap/mbf_gridmap_core/include/mbf_gridmap_core/gridmap_controller.h): `nav_stack/src/Barakuda/mbf_gridmap/mbf_gridmap_core/include/mbf_gridmap_core/gridmap_controller.h`
- **UGV**
- [Teleoperation](https://github.com/lariad/offroad-nav/blob/main/nav_stack/src/Barakuda/barakuda_node/script/barakuda_joy.py): `nav_stack/src/Barakuda/barakuda_node/script/barakuda_joy.py`

### Other components

- **Operator**

## Connections

- Isaac Sim → Robot Sensors: publishes data
- Robot Sensors → Depth Estimation: images
- Depth Estimation → Depth Rescaling: depth output
- Depth Rescaling → Elevation Mapping: depth data
- Robot Sensors → LiDAR Odometry: LiDAR data
- LiDAR Odometry → Elevation Mapping: odometry
- Robot Sensors → Feature Tracking: camera images
- Feature Tracking → VINS Estimator: tracked features
- Camera Models → VINS Estimator: camera model
- Elevation Mapping → Elevation Map: updates
- Elevation Map → Plane Decomposition: elevation input
- Elevation Map → Path Planner: map data
- Operator → Mission Manager: mission / goal
- Mission Manager → Waypoint Action: sends path
- Waypoint Action → move_base: sends goals
- move_base → Gridmap Controller: controller execution
- Gridmap Controller → UGV: velocity commands
- Teleoperation → UGV: manual commands
- Path Planner → move_base: planned route
