Function rclc_executor_add_action_client

Function Documentation

rcl_ret_t rclc_executor_add_action_client(rclc_executor_t *executor, rclc_action_client_t *action_client, size_t handles_number, void *ros_result_response, void *ros_feedback, rclc_action_client_goal_callback_t goal_callback, rclc_action_client_feedback_callback_t feedback_callback, rclc_action_client_result_callback_t result_callback, rclc_action_client_cancel_callback_t cancel_callback, void *context)

Adds a action client to an executor. An error is returned if rclc_executor_t.handles array is full. The total number_of_action_clients field of rclc_executor_t.info is incremented by one.

Attribute

Adherence

Allocates Memory

No

Thread-Safe

No

Uses Atomics

No

Lock-Free

Yes

Parameters:
  • executor[inout] pointer to initialized executor

  • action_client[in] pointer to a allocated and initialized action client

  • handles_number[in] max number of goals to handle with the client

  • ros_result_response[in] type-erased ptr to an allocated ROS result message

  • ros_feedback[in] type-erased ptr to an allocated ROS feedback message

  • goal_callback[in] function pointer to a goal callback

  • feedback_callback[in] function pointer to a feedback callback

  • result_callback[in] function pointer to a result callback

  • cancel_callback[in] function pointer to a result cancel callback

  • context[in] context to pass to the callback functions

Returns:

RCL_RET_OK if add-operation was successful

Returns:

RCL_RET_INVALID_ARGUMENT if any parameter is a null pointer

Returns:

RCL_RET_ERROR if any other error occured