synchros2.action_client module
- class synchros2.action_client.ActionClientWrapper[source]
Bases:
ActionClientA wrapper for ros2’s ActionClient for extra functionality
- __init__(action_type: Type, action_name: str, node: rclpy.node.Node | None = None, wait_for_server: bool = True) None[source]
Constructor
- send_goal_and_wait(action_name: str, goal: Any | None, timeout_sec: float | None = None) Any | None[source]
Sends an action goal and waits for the result
- send_goal_async_handle(action_name: str, goal: Any, *, result_callback: Callable[[Any], None] | None = None, feedback_callback: Callable[[Any], None] | None = None, on_failure_callback: Callable[[], None] | None = None) ActionHandle[source]
Sends an action goal asynchronously and create an ActionHandle
- Parameters:
action_name (str) – A representative name of the action for logging
goal (Action.Goal) – The Action Goal sent to the action server
result_callback (Optional[Callable[[Action.Result], None]]) – A callback to process/handle
command (the feedback received during the execution of the)
feedback_callback (Optional[Callable[[Action.Feedback], None]]) – A callback to process/handle
command
on_failure_callback (Optional[Callable[[None], None]]) – A callback to process/handle when
reasons (the action fails for various)
- Returns:
An object to manage the asynchronous lifecycle of the action request
- Return type: