Urgent.News

What's breaking now, across thousands of outlets.

Tech

ROS 2 QoS Profiles: Reliable vs Best-Effort Robot Communication

ROS 2 QoS Profiles: Reliable vs Best-Effort Robot Communication Robot systems continuously exchange data with very different requirements. A dropped camera frame is usually acceptable. A dropped emergency command may not be. ROS 2 Quality of Service (QoS) lets you express these requirements. The Two Common Reliability Modes Reliable Reliable communication attempts to ensure that samples reach…

Robot systems require constant data exchange with varying needs. Dropped camera frames are usually fine, but missing emergency commands may not be. ROS 2 Quality of Service (QoS) allows expressing these needs. There are two primary reliability modes: Reliable and Best Effort.

Reliable communication strives to ensure samples reach compatible subscribers. It's useful for commands, configuration, important state transitions, and critical application data. On the other hand, Best Effort prioritizes timely delivery and might tolerate lost samples. Best suited for camera frames, LiDAR, high-frequency IMU streams, and other continuously refreshed sensor data.

Consider a camera capturing 30 frames per second. Losing frame 100 might still allow processing frame 101. However, for a command like MOVE_FORWARD, losing the message can be unacceptable. Hence, a camera would typically use Best Effort, while a command would use Reliable.

QoS (Quality of Service) settings in ROS 2 encompass more than just reliability. Other important policies include durability, history, depth, deadline, lifespan, and liveliness. The following C++ example demonstrates setting sensor data QoS:

auto sensor_qos = rclcpp::SensorDataQoS();

auto publisher = create_publisher <sensor_msgs::msg::Image> ("/camera/image", sensor_qos);

For important application data, you could explicitly configure reliable communication:

auto qos = rclcpp::QoS (rclcpp::KeepLast (10)). reliable();

auto publisher = create_publisher <std_msgs::msg::String> ("/robot/status", qos);

For a publisher and subscriber to communicate effectively, they must have compatible QoS settings. A frequent error is using Best Effort on the publisher and Reliable on the subscriber, or vice versa, causing message loss. Always verify the effective QoS on both ends.

Remember, a publisher and subscriber need to have matching QoS settings. Starting points for QoS settings include:

- Camera image: Best Effort

- Point cloud: Best Effort

- IMU: Best Effort

- Navigation command: Reliable

- Robot state: Reliable

- Diagnostics: Reliable

These are starting points, not strict rules. Debugging QoS involves checking topic existence, QoS, reliability, durability, history/depth, network discovery, and testing with a compatible subscriber. QoS is a crucial part of the application contract. It should be treated as an architectural decision rather than a random setting when communication fails.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Building a High-Performance Robot Communication System with DDS

Building a High-Performance Robot Communication System with DDS Modern robots may have dozens of processes distributed across CPUs, edge computers, and embedded devices.

  • DDS technology foundational to ROS 2 communication
  • DDS offers tools for Discovery, Reliability, Durability
  • High-performance design distinguishes topics by performance priorities

Visual-Inertial Odometry for Autonomous Robots

Visual-Inertial Odometry for Autonomous Robots A robot needs to estimate how it moves through the world. GPS is unavailable indoors, wheel odometry can slip, and LiDAR may not always be available.

  • Visual-Inertial Odometry (VIO) enables robots to determine motion without GPS.
  • Combines visual data from cameras and IMU measurements for trajectory estimation.
  • Proper initialization crucial for accurate VIO performance.

Building a Real-Time SLAM System for Mobile Robots

Building a Real-Time SLAM System for Mobile Robots SLAM means Simultaneous Localization and Mapping . A mobile robot must answer two questions: Where am I? What does the environment look like?

  • SLAM technology enables robots to determine location and map surroundings simultaneously.
  • Real-time performance crucial, monitoring sensor processing latency and map update time.
  • Trade-off between resolution and computational cost, based on robot size and environment.

Open-Vocabulary Object Detection for Robots Using Vision-Language Models

Open-Vocabulary Object Detection for Robots Using Vision-Language Models Traditional object detectors are trained on a fixed set of classes.

  • Vision-language models generate object regions, verified by 3D localization for robot planners.
  • Modern robot operating systems enable modular integration of VLM detector with other components.

More from Monday 31 August →