Robotics - ROS2 Tools

Ros2 Doctor, Ros2 Topic, Ros2 Multicast

Posted by Rico's Nerd Cluster on November 5, 2024

ROS 2 Doctor

References: ROS2 Doctro

ROS2 Doctor is a diagnostic tool that succeeds ros wtf (where is the fault). It checks all aspects of ROS 2, including platform, version, network, environment, running systems. It’s part of the ros2cli package. So if ros2cli is installed, ROS2doctor is installed.

What Does ROS2 Doctor Check?

One can see ros2 doctor --report

  • Package versioning, such as tf2_bullet
  • NETWORK CONFIGURATION, items like:
    • inet : 192.168.1.65
  • PLATFORM INFORMATION, items like:
    • like platform info : Linux-6.9.3-76060903-generic-x86_64-with-glibc2.35
  • QOS COMPATIBILITY LIST
    • compatibility status : No publisher/subscriber pairs found
  • ROS 2 INFORMATION:
    • distribution name : humble
  • TOPIC LIST
    • Existence of “dangling” topics without subscribers.

One can check failed checks only (report fail): ros2 doctor -rf. Reference

What ros2 doctor Can’t Detect

  • I had a mix of ROS2 Iron and ROS2 Humble
    • ROS 2 Iron cannot directly listen to ROS 2 Humble messages due to ABI incompatibility and other changes between ROS 2 distributions. E.g.,
      • sensor_msgs that has different symbols or behavior in Iron

Ros2 Topic

In ROS 2 design, it’s generally good to keep in mind what QoS we might need for each topic

  • ros2 topic echo /your_topic --qos-reliability best_effort
    • Messages might be dropped if the subscriber cannot keep up or if the network connection is unreliable.

Multicast

This command is a diagnostic tool that’s often used in ROS 2 for discovery and communication between nodes

  • ros2 multicast receive