Function rcl_action_take_feedback

Function Documentation

rcl_ret_t rcl_action_take_feedback(const rcl_action_client_t *action_client, void *ros_feedback)

Take a ROS feedback message for an active goal associated with a rcl_action_client_t.

The caller is responsible for ensuring that the type of ros_feedback 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.

Todo:

TODO(jacobperron) blocking of take?

Todo:

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

Todo:

TODO(jacobperron) is this thread-safe?

ros_feedback should point to a preallocated ROS message struct of the correct type. If feedback is successfully taken, the feedback message is copied to into the ros_feedback struct.

If allocation is required when taking the feedback, e.g. if space needs to be allocated for a dynamically sized array in the target message, then the allocator given in the action client options is used.

Attribute

Adherence

Allocates Memory

Maybe [1]

Thread-Safe

No

Uses Atomics

No

Lock-Free

Yes

[1] only if required when filling the feedback message, avoided for fixed sizes

Parameters:
  • action_client[in] handle to the client that will take action feedback

  • ros_feedback[out] pointer to the ROS feedback message.

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_BAD_ALLOC if allocating memory failed, 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.