How bthek1/ros2_pi works
ros2_pi is a ROS 2 monocular visual-odometry and dense-mapping system: a moving RGB camera supplies frames; tracking estimates camera pose while monocular inference estimates depth; mapping fuses those into a mesh viewed in a browser dashboard. The README explicitly notes there is no loop closure, pose graph, or relocalisation, so this is not a complete SLAM loop. The graph includes documented dataset replay and camera calibration capabilities. Some subsystem wiring is based on README and launch documentation because those implementation files were not sampled.
Main entry points: pimesh.launch.py ROS bringup · odometry_node.cpp Pose estimation · fusion_node.cpp TSDF fusion · depth_node.cpp Depth node
Components 22
Capture and bringup
- Camera capture
src/pimesh_camera/src/camera_node.cpp - ROS bringup
src/pimesh_bringup/launch/pimesh.launch.py - Camera calibration
tools/calib/calib_solve.py
Visual tracking
- Frame decode
src/pimesh_frontend/src/decode_node.cpp - ORB keypoints
src/pimesh_frontend/src/keypoint_node.cpp - Pose estimation
src/pimesh_frontend/src/odometry_node.cpp - Keyframe store
src/pimesh_frontend/src/keyframe_store.cpp
Depth inference
- Depth node
src/pimesh_depth/src/depth_node.cpp - Depth engine
src/pimesh_depth/src/depth_engine_ort.cpp
Dense mapping
- TSDF fusion
src/pimesh_mapping/src/fusion_node.cpp - TSDF volume
src/pimesh_mapping/src/tsdf_volume.cpp - Shared volume
src/pimesh_mapping/src/shared_volume.cpp - Mesh extraction
src/pimesh_mapping/src/mesh_node.cpp - Mesh processing
src/pimesh_mapping/src/marching_cubes.cpp
Replay and dashboard
- Dataset replay
src/pimesh_dataset/src/dataset_node.cpp - Dataset reader
src/pimesh_dataset/src/dataset_reader.cpp - Dashboard node
src/pimesh_dashboard/src/dashboard_node.cpp - Web server
src/pimesh_dashboard/src/web_server.cpp - WebSocket
src/pimesh_dashboard/src/websocket.cpp
Other components
- RGB camera
- Browser viewer
src/pimesh_dashboard/web/app.js - ONNX model
Connections 32
- RGB camera → Camera capture: captures frames
- Camera capture → Frame decode: publishes JPEG
- Camera capture → Pose estimation: publishes intrinsics
- Camera capture → TSDF fusion: publishes intrinsics
- ROS bringup → Frame decode: loads component
- ROS bringup → ORB keypoints: loads component
- ROS bringup → Pose estimation: loads component
- ROS bringup → Depth node: loads component
- ROS bringup → TSDF fusion: loads component
- ROS bringup → Mesh extraction: loads component
- Frame decode → ORB keypoints: publishes frames
- Frame decode → Depth node: publishes frames
- ORB keypoints → Pose estimation: publishes tracks
- Pose estimation → Keyframe store: updates keyframes
- Depth node → Depth engine: runs inference
- ONNX model → Depth engine: provides weights
- Depth node → TSDF fusion: publishes depth and RGB
- Pose estimation → TSDF fusion: publishes poses
- TSDF fusion → Shared volume: accesses volume
- Shared volume → TSDF volume: shares TSDF
- Mesh extraction → Shared volume: reads volume
- Mesh extraction → Mesh processing: extracts surface
- Mesh extraction → Dashboard node: publishes mesh
- Depth node → Dashboard node: publishes status and images
- Pose estimation → Dashboard node: publishes pose and stats
- TSDF fusion → Dashboard node: publishes stats
- Dataset replay → Dataset reader: reads recordings
- Dataset reader → Frame decode: replays frames
- Dashboard node → Web server: serves dashboard
- Web server → WebSocket: dispatches messages
- WebSocket → Browser viewer: streams updates
- Browser viewer → Web server: requests actions