Function rcl_action_publish_feedback
Defined in File action_server.h
Function Documentation
-
rcl_ret_t rcl_action_publish_feedback(const rcl_action_server_t *action_server, void *ros_feedback)
Publish a ROS feedback message for an active goal using an action server.
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.This function acts like a ROS publisher and is potentially a blocking call.
This function is thread safe so long as access to both the action server and
ros_feedback
is synchronized. That means that calling rcl_action_publish_feedback() from multiple threads is allowed, but calling rcl_action_publish_feedback() at the same time as non-thread safe action server functions is not, e.g. calling rcl_action_publish_feedback() and rcl_action_server_fini() concurrently is not allowed.See also
rcl_publish()
Before calling rcl_action_publish_feedback() the
ros_feedback
message ca change and after calling rcl_action_publish_feedback() theros_feedback
message can change, but it cannot be changed during the publish call. The sameros_feedback
can be passed to multiple calls of rcl_action_publish_feedback() simultaneously, even if the action servers differ.ros_feedback
is unmodified by rcl_action_publish_feedback().Attribute
Adherence
Allocates Memory
No
Thread-Safe
Yes [1]
Uses Atomics
No
Lock-Free
Yes
- Parameters:
action_server – [in] handle to the action server that will publish the feedback
ros_feedback – [in] a ROS message containing the goal feedback
- Returns:
RCL_RET_OK
if the response was sent successfully, or- Returns:
RCL_RET_INVALID_ARGUMENT
if any arguments are invalid, or- Returns:
RCL_RET_ACTION_SERVER_INVALID
if the action server is invalid, or- Returns:
RCL_RET_ERROR
if an unspecified error occurs. *