Function rcl_action_send_result_request

Function Documentation

rcl_ret_t rcl_action_send_result_request(const rcl_action_client_t *action_client, const void *ros_result_request, int64_t *sequence_number)

Send a request for the result of a completed goal associated with a rcl_action_client_t.

This is a non-blocking call.

The caller is responsible for ensuring that the type of ros_result_request and the type associate with the client (via the type support) match. Passing a different type produces undefined behavior and cannot be checked by this function and therefore no deliberate error will occur.

The ROS message given by the ros_result_request void pointer is always owned by the calling code, but should remain constant during execution of this function. i.e. The message cannot change during the rcl_action_send_result_request() call. Before calling rcl_action_send_result_request() the message can change but after calling rcl_action_send_result_request() it depends on RMW implementation behavior. The same ros_result_request can be passed to multiple calls of this function simultaneously, even if the action clients differ.

This function is thread safe so long as access to both the rcl_action_client_t and the ros_result_request are synchronized. That means that calling rcl_action_send_result_request() from multiple threads is allowed, but calling rcl_action_send_result_request() at the same time as non-thread safe action client functions is not, e.g. calling rcl_action_send_result_request() and rcl_action_client_fini() concurrently is not allowed.

Attribute

Adherence

Allocates Memory

No

Thread-Safe

Yes [1]

Uses Atomics

No

Lock-Free

Yes

[1] for unique pairs of clients and result requests, see above for more

Parameters:
  • action_client[in] handle to the client that will send the result request

  • ros_result_request[in] pointer to a ROS result request message

  • sequence_number[out] pointer to the result request sequence number

Returns:

RCL_RET_OK if the request was sent successfully, or

Returns:

RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or

Returns:

RCL_RET_ACTION_CLIENT_INVALID if the action client is invalid, or

Returns:

RCL_RET_ERROR if an unspecified error occurs.