Description
The default durability QoS for status_topic for actions is TRANSIENT_LOCAL
:
While for the rest of action components, it's VOLATILE.
I'm trying to find the reason for the default policy TRANSIENT_LOCAL
being set for action goal's "status" topic.
This policy means:
- A late joiner subscription would receive messages published in the past by some publisher.
For Actions this means:
- A newly created
ActionClient
would receive old goal statuses sent in the past by someActionServer
. - This can't happen as the
ActionClient
was not yet created, soActionServer
couldn't have sent status messages. - Bug: It might actually can happen - multiple Action Clients with same name - They all receive old statuses that the server sent to other clients with same name.
So it is necessary for some reason that I ignore, having TRANSIENT_LOCAL
set for action goal's "status" topic?
I'm asking this since for some reason I had to change the action server to use VOLATILE
, and now the clients don't find the servers when calling rcl_action_server_is_available(), since there is a mismatch in QoS between client and server, so number_of_publishers
is zero in:
rcl/rcl_action/src/rcl_action/action_client.c
Lines 327 to 328 in f190677
If the default would be VOLATILE
instead of TRANSIENT_LOCAL
(which seems to make sense), there wouldn't be server discovery issues.
--- a/rcl_action/include/rcl_action/default_qos.h
+++ b/rcl_action/include/rcl_action/default_qos.h
@@ -28,7 +28,7 @@ static const rmw_qos_profile_t rcl_action_qos_profile_status_default =
- RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL,
+ RMW_QOS_POLICY_DURABILITY_VOLATILE,