ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
If you check the QoS profile for sensor_data
you will see that reliability is set to the best effort:
https://github.com/ros2/rclcpp/blob/f160a8bc1d2b4f9a9fb0bba23d0b5d0f8c1afaab/rclcpp/include/rclcpp/qos.hpp#L168
Now, if you add a new visualization to RViz2 it will have reliability policy set to Reliable
by default:
https://i.imgur.com/l6JzQlE.png
Therefore, just change reliability to Best Effort
:
https://i.imgur.com/WVnTjTb.png
If you want to test, you can set --qos-profile
to ros2 topic pub
as:
ros2 topic pub --qos-profile=sensor_data /topic sensor_msgs/Range '{ range: 1, header: { frame_id: base_link } }'
2 | No.2 Revision |
If you check the QoS profile for sensor_data
you will see that reliability is set to the best effort:
https://github.com/ros2/rclcpp/blob/f160a8bc1d2b4f9a9fb0bba23d0b5d0f8c1afaab/rclcpp/include/rclcpp/qos.hpp#L168
Now, if you add a new visualization to RViz2 it will have reliability policy set to Reliable
by default:
Therefore, just change reliability to Best Effort
:
If you want to test, you can set --qos-profile
to ros2 topic pub
as:
ros2 topic pub --qos-profile=sensor_data /topic sensor_msgs/Range '{ range: 1, header: { frame_id: base_link } }'