BB.Message.Actuator.Command.Stop (bb v0.15.0)

View Source

Command to stop an actuator's motion.

After stopping, the actuator becomes passive and will not actively resist external forces. Use Hold if you need the actuator to maintain position.

Fields

  • mode - Stop mode: :immediate (default) or :decelerate
  • command_id - Optional reference for correlating with feedback messages

Modes

  • :immediate - Stop as quickly as possible (may be abrupt)
  • :decelerate - Slow down smoothly before stopping

Examples

alias BB.Message
alias BB.Message.Actuator.Command.Stop

# Immediate stop
{:ok, msg} = Message.new(Stop, :shoulder, [])

# Decelerate to stop
{:ok, msg} = Message.new(Stop, :shoulder,
  mode: :decelerate
)

Summary

Types

mode()

@type mode() :: :immediate | :decelerate

t()

@type t() :: %BB.Message.Actuator.Command.Stop{
  command_id: reference() | nil,
  mode: mode()
}

Functions

new(frame_id, attrs)

@spec new(
  atom(),
  keyword()
) :: {:ok, BB.Message.t()} | {:error, term()}