Search documentation of bb

# BB.Robot.Link (bb v0.8.0)

View Source

An optimised link representation with all units converted to SI floats.

Links are connected to their parent via `parent_joint` (nil for the root link) and to children via `child_joints` (list of joint names).

# Summary

## Types

collision()

Collision geometry information

color()

RGBA color (values 0-1)

geometry()

Geometry specification

inertia()

Inertia tensor components in kg·m²

material()

Material specification

orientation()

Orientation as {roll, pitch, yaw} in radians

position()

Position as {x, y, z} in meters

t()
visual()

Visual geometry information

# Types

# collision()

    @type collision() :: %{
      name: atom() | nil,
      origin: {position(), orientation()} | nil,
      geometry: geometry() | nil
    }

Collision geometry information

# color()

    @type color() :: %{red: float(), green: float(), blue: float(), alpha: float()}

RGBA color (values 0-1)

# geometry()

    @type geometry() ::
      {:box, %{x: float(), y: float(), z: float()}}
      | {:cylinder, %{radius: float(), height: float()}}
      | {:sphere, %{radius: float()}}
      | {:mesh, %{filename: String.t(), scale: float()}}

Geometry specification

# inertia()

    @type inertia() :: %{
      ixx: float(),
      iyy: float(),
      izz: float(),
      ixy: float(),
      ixz: float(),
      iyz: float()
    }

Inertia tensor components in kg·m²

# material()

    @type material() :: %{name: atom(), color: color() | nil, texture: String.t() | nil}

Material specification

# orientation()

    @type orientation() :: {float(), float(), float()}

Orientation as {roll, pitch, yaw} in radians

# position()

    @type position() :: {float(), float(), float()}

Position as {x, y, z} in meters

# t()

    @type t() :: %BB.Robot.Link{
      center_of_mass: position() | nil,
      child_joints: [atom()],
      collisions: [collision()],
      inertia: inertia() | nil,
      mass: float() | nil,
      name: atom(),
      parent_joint: atom() | nil,
      sensors: [atom()],
      visual: visual() | nil
    }

# visual()

    @type visual() :: %{
      origin: {position(), orientation()} | nil,
      geometry: geometry() | nil,
      material: material() | nil
    }

Visual geometry information