as2fm.scxml_converter.ascxml_extensions.ros_entries.scxml_ros_action_server.RosActionAcceptGoal

class as2fm.scxml_converter.ascxml_extensions.ros_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.

add_events_targets(events_to_models)

Add the target models for all events sent by this executable entry.

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_fields_validity(_)

Check if all the fields defined in the declared ROS interface are assigned.

check_interface_defined(ascxml_declarations)

Check if the ROS interface used in the callback exists.

check_valid_ros_instantiations(_)

Check if the ros instantiations have been declared.

check_validity()

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_additional_arguments()

Get the names of additional arguments in the SCXML-ROS tag.

get_config_request_receive_events()

Return the events for requesting-receiving the updated value of a conf.

get_custom_data_types()

Get the container with custom data types.

get_declaration_type()

Get the type of ROS declaration related to the trigger.

get_event()

Get the event to send.

get_params()

Get the parameters to send.

get_plain_scxml_event(ascxml_declaration)

Translate the ROS interface name to a plain scxml event.

get_related_interface(ascxml_declarations)

Find the declared interface related to this callback.

get_tag_name()

XML tag name for the ROS trigger type.

get_target_automaton()

Get the target automata associated to this send event.

get_xml_origin()

Get the xml_element this object was made from.

is_plain_scxml([verbose])

Check if the object is compatible with the plain SCXML standard.

replace_strings_types_with_integer_arrays()

Replace all string literals in the contained expressions.

set_callback_prefixes(cb_prefixes)

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_configurable_entry(ascxml_declarations)

Update possible configurable entries in the executable object.

add_events_targets(events_to_models: Dict[str, Set[str]])

Add the target models for all events sent by this executable entry.

as_plain_scxml(struct_declarations: ScxmlStructDeclarationsContainer, ascxml_declarations: List[AscxmlDeclaration], **kwargs) List[ScxmlBase]

Convert the object to its plain SCXML version.

Parameters:
  • struct_declarations – List of custom structures defined in the model

  • ascxml_declarations – Additional declarations, like ROS or BT specific ones

  • kwargs – Additional framework specific entries, e.g. the BT plugin ID.

as_xml() _Element

Convert the object to an XML element.

check_fields_validity(_) bool

Check if all the fields defined in the declared ROS interface are assigned.

check_interface_defined(ascxml_declarations: List[AscxmlDeclaration]) bool

Check if the ROS interface used in the callback exists.

check_valid_ros_instantiations(_) bool

Check if the ros instantiations have been declared.

check_validity()

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]) Self

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_config_request_receive_events() Tuple[str, str] | None

Return the events for requesting-receiving the updated value of a conf. entry, if any.

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_params() List[ScxmlParam]

Get the parameters to send.

get_plain_scxml_event(ascxml_declaration: AscxmlDeclaration) str

Translate the ROS interface name to a plain scxml event.

Find the declared interface related to this callback.

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.

is_plain_scxml(verbose: bool = False) 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_prefixes(cb_prefixes: List[str])

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_configurable_entry(ascxml_declarations: List[AscxmlDeclaration])

Update possible configurable entries in the executable object.