Search documentation of bb

# BB.Message.Sensor.JointState (bb v0.17.0)

Copy Markdown View Source

State of a set of joints.

## Fields

- `names` - List of joint names as atoms
- `positions` - Joint positions in radians (revolute) or metres (prismatic)
- `velocities` - Joint velocities in rad/s or m/s
- `efforts` - Joint efforts in Nm or N

All lists must have the same length. Missing values can be represented as empty lists.

## Examples

    alias BB.Message.Sensor.JointState

    {:ok, msg} = JointState.new(:arm,
      names: [:joint1, :joint2],
      positions: [0.0, 1.57],
      velocities: [0.1, 0.0],
      efforts: [0.5, 0.2]
    )

## Summary

### Types

t()

### Functions

new(frame_id, attrs)

## Types

# t()

    @type t() :: %BB.Message.Sensor.JointState{
      efforts: [float()],
      names: [atom()],
      positions: [float()],
      velocities: [float()]
    }

## Functions

# new(frame_id, attrs)

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