Provides a standardized interface for interfacing with preemptable tasks. Examples of this include moving the base to a target location, performing a laser scan and returning the resulting point cloud, detecting the handle of a door, etc.
The python wait_for_server only checks to see if the result and
feedback topics have a connection marked not done. Unfortunetly,
rospy adds the connection information before actually connecting
the transport, and initializes done to False. Therefore
wait_for_server returns prematurely. If a goal is immediately sent,
and the server finishes the goal quickly and sends the result, the
result topic may not yet be fully connected and the result may be
lost. This will cause the action client to stay stuck waiting for
results until the timeout is reached.
Fix this by checking the result and topic subscribers for a
callerid_pub matching the server_id received on the status topic. The
callerid_pub will be set after receiving the header, which gurantees
the subscriber is correctly connected, and correctly connected to the
proper publisher. There is no need to re-check the status topic (as
it is the source of truth).
The python wait_for_server only checks to see if the result and feedback topics have a connection marked not done. Unfortunetly, rospy adds the connection information before actually connecting the transport, and initializes done to False. Therefore wait_for_server returns prematurely. If a goal is immediately sent, and the server finishes the goal quickly and sends the result, the result topic may not yet be fully connected and the result may be lost. This will cause the action client to stay stuck waiting for results until the timeout is reached.
Fix this by checking the result and topic subscribers for a callerid_pub matching the server_id received on the status topic. The callerid_pub will be set after receiving the header, which gurantees the subscriber is correctly connected, and correctly connected to the proper publisher. There is no need to re-check the status topic (as it is the source of truth).