|
| None | __init__ (self) |
| |
| AddTwoInts.Request | create_request_handler (self, Blackboard blackboard) |
| |
| str | response_handler (self, Blackboard blackboard, AddTwoInts.Response response) |
| |
| None | __init__ (self, Type srv_type, str srv_name, Callable create_request_handler, Set[str] outcomes=None, Callable response_handler=None, CallbackGroup callback_group=None, Node node=None, float wait_timeout=None, float response_timeout=None, int maximum_retry=3) |
| |
| str | execute (self, Blackboard blackboard) |
| |
| None | response_callback (self, Future future) |
| |
|
| Callable[[Blackboard], Any] | _create_request_handler = create_request_handler |
| | Function to create service requests.
|
| |
| Callable[[Blackboard, Any], str] | _response_handler = response_handler |
| | Function to handle service responses.
|
| |
| float | _wait_timeout = wait_timeout |
| | Maximum wait time for service availability.
|
| |
| float | _response_timeout = response_timeout |
| | Timeout for the service response.
|
| |
| Node | _node = node |
| | The ROS 2 node used to communicate with the service.
|
| |
| str | _srv_name = srv_name |
| | Name of the service.
|
| |
| Client | _service_client |
| | Shared pointer to the service client.
|
| |
| Any | _response = None |
| | The response received from the service.
|
| |
| int | _maximum_retry = maximum_retry |
| | Maximum number of retries.
|
| |
| Event | _response_received_event = Event() |
| | Event to signal when the service response is received.
|
| |
A state that calls the AddTwoInts service to add two integers.
This class is a state in a finite state machine that sends a request
to the AddTwoInts service, retrieves the response, and updates the
blackboard with the result.
Attributes:
service_type (type): The service type being used (AddTwoInts).
service_name (str): The name of the service.
outcomes (list): The list of possible outcomes for this state.