spike.scenario.commands

Software component commands management

Classes

ScenarioCommands()

Class managing robot command and their impact on dynamics

class spike.scenario.commands.ScenarioCommands

Class managing robot command and their impact on dynamics

__init__()

Constructor

reset()

Commands reset function

configure(dynamics)

Configuration function for command

Parameters:

dynamics (ScenarioDynamics) – robot dynamic data to update from command

give(component, name, args)

Register a new command being given to the hub

Parameters:
  • component (object (Button, ColorSensor,...)) – the software component at the origin of the command

  • name (string) – command name

  • args (dictionary) – command parameters

Raises:

ValueError – Command not known

Returns:

command to perform

Return type:

generator function

__statuslight_on(component, args)

Process StatusLight “on” command

__statuslight_off(component)

Process StatusLight “off” command

__colorsensor_light_up(component, args)

Process StatusLight light up commands

__lightmatrix_show_image(component, args)

Process LightMatrix show image command

__lightmatrix_set_pixel(component, args)

Process LightMatrix set pixel command

__lightmatrix_write(component, args)

Process LightMatrix write command

__lightmatrix_off(component)

Process LightMatrix off command

__speaker_beep(component, args)

Process StatusLight beep command

__speaker_start_beep(component, args)

Process StatusLight start beep command

__speaker_stop(component)

Process StatusLight stop command

__speaker_set_volume(component, args)

Process StatusLight set volume command

__motorpair_set_stop_action(component, args)

Process MotorPair set stop action command