Function rcl_action_take_goal_response

Function Documentation

rcl_ret_t rcl_action_take_goal_response(const rcl_action_client_t *action_client, rmw_request_id_t *response_header, void *ros_goal_response)

Take a response for a goal request from an action server using a rcl_action_client_t.

Todo:

TODO(jacobperron) blocking of take?

Todo:

TODO(jacobperron) pre-, during-, and post-conditions for message ownership?

Todo:

TODO(jacobperron) is this thread-safe?

The caller is responsible for ensuring that the type of ros_goal_response 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 caller must provide a pointer to an allocated message for the ros_goal_response. If the take is successful, this function will populate the fields of ros_goal_response. The ROS message given by the ros_goal_response 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_goal_response() call. Before calling rcl_action_send_goal_response() the message can change but after calling rcl_action_send_goal_response() it depends on RMW implementation behavior.

Attribute

Adherence

Allocates Memory

No

Thread-Safe

No

Uses Atomics

No

Lock-Free

Yes

Parameters:
  • action_client[in] handle to the client that will take the goal response

  • response_header[out] pointer to the goal response header

  • ros_goal_response[out] pointer to the response of a goal request

Returns:

RCL_RET_OK if the response was taken 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_ACTION_CLIENT_TAKE_FAILED if take failed but no error occurred in the middleware, or

Returns:

RCL_RET_ERROR if an unspecified error occurs.