01 / Software architecture

From sensing to motion.

A shared ROS 2 interface connects the physical robot, its simulated counterpart, and the measurements used to compare them.

The system at a glance

One control loop. Separate measurement paths.

The diagram brings the hardware, localization, and experiment profiles together. Each run enables the nodes it needs.

Repository interfaceTarget autonomy integration
HAMR grouped ROS 2 node and topic graph The drive ESP connects by UART to hamr_uros_bridge. Encoder ticks feed holonomic_odom_node and wheel odometry joins IMU data in ekf_filter_node. A waypoint planner sends references to hamr_controller_node, which returns wheel and turret commands to the bridge. D455 images and depth feed RTAB-Map. Dashed target connections add Nav2. Independent H1, H2 and CENTER boards send UDP to caster_encoder_bridge for recording and replay. 01 ACQUIRE02 ESTIMATE03 PLAN & CONTROL04 OBSERVE Drive ESP32Wheel + turret encoders · IMU UART hamr_uros_bridgeSerial packets ↔ ROS topics holonomic_odom_nodeEncoder motion → odometry /…/encoder_ticks ekf_filter_nodeWheel velocity + IMU fusion /wheel_odom /imu/data continuous_waypointSmooth, bounded references hamr_controller_nodePose PID + inverse kinematics /reference_trajectory pose* wheel / turret rate commands d455_cameraColor + aligned depth + IMU rtabmapVisual map + loop closures RGB-D odom → base_link Nav2 + motion adapterMap → route → body command map H1 · H2 · CENTERThree independent encoder ESPs caster_encoder_bridgeAngles + validity + raw packets UDP Vicon reference/HAMR_base/odomHardware test feedback* rosbag2 recorderCommands · pose · sensorsfoxglove_bridge / RViz Caster CAD replayRecorded joints → transforms /caster_encoder/packets *Select one feedback source: Vicon for the default hardware trial; onboard localization for autonomous operation.
01 — Functional graph assembled from the launch profiles. The caster measurement branch records passive motion independently of motor control.

Node groups

What each part does.

Acquisition

hamr_uros_bridge
Exchanges motor rates, encoder counts, and IMU packets with the drive ESP.
caster_encoder_bridge
Receives H1, H2, and CENTER telemetry over Wi-Fi; retains timing and validity.
d455_camera · d455_imu_filter
Publishes RGB-D observations and an optional filtered camera IMU.

Localization

holonomic_odom_node
Converts wheel and turret counts into motion estimates.
ekf_filter_node
Fuses wheel motion and the chassis IMU into continuous local odometry.
rtabmap · rgbd_odometry
Builds or revisits a visual map; RGB-D odometry is an optional source.

Motion

continuous_waypoint
Blends corners and limits speed, acceleration, and jerk.
map_reference_to_odom
Expresses map-frame references in the controller's local frame.
hamr_controller_node
Tracks position and heading, then computes wheel and turret rates.

Simulation

parameter_bridge
Connects Gazebo state and actuator topics to ROS 2.
compa_controller_node
Runs the simulation chassis controller, including gimbal axes.
robot_state_publisher
Publishes the robot's link transforms from joint positions.

Terrain planning

terrain_map_publisher
Publishes occupancy, height, and elevation layers.
astar_on_costmap
Finds an off-road route subject to slope and step limits.
Nav2 servers Target
Plan and follow obstacle-aware routes using the mapped environment.

Experiment tools

rosbag2 · record_hamr_test_bag
Stores commands and measurements for paired analysis.
replay_caster_encoder_joints
Reconstructs caster joints from recorded telemetry.
foxglove_bridge · rviz2
Displays live topics, trajectories, transforms, and recorded motion.

Interface reference

Topics, grouped by purpose.

Names below reflect the repository defaults. Expand a group for message types and endpoints.

