BB.Command.Arm (bb v0.15.0)

View Source

Standard command handler for arming a robot.

When executed from the :disarmed state, this command arms the robot via BB.Safety.Controller, making it ready to accept motion commands.

Usage

Add to your robot's command definitions:

commands do
  command :arm do
    handler BB.Command.Arm
    allowed_states [:disarmed]
  end
end

Then execute:

{:ok, cmd} = MyRobot.arm()
{:ok, :armed} = BB.Command.await(cmd)