Publisher/Subscriber dropping messages

asked 2022-01-04 07:34:09 -0500

morten gravatar image

I have a publisher/subscriber pair which seem to occasionally be dropping messages.

The subscriber is a path handler which should print a message upon reading a message from the publisher, the publisher is activated once per run manually from another terminal. A successful run should return the following

$ ros2 run path_handler path_handler 
[INFO] [1641302828.073908931] [path_handler]: Route received

I am experiencing that in some circumstances, particularly when using high effort packages like robot_localization and nav2, that I can send several messages using the route_generator while the path_handler makes no response. As such I figure the message is being dropped.

I've looked into the QoS of the publisher/subscriber, they both seem to be on reliable so I figure this should prevent the dropped messages, so I can't understand what the problem is

$ ros2 topic info /route -v
Type: geometry_msgs/msg/PoseArray

Publisher count: 1

Node name: route_generator
Node namespace: /
Topic type: geometry_msgs/msg/PoseArray
Endpoint type: PUBLISHER
GID: 01.0f.31.47.7e.3d.6d.42.01.00.00.00.00.00.12.03.00.00.00.00.00.00.00.00
QoS profile:
  Reliability: RMW_QOS_POLICY_RELIABILITY_RELIABLE
  Durability: RMW_QOS_POLICY_DURABILITY_VOLATILE
  Lifespan: 2147483651294967295 nanoseconds
  Deadline: 2147483651294967295 nanoseconds
  Liveliness: RMW_QOS_POLICY_LIVELINESS_AUTOMATIC
  Liveliness lease duration: 2147483651294967295 nanoseconds

Subscription count: 1

Node name: path_handler
Node namespace: /
Topic type: geometry_msgs/msg/PoseArray
Endpoint type: SUBSCRIPTION
GID: 01.0f.31.47.5e.3d.95.fe.01.00.00.00.00.00.12.04.00.00.00.00.00.00.00.00
QoS profile:
  Reliability: RMW_QOS_POLICY_RELIABILITY_RELIABLE
  Durability: RMW_QOS_POLICY_DURABILITY_VOLATILE
  Lifespan: 2147483651294967295 nanoseconds
  Deadline: 2147483651294967295 nanoseconds
  Liveliness: RMW_QOS_POLICY_LIVELINESS_AUTOMATIC
  Liveliness lease duration: 2147483651294967295 nanoseconds
edit retag flag offensive close merge delete