BB.Robot.Link (bb v0.4.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 geometry information

RGBA color (values 0-1)

Geometry specification

Inertia tensor components in kg·m²

Material specification

Orientation as {roll, pitch, yaw} in radians

Position as {x, y, z} in meters

t()

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