simulation.src.simulation_evaluation.src.state_machine.node module¶
Track the state of a simulated drive.
Summary¶
Classes:
ROS node which tracks the state of a simulated drive. |
Functions:
Log the state of each state machine. |
Reference¶
-
log(logger: Callable[[str], None] = <function loginfo>)[source]¶ Log the state of each state machine.
- Parameters
logger – Function to which the log message should be sent
-
class
StateMachineNode[source]¶ Bases:
simulation.utils.ros_base.node_base.NodeBaseROS node which tracks the state of a simulated drive.
-
info_publisher¶ Publish human readable states on change
- Type
rospy.Publisher
-
zone_subscriber¶ Subscribes to zone of speaker
- Type
rospy.Subscriber
-
location_subscriber¶ Subscribes to location of speaker
- Type
rospy.Subscriber
-
events_subscriber¶ Subscribes to events of speaker
- Type
rospy.Subscriber
-
speed_subscriber¶ Subscribes to speed of speaker
- Type
rospy.Subscriber
-
set_subscribers¶ Subscribes to …/set
- Type
List[rospy.Subscriber]
-
sm_publishers¶ Publishes to …/state
- Type
List[rospy.Publisher]
-
state_machines¶ Array of all StateMachine
- Type
List[StateMachine]
-
initalize_state_machines()[source]¶ Init each state machine.
Creates a list with each StateMachine in .state_machines, creates a publisher for each get topic in .sm_publishers and creates a subscriper for each set topic in .set_publishers.
-
set_state_machine(new_msg: simulation_evaluation.msg._State.State, state_machine: simulation.src.simulation_evaluation.src.state_machine.state_machines.state_machine.StateMachine)[source]¶ Update state machine manually.
- Parameters
new_msg – Message of the state to which the state machine should be set to
state_machine (StateMachine) – State machine to be changed
-