as2fm.scxml_converter.scxml_entries.scxml_ros_action_client.RosActionHandleGoalResponse
- class as2fm.scxml_converter.scxml_entries.scxml_ros_action_client.RosActionHandleGoalResponse(action_client: str | RosActionClient, accept_target: str, reject_target: str)
Bases:
ScxmlTransition
SCXML object representing the handler of an action response upon a goal request.
A server might accept or refuse a goal request, based on its internal state. This handler is meant to handle both acceptance or refusal of a request. Translating this to plain-SCXML, it results to two conditional transitions.
- __init__(action_client: str | RosActionClient, accept_target: str, reject_target: str) None
Initialize a new RosActionHandleGoalResponse object.
- Parameters:
action_client – Action client used by this handler, or its name.
accept_target – State to transition to, in case of goal acceptance.
reject_target – State to transition to, in case of goal refusal.
Methods
__init__
(action_client, accept_target, ...)Initialize a new RosActionHandleGoalResponse object.
add_event
(event)append_body_executable_entry
(exec_entry)as_plain_scxml
(ros_declarations)Convert the object to its plain SCXML version.
as_xml
()Convert the object to an XML element.
check_valid_ros_instantiations
(ros_declarations)Check if the ros instantiations have been declared.
Check if the object is valid.
from_xml_tree
(xml_tree)Create a RosServiceServer object from an XML tree.
get_body
()Return the executable content of this transition.
Return the condition required to execute this transition (if any).
Get the data model of the object.
Return the events that trigger this transition (if any).
get_id
()Get the ID of the object.
Get the states of the object.
Get the tag name of the XML element.
Return the ID of the target state of this transition.
instantiate_bt_events
(_, __)Instantiate the BT events of this transition.
set_body
(body)Set the body of this transition.
set_thread_id
(thread_id)Set the thread ID for the executable entries of this transition.
Update the values of potential entries making use of BT ports.
- as_plain_scxml(ros_declarations: ScxmlRosDeclarationsContainer) List[ScxmlTransition]
Convert the object to its plain SCXML version.
- as_xml() Element
Convert the object to an XML element.
- check_valid_ros_instantiations(ros_declarations: ScxmlRosDeclarationsContainer) bool
Check if the ros instantiations have been declared.
- check_validity() bool
Check if the object is valid.
- static from_xml_tree(xml_tree: Element) RosActionHandleGoalResponse
Create a RosServiceServer object from an XML tree.
- get_body() List[ScxmlAssign | ScxmlIf | ScxmlSend]
Return the executable content of this transition.
- get_condition() str | None
Return the condition required to execute this transition (if any).
- get_data_model()
Get the data model of the object.
- get_events() List[str]
Return the events that trigger this transition (if any).
- get_id() str
Get the ID of the object.
- get_states()
Get the states of the object.
- static get_tag_name() str
Get the tag name of the XML element.
- get_target_state_id() str
Return the ID of the target state of this transition.
- instantiate_bt_events(_, __) List[RosActionHandleGoalResponse]
Instantiate the BT events of this transition.
- set_body(body: List[ScxmlAssign | ScxmlIf | ScxmlSend]) None
Set the body of this transition.
- set_thread_id(thread_id: int) None
Set the thread ID for the executable entries of this transition.
- update_bt_ports_values(_) None
Update the values of potential entries making use of BT ports.