Hardware control and localization
TopicMessagePublisher → consumer
/reference_trajectoryhamr_interfaces/ReferenceTrajTrajectory publisher / map adapter → controller
/left_wheel/cmd_vel
/right_wheel/cmd_vel
/turret/cmd_vel
std_msgs/Float64Controller → serial bridge → ESP; actuator rates in rad/s
/left_wheel/encoder_ticks
/right_wheel/encoder_ticks
/turret/encoder_ticks
std_msgs/Int32Serial bridge → wheel/turret odometry
/imu/datasensor_msgs/ImuSerial bridge → EKF
/wheel_odomnav_msgs/OdometryHolonomic odometry → EKF
/local_HAMR/odomnav_msgs/OdometryEKF → onboard localization / optional control feedback
/HAMR_base/odom
/HAMR_turret/odom
nav_msgs/OdometryVicon base reference / encoder-derived turret estimate → hardware controller
/imu/mag
/imu/calib_status
sensor_msgs/MagneticField
std_msgs/UInt8MultiArray
Serial bridge → calibration and analysis
/wheel_control/status
/wheel_encoder/diagnostics
std_msgs/Float64MultiArraySerial bridge → motor and quadrature diagnostics
/live_gainshamr_interfaces/LiveGainsController → tuning visualizations
/continuous_waypoint/path
/continuous_waypoint/status
/continuous_waypoint/metadata
nav_msgs/Path
std_msgs/String
Planner → experiment monitoring; start/stop are Trigger services
Caster measurement and reconstruction
TopicMessagePurpose
/caster_encoder/packetsstd_msgs/StringRaw validated JSON envelopes, sample clocks, flags, and counters
/caster_encoder/metadata
/caster_encoder/diagnostics
std_msgs/StringPer-board configuration, boot IDs, sequence tracking, and freshness
/caster_encoder/H1/joint_states
/caster_encoder/H2/joint_states
/caster_encoder/CENTER/joint_states
sensor_msgs/JointStateValid angles and independently valid angular velocities
/caster_replay/packets
/caster_replay/joint_states
std_msgs/String
sensor_msgs/JointState
Bag input → reconstructed CAD joints
/caster_replay/status
/caster_replay/status_marker
/caster_replay/phase_markers
std_msgs/String
visualization_msgs/Marker
visualization_msgs/MarkerArray
Reconstruction validity and orientation markers
/caster_replay/tf
/caster_replay/tf_static
tf2_msgs/TFMessageIsolated replay transforms from /caster_replay/state_publisher
RGB-D mapping and autonomous navigation Nav2 target
Topic / interfaceMessagePurpose
/d455/color/image_raw
/d455/depth/image_rect_raw
sensor_msgs/ImageColor and aligned depth → RTAB-Map
/d455/color/camera_infosensor_msgs/CameraInfoCamera calibration → projection and visual estimation
/d455/imu_raw
/d455/imu
sensor_msgs/ImuCamera inertial stream → optional Madgwick orientation filter → SLAM
/d455/depth/color/pointssensor_msgs/PointCloud2Optional camera point cloud
/odomnav_msgs/OdometryOptional rgbd_odometry output
/localization_pose
/map
geometry_msgs/PoseWithCovarianceStamped
nav_msgs/OccupancyGrid
RTAB-Map localization and occupancy output; configured remaps may differ
/reference_trajectory_maphamr_interfaces/ReferenceTrajMap reference → map_reference_to_odom → local control reference
/plan
/cmd_vel
/navigate_to_pose
nav_msgs/Path
geometry_msgs/Twist or stamped variant
nav2_msgs/NavigateToPose action
Target Nav2 route, body velocity, and navigation goal; adapt the selected velocity contract to HAMR kinematics
/global_costmap/costmap
/local_costmap/costmap
nav_msgs/OccupancyGridTarget Nav2 planning and near-field obstacle layers

Target node set: planner_server, controller_server, bt_navigator, behavior_server, waypoint_follower, velocity_smoother, and lifecycle management. This template does not claim that Nav2 is part of the current hardware launch.

Simulation, terrain planning, and visualization
TopicMessagePublisher / profile
/clock
/joint_states
/compa/odom
rosgraph_msgs/Clock
sensor_msgs/JointState
nav_msgs/Odometry
Gazebo → parameter_bridge
/roll/cmd_vel
/pitch/cmd_vel
/yaw/cmd_vel
std_msgs/Float64compa_controller_node → simulated gimbal
/tf
/tf_static
/robot_description
tf2_msgs/TFMessage
std_msgs/String
State publisher, EKF, camera transforms, and selected simulation bridge
/costmap
/costmap_image
/height_image
/elevation_map
nav_msgs/OccupancyGrid
sensor_msgs/Image
grid_map_msgs/GridMap
terrain_map_publisher / png_costmap_publisher
/initialpose
/goal_pose
/astar_path
/astar_debug
Pose input · Path · Markerastar_on_costmap terrain-planning profile
/prm/nodes
/prm/edges
/prm/adjacency
/map_inflated
Marker · Int32MultiArray · OccupancyGridprm_builder optional roadmap profile
/astar/path
/astar/explored
Path · Markerastar_planner optional 2D map profile
/compa/path
/compa/path_marker
Path · Markercompa_path_tracer optional trajectory view

Additional profile utilities include ros_gz_sim/create, ground_truth_tf_bridge, static_map_to_odom, imu_link_static_tf, static_base_to_d455, rtabmap_viz, and optional PID/odometry plotters. Standard ROS discovery and parameter topics are omitted.

Follow the perception and navigation pipeline →