scenario_execution.model.model_to_py_tree module

class scenario_execution.model.model_to_py_tree.ExpressionBehavior(*args: Any, **kwargs: Any)

Bases: BaseAction

update()
class scenario_execution.model.model_to_py_tree.ModelToPyTree(logger)

Bases: object

class BehaviorInit(logger, tree)

Bases: ModelBaseVisitor

compare_method_arguments(method, expected_args, behavior_name, node)
create_decorator(node: ModifierDeclaration, resolved_values)
visit_behavior_invocation(node: BehaviorInvocation)
visit_binary_expression(node: BinaryExpression)
visit_do_member(node: DoMember)
visit_elapsed_expression(node: ElapsedExpression)
visit_emit_directive(node: EmitDirective)
visit_event_condition(node: EventCondition)
visit_event_declaration(node: EventDeclaration)
visit_event_reference(node: EventReference)
visit_keep_constraint_declaration(node: KeepConstraintDeclaration)
visit_logical_expression(node: LogicalExpression)
visit_modifier_invocation(node: ModifierInvocation)
visit_relation_expression(node: RelationExpression)
visit_scenario_declaration(node: ScenarioDeclaration)
visit_wait_directive(node: WaitDirective)
build(model, tree, log_tree)
class scenario_execution.model.model_to_py_tree.TopicEquals(*args: Any, **kwargs: Any)

Bases: Behaviour

Class to listen to a topic in Blackboard and check if it equals the defined message

Args:

key [str]: topic to listen to msg [str]: target message to match namespace [str]: namespace of the key

update()

Check the message on the topic equals the target message

class scenario_execution.model.model_to_py_tree.TopicPublish(*args: Any, **kwargs: Any)

Bases: Behaviour

Class to publish a message to a topic

Args:

key [str]: topic to publish on msg [str]: message to publish on that topic namespace [str]: namespace of the key

setup(**kwargs)

Setup empty topic on blackboard

This is to prevent the “Reader” from reading before the topic exists.

update()

publish the message to topic

scenario_execution.model.model_to_py_tree.create_py_tree(model, tree, logger, log_tree)