as2fm.scxml_converter.scxml_entries.scxml_ros_action_server_thread.RosActionHandleThreadStart
- class as2fm.scxml_converter.scxml_entries.scxml_ros_action_server_thread.RosActionHandleThreadStart(server_alias: str | RosActionServer, target_state: str, condition: str | None = None, exec_body: List[ScxmlAssign | ScxmlIf | ScxmlSend] | None = None)
Bases:
RosCallback
SCXML object receiving a trigger from the action server to start a thread.
The selection of the thread is encoded in the event name. The thread ID is set from the parent, via a dedicated method.
- __init__(server_alias: str | RosActionServer, target_state: str, condition: str | None = None, exec_body: List[ScxmlAssign | ScxmlIf | ScxmlSend] | None = None) None
Initialize a new RosActionHandleResult object.
- Parameters:
server_alias – Action Server used by this handler, or its name.
target_state – Target state to transition to after the start trigger is received.
condition – Condition to be met for the callback to be executed. Expected None.
exec_body – Execution body to be executed upon thread start (before transition).
Methods
__init__
(server_alias, target_state[, ...])Initialize a new RosActionHandleResult 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 ROS callback to an XML element.
check_interface_defined
(ros_declarations)Check if the action server has been declared.
check_valid_ros_instantiations
(ros_declarations)Check if the ROS entries in the callback are correctly defined.
Check if the object is valid.
from_xml_tree
(xml_tree)Create an instance of the class from an XML tree.
get_body
()Return the executable content of this transition.
Return the callback type of a specific ROS Callback subclass
Return the condition required to execute this transition (if any).
Get the data model of the object.
Get the type of ROS declaration related to the callback.
Return the events that trigger this transition (if any).
get_id
()Get the ID of the object.
get_plain_scxml_event
(ros_declarations)Translate the ROS interface name to a plain scxml event.
Get the states of the object.
XML tag name for the ROS callback type.
Return the ID of the target state of this transition.
instantiate_bt_events
(instance_id, children_ids)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 this handler.
update_bt_ports_values
(bt_ports_handler)Update the values of potential entries making use of BT ports.
- as_plain_scxml(ros_declarations: ScxmlRosDeclarationsContainer) ScxmlTransition
Convert the object to its plain SCXML version.
- as_xml() Element
Convert the ROS callback to an XML element.
- check_interface_defined(ros_declarations: ScxmlRosDeclarationsContainer) bool
Check if the action server has been declared.
- check_valid_ros_instantiations(ros_declarations: ScxmlRosDeclarationsContainer) bool
Check if the ROS entries in the callback are correctly defined.
- check_validity() bool
Check if the object is valid.
- classmethod from_xml_tree(xml_tree: Element) RosCallback
Create an instance of the class from an XML tree.
- get_body() List[ScxmlAssign | ScxmlIf | ScxmlSend]
Return the executable content of this transition.
- static get_callback_type() CallbackType
Return the callback type of a specific ROS Callback subclass
- get_condition() str | None
Return the condition required to execute this transition (if any).
- get_data_model()
Get the data model of the object.
- static get_declaration_type() Type[RosActionServer]
Get the type of ROS declaration related to the callback.
Examples: RosSubscriber, RosPublisher, …
- get_events() List[str]
Return the events that trigger this transition (if any).
- get_id() str
Get the ID of the object.
- get_plain_scxml_event(ros_declarations: ScxmlRosDeclarationsContainer) str
Translate the ROS interface name to a plain scxml event.
- get_states()
Get the states of the object.
- static get_tag_name() str
XML tag name for the ROS callback type.
- get_target_state_id() str
Return the ID of the target state of this transition.
- instantiate_bt_events(instance_id: int, children_ids: List[int]) List[ScxmlTransition]
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 this handler.
- update_bt_ports_values(bt_ports_handler: BtPortsHandler) None
Update the values of potential entries making use of BT ports.