ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

problem to read topics with sensorQos in rviz and rqt

asked 2020-08-04 10:10:32 -0600

remlog gravatar image

updated 2022-06-11 10:38:27 -0600

lucasw gravatar image

Gazebo plugins which use SensorDataQoS are not read by rviz or rqt (ros topic plugin), I think that the problem is SensorDataQoS of the sensor plugin which have been included one month ago in gazebo_ros_pkgs

I can read the lidar topic in through cli but it does not work in rviz or rqt.

it is ok :Read the topic through using ros2 topic echo /dolly/lidar do not work: add the plugin laser_scan in rviz2 do not work: view the topic through topic monitor in rqt

The same is happening in other sensor of ros gazebo_pkg like likelibgazebo_ros_gps_sensor or libgazebo_ros_p3d, but it did not happen with libgazebo_ros_joint_state_publisher or libgazebo_ros_diff_drive.

I have tested to configure use_sim_time in rqt or rviz but it does not solve the problem.

I have also tested the recommendation of this thread https://answers.ros.org/question/3322... configuring the topics in rviz but it does not work.

my system: OS Ubuntu 20.04 ROS- foxy (updated) all packages from apt-get To test gazebo I use https://github.com/chapulina/dolly and add multiple plugins.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2020-08-04 13:52:19 -0600

lukicdarkoo gravatar image

updated 2020-08-04 14:43:06 -0600

gvdhoorn gravatar image

If you check the QoS profile for sensor_datayou will see that reliability is set to the best effort: https://github.com/ros2/rclcpp/blob/f...

Now, if you add a new visualization to RViz2 it will have reliability policy set to Reliable by default:

image description

Therefore, just change reliability to Best Effort:

image description

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 } }'
edit flag offensive delete link more

Comments

1

Please do not use 3rd party image hosters to host images.

Retention is typically low, or sometimes even unknown.

As you have 11 karma, you should be able to directly attach images to your post.

I've done that for you now, but please keep it in mind next time.

gvdhoorn gravatar image gvdhoorn  ( 2020-08-04 14:44:07 -0600 )edit

Yes I have tested best effort but ir does not work, this also happen with the plugin odometry, if I use the libgazebo_ros_p3d topic I can not read it in the rviz plugin, but the gazebo_ros_diff_drive works normally

remlog gravatar image remlog  ( 2020-08-06 13:55:46 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2020-08-04 10:10:32 -0600

Seen: 2,387 times

Last updated: Aug 04 '20