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 interface Target 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 ACQUIRE 02 ESTIMATE 03 PLAN & CONTROL 04 OBSERVE
Drive ESP32 Wheel + turret encoders · IMU
UART
hamr_uros_bridge Serial packets ↔ ROS topics
holonomic_odom_node Encoder motion → odometry
/…/encoder_ticks
ekf_filter_node Wheel velocity + IMU fusion
/wheel_odom
/imu/data
continuous_waypoint Smooth, bounded references
hamr_controller_node Pose PID + inverse kinematics
/reference_trajectory
pose*
wheel / turret rate commands
d455_camera Color + aligned depth + IMU
rtabmap Visual map + loop closures
RGB-D
odom → base_link
Nav2 + motion adapter Map → route → body command
map
H1 · H2 · CENTER Three independent encoder ESPs
caster_encoder_bridge Angles + validity + raw packets
UDP
Vicon reference /HAMR_base/odom Hardware test feedback*
rosbag2 recorder Commands · pose · sensors foxglove_bridge / RViz
Caster CAD replay Recorded 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 Topic Message Publisher → consumer
/reference_trajectoryhamr_interfaces/ReferenceTrajTrajectory publisher / map adapter → controller
/left_wheel/cmd_vel/right_wheel/cmd_vel/turret/cmd_velstd_msgs/Float64Controller → serial bridge → ESP; actuator rates in rad/s
/left_wheel/encoder_ticks/right_wheel/encoder_ticks/turret/encoder_ticksstd_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/odomnav_msgs/OdometryVicon base reference / encoder-derived turret estimate → hardware controller
/imu/mag/imu/calib_statussensor_msgs/MagneticFieldstd_msgs/UInt8MultiArraySerial bridge → calibration and analysis
/wheel_control/status/wheel_encoder/diagnosticsstd_msgs/Float64MultiArraySerial bridge → motor and quadrature diagnostics
/live_gainshamr_interfaces/LiveGainsController → tuning visualizations
/continuous_waypoint/path/continuous_waypoint/status/continuous_waypoint/metadatanav_msgs/Pathstd_msgs/StringPlanner → experiment monitoring; start/stop are Trigger services
Caster measurement and reconstruction Topic Message Purpose
/caster_encoder/packetsstd_msgs/StringRaw validated JSON envelopes, sample clocks, flags, and counters
/caster_encoder/metadata/caster_encoder/diagnosticsstd_msgs/StringPer-board configuration, boot IDs, sequence tracking, and freshness
/caster_encoder/H1/joint_states/caster_encoder/H2/joint_states/caster_encoder/CENTER/joint_statessensor_msgs/JointStateValid angles and independently valid angular velocities
/caster_replay/packets/caster_replay/joint_statesstd_msgs/Stringsensor_msgs/JointStateBag input → reconstructed CAD joints
/caster_replay/status/caster_replay/status_marker/caster_replay/phase_markersstd_msgs/Stringvisualization_msgs/Markervisualization_msgs/MarkerArrayReconstruction validity and orientation markers
/caster_replay/tf/caster_replay/tf_statictf2_msgs/TFMessageIsolated replay transforms from /caster_replay/state_publisher
RGB-D mapping and autonomous navigation Nav2 target Topic / interface Message Purpose
/d455/color/image_raw/d455/depth/image_rect_rawsensor_msgs/ImageColor and aligned depth → RTAB-Map
/d455/color/camera_infosensor_msgs/CameraInfoCamera calibration → projection and visual estimation
/d455/imu_raw/d455/imusensor_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/mapgeometry_msgs/PoseWithCovarianceStampednav_msgs/OccupancyGridRTAB-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_posenav_msgs/Pathgeometry_msgs/Twist or stamped variantnav2_msgs/NavigateToPose actionTarget Nav2 route, body velocity, and navigation goal; adapt the selected velocity contract to HAMR kinematics
/global_costmap/costmap/local_costmap/costmapnav_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 Topic Message Publisher / profile
/clock/joint_states/compa/odomrosgraph_msgs/Clocksensor_msgs/JointStatenav_msgs/OdometryGazebo → parameter_bridge
/roll/cmd_vel/pitch/cmd_vel/yaw/cmd_velstd_msgs/Float64compa_controller_node → simulated gimbal
/tf/tf_static/robot_descriptiontf2_msgs/TFMessagestd_msgs/StringState publisher, EKF, camera transforms, and selected simulation bridge
/costmap/costmap_image/height_image/elevation_mapnav_msgs/OccupancyGridsensor_msgs/Imagegrid_map_msgs/GridMapterrain_map_publisher / png_costmap_publisher
/initialpose/goal_pose/astar_path/astar_debugPose input · Path · Marker astar_on_costmap terrain-planning profile
/prm/nodes/prm/edges/prm/adjacency/map_inflatedMarker · Int32MultiArray · OccupancyGrid prm_builder optional roadmap profile
/astar/path/astar/exploredPath · Marker astar_planner optional 2D map profile
/compa/path/compa/path_markerPath · Marker compa_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 →