as2fm.scxml_converter.scxml_entries.scxml_ros_action_server.RosActionAcceptGoal
- class as2fm.scxml_converter.scxml_entries.scxml_ros_action_server.RosActionAcceptGoal(interface_decl: str | RosDeclaration, fields: List[RosField], additional_args: Dict[str, str] | None = None)
Bases:
RosTrigger
Object representing the SCXML ROS Event sent from the server when an action Goal is accepted.
- __init__(interface_decl: str | RosDeclaration, fields: List[RosField], additional_args: Dict[str, str] | None = None) None
Constructor of a generic ROS trigger.
- Parameters:
interface_decl – ROS interface declaration to be used in the trigger, or its name.
fields – Name of fields that are sent together with the trigger.
additional_args – Additional arguments in the SCXML-ROS tag.
Methods
__init__
(interface_decl, fields[, ...])Constructor of a generic ROS trigger.
append_field
(field)append_param
(param)as_plain_scxml
(struct_declarations, ...)Convert the object to its plain SCXML version.
as_xml
()Convert the object to an XML element.
Check if all fields are assigned, given the ROS interface definition.
check_interface_defined
(ros_declarations)Check if the ROS interface used in the trigger exists.
check_valid_ros_instantiations
(ros_declarations)Check if the ROS entries in the trigger are correctly defined.
Check if the object is valid.
from_xml_tree
(xml_tree, custom_data_types, ...)External interface to create a ScxmlBase object from an XML tree.
from_xml_tree_impl
(xml_tree, custom_data_types)Create an instance of the class from an XML tree.
Get the names of additional arguments in the SCXML-ROS tag.
get_body
()Get the body of the object.
Get the container with custom data types.
Get the type of ROS declaration related to the trigger.
Get the event to send.
get_id
()Get the ID of the object.
Get the parameters to send.
get_plain_scxml_event
(ros_declarations)Translate the ROS interface name to a plain scxml event.
XML tag name for the ROS trigger type.
Get the target automata associated to this send event.
Get the xml_element this object was made from.
has_bt_blackboard_input
(bt_ports_handler)Check whether the If entry reads content from the BT Blackboard.
instantiate_bt_events
(instance_id, _)Instantiate the behavior tree events in the send action, if available.
Check if the object is compatible with the plain SCXML standard.
Replace all string literals in the contained expressions.
set_callback_type
(cb_type)Set the callback executing this trigger for this instance and its children.
set_custom_data_types
(custom_data_types)Save container with custom data types.
set_target_automaton
(target_automaton)Set the target automata associated to this send event.
set_xml_origin
(xml_origin)Set the xml_element this object was made from.
update_bt_ports_values
(bt_ports_handler)Update the values of potential entries making use of BT ports.
- as_plain_scxml(struct_declarations: ScxmlStructDeclarationsContainer, ros_declarations: ScxmlRosDeclarationsContainer) List[ScxmlSend]
Convert the object to its plain SCXML version.
- as_xml() _Element
Convert the object to an XML element.
- check_fields_validity(_) bool
Check if all fields are assigned, given the ROS interface definition.
- check_interface_defined(ros_declarations: ScxmlRosDeclarationsContainer) bool
Check if the ROS interface used in the trigger exists.
- check_valid_ros_instantiations(ros_declarations: ScxmlRosDeclarationsContainer) bool
Check if the ROS entries in the trigger are correctly defined.
- check_validity() bool
Check if the object is valid.
- classmethod from_xml_tree(xml_tree: _Element, custom_data_types: Dict[str, StructDefinition], **kwargs) Self
External interface to create a ScxmlBase object from an XML tree.
- classmethod from_xml_tree_impl(xml_tree: _Element, custom_data_types: Dict[str, StructDefinition]) RosTrigger
Create an instance of the class from an XML tree.
- Parameters:
xml_tree – XML tree to be used for the creation of the instance.
additional_args – Additional arguments to be parsed from the SCXML-ROS tag.
- static get_additional_arguments() List[str]
Get the names of additional arguments in the SCXML-ROS tag.
- get_body()
Get the body of the object.
- get_custom_data_types() Dict[str, StructDefinition]
Get the container with custom data types.
- static get_declaration_type() Type[RosActionServer]
Get the type of ROS declaration related to the trigger.
Examples: RosServiceClient, RosActionClient, …
- get_event() str
Get the event to send.
- get_id() str
Get the ID of the object.
- get_params() List[ScxmlParam]
Get the parameters to send.
- get_plain_scxml_event(ros_declarations: ScxmlRosDeclarationsContainer) str
Translate the ROS interface name to a plain scxml event.
- static get_tag_name() str
XML tag name for the ROS trigger type.
- get_target_automaton() str | None
Get the target automata associated to this send event.
- get_xml_origin() _Element | None
Get the xml_element this object was made from.
- has_bt_blackboard_input(bt_ports_handler: BtPortsHandler)
Check whether the If entry reads content from the BT Blackboard.
- instantiate_bt_events(instance_id: int, _) List[ScxmlAssign | ScxmlIf | ScxmlSend]
Instantiate the behavior tree events in the send action, if available.
- is_plain_scxml() bool
Check if the object is compatible with the plain SCXML standard.
- replace_strings_types_with_integer_arrays() ScxmlSend
Replace all string literals in the contained expressions.
- set_callback_type(cb_type: CallbackType)
Set the callback executing this trigger for this instance and its children.
- set_custom_data_types(custom_data_types: Dict[str, StructDefinition])
Save container with custom data types.
- set_target_automaton(target_automaton: str) None
Set the target automata associated to this send event.
- set_xml_origin(xml_origin: _Element)
Set the xml_element this object was made from.
- update_bt_ports_values(bt_ports_handler: BtPortsHandler)
Update the values of potential entries making use of BT ports.