ROS2: topic subscribed but not received

asked 2018-09-05 03:05:00 -0600

Myzhar gravatar image

I have a device driver that publishes a Pointcloud2 message at 30 Hz.

I can subscribe the message in Rviz and I can see the correct pointcloud.

When I move the camera in 3D view the pointcloud disappears and I see Showing [0] points from [0] messages in Points under the Pointcloud Status.

If I open a console and I try to subscribe to the topic by command line using

$ ros2 topic echo /zed_node/point_cloud/cloud_registered

it seems that the message is not published indeed. I'm pretty sure that my node is publishing it because if I subscribe to it and remove the subscription I can see the total number of subscribers changing.

For further information I'm using Bouncy compiled from source under Ubuntu 16.04 and the following QOS settings:

    rmw_qos_profile_t depth_qos_profile = rmw_qos_profile_default; // Default QOS profile

    depth_qos_profile.durability = RMW_QOS_POLICY_DURABILITY_SYSTEM_DEFAULT;
    depth_qos_profile.history = RMW_QOS_POLICY_HISTORY_KEEP_LAST;
    depth_qos_profile.depth = 1;
    depth_qos_profile.reliability = RMW_QOS_POLICY_RELIABILITY_BEST_EFFORT;

Thank you for help

Walter

edit retag flag offensive close merge delete

Comments

@Myzhar can you provide a minimal reproducible example of your issue?

marguedas gravatar imagemarguedas ( 2018-09-10 18:31:37 -0600 )edit

It's not easy, However it seems that using a depth_qos_profile.depth major than 1 the topic connection is more stable

Myzhar gravatar imageMyzhar ( 2018-09-14 09:03:47 -0600 )edit

Have you tried using the ros2 provided rmw_qos_profile_sensor_data profile?

marguedas gravatar imagemarguedas ( 2018-09-15 22:54:15 -0600 )edit

Yes, it's the same. Now I'm going to try changing the RMW. I read that Connext and Opensplice can have better performances

Myzhar gravatar imageMyzhar ( 2018-09-16 02:17:53 -0600 )edit