A servo can't be driven in the operating mode it was configured with.
Raised at startup, once the servo on the bus has identified itself. The
reason says which way it failed:
:unknown_model- the model number isn't inBB.Servo.Robotis.Model, so only:positioncan be assumed to work:unsupported_mode- the model doesn't implement the mode at all; an XL430 has no current control:no_torque_constant- the mode needs to turn newton metres into amps, and there's no published torque constant for that model
The actuator refuses to start rather than falling back to something the robot author didn't ask for.
Summary
Functions
Create an Elixir.BB.Error.Invalid.Robotis.ServoMode without raising it.
Types
@type reason() :: :no_torque_constant | :unknown_model | :unsupported_mode
@type t() :: %BB.Error.Invalid.Robotis.ServoMode{ __exception__: term(), bread_crumbs: term(), class: term(), mode: atom(), model: String.t() | nil, model_number: integer(), path: term(), reason: reason(), servo_id: non_neg_integer(), splode: term(), stacktrace: term(), supported: [atom()], vars: term() }
Functions
@spec exception(opts :: Keyword.t()) :: %BB.Error.Invalid.Robotis.ServoMode{ __exception__: term(), bread_crumbs: term(), class: term(), mode: term(), model: term(), model_number: term(), path: term(), reason: term(), servo_id: term(), splode: term(), stacktrace: term(), supported: term(), vars: term() }
Create an Elixir.BB.Error.Invalid.Robotis.ServoMode without raising it.
Keys
- :servo_id
- :model
- :model_number
- :mode
- :reason
- :supported