How ibo-asv/njord2026_ws works
Purpose and execution model
This is a ROS 2 colcon workspace for an autonomous surface vessel (ASV): sensor ingestion, localization, perception, Nav2-based navigation, behavior-tree task control, thruster actuation, diagnostics, and task simulations. Primary integrated entry points are src/robot/launch/all.launch.py, src/robot/launch/localization.launch.py, and src/robot/launch/navigation.launch.py.
System integration and coordinate boundary
The robot package is the deployment composition layer: it owns the vessel URDF/TF setup, robot-localization EKF parameters, Nav2 parameters, and launch-level assembly. The coordinate convention is ENU, with base_link at the vessel; localization is expected to establish map/odom/base transforms before Nav2 operates.
• src/robot/launch/static_transform_publisher.launch.py
• src/robot/urdf/robot.urdf.xacro
• src/robot/config/ekf_global.yaml
Hardware and actuator boundary
ROS nodes isolate physical interfaces for GNSS, camera, LiDAR, IMU, battery/CAN, and propulsion. GNSS drivers support multiple receiver families; UM982 is a serial protocol implementation. The propulsion path terminates at a thruster driver that includes thrust allocation, separating high-level velocity commands from motor-level outputs.
• src/driver/gnss/um982_driver/src/node.cpp
• src/driver/micon/thruster_driver/src/allocation.cpp
• src/driver/micon/thruster_driver/launch/thruster_driver.launch.py
Localization and navigation
GNSS/IMU-derived pose and TF feed Nav2. Navigation accepts configured waypoints, represents detected buoys/field boundaries as obstacle data, plans/replans through Nav2 costmaps, and smooths paths through optional spline plugins/nodes. Navigation configuration is task-specific, rather than embedded in planning code.
• src/robot/launch/nav2.launch.py
• src/navigation/path_generator/waypoint_publisher/waypoint_publisher/waypoint_publisher_node.py
• src/navigation/buoy_obstacle_publisher/buoy_obstacle_publisher/buoy_obstacle_publisher_node.py
Perception pipeline
Two principal perception routes exist: point-cloud buoy detection and Python YOLO image inference. The ZED ROS wrapper and a local ZED2i driver provide camera integration; LiDAR support is vendored under drivers. Perception outputs are intended to become navigation-relevant buoy/obstacle information, but this is a ROS topic boundary rather than a direct library dependency.
• src/detection/pcl_det/src/pcl_bouy_det_node.cpp
• src/detection/yolo/yolo/main.py
• src/driver/camera/zed2i_driver/src/cpu_stereo_node.cpp
Mission behavior and interfaces
Mission-level control uses BehaviorTree XML task definitions and custom BT actions. system_manager is the C++ executable coordinating tree execution; its navigation and system-configuration plugins bridge declarative task flow to ROS actions/services. Custom interfaces are deliberately limited to vessel-specific messages and the configuration action.
• src/behavior/system_manager/src/main.cpp
• src/behavior/tree/task3.xml
• src/njord_interfaces/action/ConfigureSystem.action
Simulation, health, and runtime dependencies
Simulation can replace vessel dynamics and inject sensor noise, while task-specific orchestrators create evaluation scenarios. Diagnostics monitor topic heartbeats. The primary target is ROS 2 Humble on Ubuntu 22.04 with Nav2 and robot_localization; ZED requires the Stereolabs SDK/CUDA. Jetson YOLO runs in an isolated Python venv to avoid ROS/ZED NumPy and OpenCV conflicts. Foxglove is the recommended ROS visualization client.
• src/sim/dutyed_tf_pub_with_disturbance/launch/sim_dynamics.launch.py
• src/sim/task3_sim/task3_sim/orchestrator.py
• src/diagnostics/diagnostic_monitors/src/topic_heartbeat_monitor_node.cpp
Main entry points: all.launch.py Integrated launch · ekf_global.yaml Global EKF · main.cpp System manager · buoy_obstacle_publisher_node.py Buoy obstacle publisher
Components 21
Robot deployment
- Integrated launch · Composes the vessel runtime.
src/robot/launch/all.launch.py - Vessel URDF / TF · Defines the base_link vessel frame.
src/robot/urdf/robot.urdf.xacro - Static transforms
src/robot/launch/static_transform_publisher.launch.py - Global EKF · Establishes map/odom/base transforms in ENU.
src/robot/config/ekf_global.yaml
Hardware interfaces
- Thruster driver · Separates velocity commands from motor outputs.
src/driver/micon/thruster_driver/launch/thruster_driver.launch.py - Thrust allocation
src/driver/micon/thruster_driver/src/allocation.cpp - Vessel hardware · GNSS, IMU, LiDAR, camera, battery/CAN, and thrusters.
- UM982 GNSS driver · Serial receiver protocol implementation.
src/driver/gnss/um982_driver/src/node.cpp - ZED2i driver
src/driver/camera/zed2i_driver/src/cpu_stereo_node.cpp
Perception
- Point-cloud buoy detection
src/detection/pcl_det/src/pcl_bouy_det_node.cpp - YOLO inference · Runs in an isolated Jetson Python environment.
src/detection/yolo/yolo/main.py
Navigation
- Nav2 launch · Starts configured Nav2 navigation.
src/robot/launch/nav2.launch.py - Waypoint publisher
src/navigation/path_generator/waypoint_publisher/waypoint_publisher/waypoint_publisher_node.py - Buoy obstacle publisher · Publishes buoy and field-boundary obstacle data.
src/navigation/buoy_obstacle_publisher/buoy_obstacle_publisher/buoy_obstacle_publisher_node.py - Nav2 planner and costmaps · Plans and replans around obstacle data.
Mission and operations
- System manager · Coordinates behavior-tree task execution.
src/behavior/system_manager/src/main.cpp - Task 3 behavior tree · Declarative mission flow.
src/behavior/tree/task3.xml - ConfigureSystem action · Vessel-specific configuration interface.
src/njord_interfaces/action/ConfigureSystem.action
Simulation and health
- Simulation dynamics · Can replace vessel dynamics and inject sensor noise.
src/sim/dutyed_tf_pub_with_disturbance/launch/sim_dynamics.launch.py - Task simulation orchestrator
src/sim/task3_sim/task3_sim/orchestrator.py - Topic heartbeat monitor
src/diagnostics/diagnostic_monitors/src/topic_heartbeat_monitor_node.cpp
Connections 25
- Integrated launch → Vessel URDF / TF: loads
- Integrated launch → Static transforms: starts
- Integrated launch → Global EKF: starts
- Integrated launch → Nav2 launch: starts
- Vessel URDF / TF → Static transforms: frame definitions
- UM982 GNSS driver → Global EKF: GNSS pose
- Vessel hardware → UM982 GNSS driver: GNSS data
- Vessel hardware → ZED2i driver: camera data
- Vessel hardware → Global EKF: IMU data
- Global EKF → Nav2 planner and costmaps: map/odom/base TF and pose
- Nav2 launch → Nav2 planner and costmaps: configures
- Waypoint publisher → Nav2 planner and costmaps: navigation goals
- Buoy obstacle publisher → Nav2 planner and costmaps: costmap obstacles
- Point-cloud buoy detection → Buoy obstacle publisher: buoy detections · ROS topic boundary.
- ZED2i driver → YOLO inference: images
- YOLO inference → Buoy obstacle publisher: buoy detections · ROS topic boundary.
- Nav2 planner and costmaps → Thruster driver: velocity commands
- Thruster driver → Thrust allocation: runs
- Thrust allocation → Vessel hardware: motor outputs
- Task 3 behavior tree → System manager: defines mission
- System manager → Waypoint publisher: requests navigation
- System manager → ConfigureSystem action: uses
- Task simulation orchestrator → Simulation dynamics: creates scenario
- Simulation dynamics → Vessel hardware: replaces dynamics and sensors
- Topic heartbeat monitor → Integrated launch: monitors runtime topics