Search documentation of bb

# BB.Message.Actuator.Command.Effort (bb v0.8.0)

View Source

Command to apply a specific effort (torque/force) to an actuator.

The actuator will apply the specified effort until stopped, a new command is received, or the optional duration expires.

## Fields

- `effort` - Target effort (Nm for revolute, N for prismatic)
- `duration` - Optional duration (milliseconds), nil = until stopped
- `command_id` - Optional reference for correlating with feedback messages

## Examples

    alias BB.Message
    alias BB.Message.Actuator.Command.Effort

    # Apply torque
    {:ok, msg} = Message.new(Effort, :gripper,
      effort: 0.5
    )

    # Apply torque for fixed duration
    {:ok, msg} = Message.new(Effort, :gripper,
      effort: 0.5,
      duration: 1000
    )

# Summary

## Types

t()

## Functions

new(frame_id, attrs)

# Types

# t()

    @type t() :: %BB.Message.Actuator.Command.Effort{
      command_id: reference() | nil,
      duration: pos_integer() | nil,
      effort: float()
    }

# Functions

# new(frame_id, attrs)

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