BB.Robot.Joint (bb v0.4.0)

View Source

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

Joints connect a parent link to a child link and define the kinematic relationship between them.

Summary

Types

Joint axis of rotation/translation as a normalised unit vector {x, y, z}.

Joint dynamics parameters.

Joint limits.

Joint origin transform from parent to child frame.

t()

Functions

Check if this joint is linear (prismatic).

Check if this joint has any degrees of freedom.

Check if this joint is rotational (revolute or continuous).

Types

axis()

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

Joint axis of rotation/translation as a normalised unit vector {x, y, z}.

dynamics()

@type dynamics() :: %{damping: float() | nil, friction: float() | nil}

Joint dynamics parameters.

  • damping: viscous damping coefficient
    • For revolute: N·m·s/rad
    • For prismatic: N·s/m
  • friction: Coulomb friction
    • For revolute: N·m
    • For prismatic: N

joint_type()

@type joint_type() ::
  :revolute | :continuous | :prismatic | :fixed | :floating | :planar

limits()

@type limits() :: %{
  lower: float() | nil,
  upper: float() | nil,
  velocity: float(),
  effort: float()
}

Joint limits.

For revolute/continuous joints:

  • lower/upper: angle limits in radians
  • velocity: max angular velocity in rad/s
  • effort: max torque in N·m

For prismatic joints:

  • lower/upper: position limits in meters
  • velocity: max linear velocity in m/s
  • effort: max effort in N·m (as defined in DSL)

origin()

@type origin() :: %{
  position: {float(), float(), float()},
  orientation: {float(), float(), float()}
}

Joint origin transform from parent to child frame.

  • position: {x, y, z} translation in meters
  • orientation: {roll, pitch, yaw} rotation in radians (XYZ Euler angles)

t()

@type t() :: %BB.Robot.Joint{
  actuators: [atom()],
  axis: axis() | nil,
  child_link: atom(),
  dynamics: dynamics() | nil,
  limits: limits() | nil,
  name: atom(),
  origin: origin() | nil,
  parent_link: atom(),
  sensors: [atom()],
  type: joint_type()
}

Functions

linear?(joint)

@spec linear?(t()) :: boolean()

Check if this joint is linear (prismatic).

movable?(joint)

@spec movable?(t()) :: boolean()

Check if this joint has any degrees of freedom.

rotational?(joint)

@spec rotational?(t()) :: boolean()

Check if this joint is rotational (revolute or continuous).