BB.Error.State.NotArmed exception (bb v0.28.0)

Copy Markdown View Source

Command refused because the robot is not armed.

BB.Actuator.Server checks BB.Safety.armed?/1 before handing a command to a driver, so no actuator can drive hardware while the robot is disarmed. Stop commands are exempt and never produce this error.

This is a :state error rather than a :safety one: the safety system working as intended is not a safety violation.

Summary

Types

t()

@type t() :: %BB.Error.State.NotArmed{
  __exception__: term(),
  actuator: atom(),
  bread_crumbs: term(),
  class: term(),
  command: module(),
  path: term(),
  robot: module() | nil,
  splode: term(),
  stacktrace: term(),
  vars: term()
}

Functions

exception(args)

@spec exception(opts :: Keyword.t()) :: %BB.Error.State.NotArmed{
  __exception__: term(),
  actuator: term(),
  bread_crumbs: term(),
  class: term(),
  command: term(),
  path: term(),
  robot: term(),
  splode: term(),
  stacktrace: term(),
  vars: term()
}

Create an Elixir.BB.Error.State.NotArmed without raising it.

Keys

  • :robot
  • :actuator
  • :command