Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Source:

Report:

...

OBS OBS!

The navigation stack is being completely overhauled meaning this may not be accurate any more.

...

The module is implemented according to the class diagram presented in the previous section, ROS topics are used for communication with the controller and behavior module. The module provides its states as a single ROS action server that utilises StateMachine.action actions, and interfaces Behavior through an action client when needed:

FunctionDescription
callback_server_primary_states

...

Callback for the action server, checks the action goal and executes the corresponding function.
emotional_callback

...

Callback for the emotional state topic.
create_and_send_behavior_goal

...

Used to create and send action goals to the Behavior module.
actionloop_check

...

When executed, checks for preemption requests for the active state, and the executional status of the Behavior action server. Sets the terminal state of the action server according to the terminal state of the behavior server.
wandering_emotional

...

Activates wandering behavior in Behavior, preempts the state when the Cyborg is in the wrong mood.
navigation_planning_state

...

Based on the old navigation_planning state. Activated by either a navigationemotional or navigationschedular event. Checks the emotional state of the Cyborg, and decides and activates the next state. If the next state is navigation_go_to, the location is published on the cyborg_behavior/command_location topic for the Behavior module, before the state change is executed.
change_state

...

Executes a state change by publishing events on the corresponding topic.
send_emotion

...

Used for publishing emotional feedback to the controller, by publishing a EmotionalFeedback message on the corresponding topic.

How to implement new states

...