ROS 2 CLI Cheatsheet, DDS Discovery & Error Code Troubleshooting (Humble/Jazzy)

ROS 2 Humble / Jazzy · Global Reference Hub

ROS 2 CLI Cheatsheet, DDS Discovery & Error Code Troubleshooting (Humble/Jazzy)

Interactive QoS/DDS compatibility checker + searchable ROS 2 CLI, TF2, DDS discovery, and ros2_control troubleshooting table.

COMPATIBLE — Stream Active

Interactive ROS 2 QoS & DDS Env Builder

export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp && export ROS_DOMAIN_ID=10

Publisher (RELIABLE / VOLATILE) satisfies Subscriber (RELIABLE / VOLATILE). Ready for deterministic topic transport.

Showing 32 of 32 ROS 2 diagnostics

CategoryCommand / Error SignatureMeaning / Root CauseEngineering Fix
CLI & Nodesros2 node list / info <node>Inspect active nodes, subscribers, publishers, and servicesVerify node namespace and remappings
CLI & Nodesros2 topic hz /scanMeasure real-time LiDAR or camera publish rate (Hz)Check CPU load or USB/Ethernet bandwidth if < target Hz
CLI & Nodesros2 topic bw /camera/image_rawMeasure topic bandwidth consumption in MB/sSwitch to image_transport compressed or intra-process zero-copy
CLI & Nodesros2 topic echo <topic> –oncePrint single message payload without flooding terminalConfirm header.frame_id and header.stamp match robot clock
CLI & Nodesros2 param dump /controller_managerExport live YAML parameter tree for debuggingDiff against bringup config YAML for typoed param names
CLI & Nodesros2 service call /trigger std_srvs/srv/TriggerInvoke service manually from CLIVerify server availability with ros2 service list -t
CLI & Nodesros2 action send_goal /navigate_to_pose …Test Nav2 or MoveIt action servers directlyCheck feedback stream and goal cancellation status
CLI & Nodesros2 bag record -o run1 /tf /tf_static /scan /odomCapture deterministic sensor & TF playback bagAdd –storage mcap in Humble/Jazzy for fast random-access playback
CLI & Nodesros2 doctor –reportAudit middleware, network interfaces, and package versionsFix WARN items on multicast or stale env variables
CLI & Nodesros2 pkg prefix <pkg_name>Confirm workspace overlay sourced correctlyAlways run source install/setup.bash in every terminal
DDS DiscoveryRMW_IMPLEMENTATION=rmw_cyclonedds_cppSwitch DDS middleware to CycloneDDSFixes Wi-Fi/multi-host discovery stalls on large PointCloud2 topics
DDS DiscoveryROS_DOMAIN_ID=42Isolate robot fleet traffic on a dedicated UDP port rangeKeep IDs between 0-101; mismatched IDs cause silent empty topic lists
DDS DiscoveryROS_LOCALHOST_ONLY=1 (Humble) / ROS_AUTOMATIC_DISCOVERY_RANGE=LOCALHOST (Jazzy)Confine DDS traffic to loopback interfacePrevents lab robots on same Wi-Fi from hijacking each other
DDS DiscoveryQoS Incompatible Offer (RELIABLE vs BEST_EFFORT)Subscriber stays silent despite topic appearing in topic listRun ros2 topic info -v <topic> and align Reliability & Durability QoS
DDS DiscoveryFastDDS SHM Port Lock / File CorruptNodes hang at startup after SIGKILL crashClear /dev/shm/fastrtps_* or configure UDPv4 transport XML
DDS DiscoveryMulticast Blocked on Linux UFW / DockerRemote RViz2 sees no topics from robot SBCEnable UDP multicast (ufw allow proto udp) or use Docker –net=host
TF2 & TransformsLookup would require extrapolation into the futureNode timestamp ahead of TF buffer clockSync clocks via chrony/NTP and verify consistent use_sim_time
TF2 & TransformsLookup would require extrapolation into the pastTF buffer too short or static broadcaster not runningVerify robot_state_publisher and increase tf2 cache_time_sec
TF2 & TransformsCould not find a connection between map and base_linkBroken TF tree between AMCL/SLAM, odom, and base_linkRun ros2 run tf2_tools view_frames to inspect disconnected subtrees
TF2 & Transformsros2 run tf2_ros tf2_echo base_link laser_frameVerify live 6-DoF translation (m) and rotation (deg/rad)Confirm static LiDAR mounting offset matches physical CAD (mm / in)
TF2 & TransformsDuplicate /tf broadcasters jittering RViz modelTwo nodes publishing odom->base_link simultaneouslyDisable wheel odom TF if robot_localization EKF publishes odom->base_link
ros2_controlController spawner waiting for /controller_managerURDF missing <ros2_control> plugin tag or node crashedInspect controller_manager logs and verify hardware pluginlib XML
ros2_controlCould not switch controllers: hardware interface claimedTwo controllers attempting to command same joint velocity/positionDeactivate conflicting controller with ros2 control switch_controllers
ros2_controlros2 control list_hardware_interfacesCheck claimed vs unclaimed state/command interfacesConfirm joint names in YAML match URDF <joint name="…"> exactly
ros2_controlReal-time loop overrun / jitter on EtherCAT or CANNon-PREEMPT_RT kernel or blocking I/O inside write()Isolate CPU core (isolcpus), enable PREEMPT_RT, and avoid heap alloc in loop
ros2_controlJointTrajectoryController goal aborted: path toleranceEncoder scaling or PID gains cause following error exceedanceTune trajectory_tolerance and verify gear ratio / ticks_per_rev
Nav2 & MoveIt 2Nav2 costmap warning: Sensor origin out of map boundsRobot pose jumped or map origin too smallCheck AMCL initial_pose and rolling_window costmap dimensions (m / ft)
Nav2 & MoveIt 2Nav2 robot spinning in place (recovery loop)Inflation radius exceeds corridor clearance or footprint too largeVerify robot_radius / footprint (m / in) and inflation_radius margin
Nav2 & MoveIt 2MoveIt 2: Unable to sample any valid states for goal treeTarget pose outside reach, joint limits violated, or self-collisionCheck SRDF disable_collisions matrix and IK solver timeout
Nav2 & MoveIt 2MoveIt 2: Controller failed with error code -4 (TOLERANCE)Physical joint settled outside goal_time or goal_toleranceIncrease constraints/goal_time or calibrate joint zero offsets
Nav2 & MoveIt 2Gazebo Harmonic / Humble clock frozen (/clock missing)ros_gz_bridge not bridging /clock topicBridge /clock@rosgraph_msgs/msg/Clock[gz.msgs.Clock and set use_sim_time:=true
Nav2 & MoveIt 2colcon build –symlink-install –cmake-args -DCMAKE_BUILD_TYPE=ReleaseBuild ROS 2 C++ nodes with full O3 optimizationEssential for real-time PCL, SLAM, and MoveIt collision checking
Grow Your Robotics / Automation Brand Online with Jaadu Digital Technical SEO, B2B lead generation, and engineering content systems built for robotics integrators and OEMs.
Explore Jaadu Digital →

Frequently Asked Engineering Questions

Why does ros2 topic list show nothing across two Ubuntu machines?

Confirm both machines share the exact same ROS_DOMAIN_ID (0-101), UDP multicast is allowed through ufw firewall, and ROS_LOCALHOST_ONLY / ROS_AUTOMATIC_DISCOVERY_RANGE is not isolating localhost.

How do I fix TF2 Extrapolation Error into the future or past?

Synchronize system clocks using chrony/NTP across SBC and workstation, set use_sim_time consistently across all nodes, and increase transform_tolerance in Nav2 or MoveIt.

When should I switch from FastDDS to CycloneDDS in ROS 2?

If large camera/point-cloud messages stall discovery over Wi-Fi or shared-memory segments lock up after node crashes, switching RMW_IMPLEMENTATION=rmw_cyclonedds_cpp often stabilizes discovery.