Skip to content

tesseract_robotics.tesseract_common

Common types, utilities, and resource handling.

Transforms

Isometry3d

Eigen rigid-body transform (rotation + translation). Raw C++ binding.

Python
from tesseract_robotics.tesseract_common import Isometry3d
import numpy as np

# Identity transform
pose = Isometry3d.Identity()

# From a 4x4 matrix
mat = np.eye(4)
mat[:3, 3] = [0.5, 0.2, 0.3]
pose = Isometry3d(mat)

# Access components (translation() / rotation() / matrix() are METHODS)
position = pose.translation()  # np.array([x, y, z])
rotation = pose.rotation()     # 3x3 rotation matrix
matrix = pose.matrix()         # 4x4 homogeneous matrix

# Compose
combined = pose1 * pose2

Prefer planning.Pose for authoring

For building/serializing transforms in Python, use tesseract_robotics.planning.Pose — it accepts scalar-last quaternions (qx, qy, qz, qw) and offers from_xyz_quat, from_rpy, etc. Convert to an Isometry3d when calling the raw C++ API.

Python
from tesseract_robotics.planning import Pose
pose = Pose.from_xyz_quat(0.5, 0.2, 0.3, 0, 0, 0, 1)
iso = Isometry3d(pose.matrix)

Quaterniond

Eigen quaternion. Project canonical order is scalar-last [qx, qy, qz, qw] — use Quaterniond.from_xyzw(qx, qy, qz, qw) to build and access components via the q.x, q.y, q.z, q.w properties.

Python
from tesseract_robotics.tesseract_common import Quaterniond

q = Quaterniond.from_xyzw(0.0, 0.0, 0.0, 1.0)  # identity: scalar-last

# Component access — properties, not method calls.
print(f"x={q.x}, y={q.y}, z={q.z}, w={q.w}")

# Flat coefficient vector is also scalar-last (Eigen storage order).
qx, qy, qz, qw = q.coeffs()

rotation_matrix = q.toRotationMatrix()

Eigen's 4-double ctor is scalar-first — avoid in Python

Quaterniond(w, x, y, z) exists for direct Eigen interop but is the one signature in the binding that breaks the project convention. Use Quaterniond.from_xyzw(qx, qy, qz, qw) everywhere else.

q.coeffs(), q.vec(), the Quaterniond(Vector4d) ctor, and Pose's quaternion-returning factories all use scalar-last [qx, qy, qz, qw].

AngleAxisd

Axis-angle rotation representation.

Python
from tesseract_robotics.tesseract_common import AngleAxisd
import numpy as np

# 90 degrees around Z axis
aa = AngleAxisd(np.pi/2, np.array([0, 0, 1]))
rotation_matrix = aa.toRotationMatrix()

Resource Locators

GeneralResourceLocator

Resolves package:// URLs to file paths.

Python
from tesseract_robotics.tesseract_common import GeneralResourceLocator

locator = GeneralResourceLocator()

# Resolve package URL
resource = locator.locateResource("package://tesseract_support/urdf/abb_irb2400.urdf")
path = resource.getFilePath()

BytesResource

In-memory resource from bytes.

Python
from tesseract_robotics.tesseract_common import BytesResource

data = b"<robot name='test'></robot>"
resource = BytesResource("robot.urdf", data)

Collision

AllowedCollisionMatrix

Defines which link pairs to skip during collision checking.

Python
from tesseract_robotics.tesseract_common import AllowedCollisionMatrix

acm = AllowedCollisionMatrix()

# Allow collision between links
acm.addAllowedCollision("link_1", "link_2", "Adjacent links")

# Check if allowed
is_allowed = acm.isCollisionAllowed("link_1", "link_2")

# Remove entry
acm.removeAllowedCollision("link_1", "link_2")

# Clear all
acm.clearAllowedCollisions()

CollisionMarginData

Configure collision margins per link pair.

Python
from tesseract_robotics.tesseract_common import CollisionMarginData

margins = CollisionMarginData()
margins.setDefaultCollisionMargin(0.025)
margins.setPairCollisionMargin("link_a", "link_b", 0.05)

default = margins.getDefaultCollisionMargin()
pair_margin = margins.getPairCollisionMargin("link_a", "link_b")

State

JointState

Joint positions and velocities.

Python
from tesseract_robotics.tesseract_common import JointState

state = JointState()
state.joint_names = ["j1", "j2", "j3"]
state.position = np.array([0.0, 0.5, -0.5])
state.velocity = np.array([0.0, 0.0, 0.0])

KinematicLimits

Joint position, velocity, acceleration limits.

Python
from tesseract_robotics.tesseract_common import KinematicLimits

limits = kin_group.getLimits()
print(f"Position min: {limits.joint_limits.col(0)}")
print(f"Position max: {limits.joint_limits.col(1)}")
print(f"Velocity: {limits.velocity_limits}")
print(f"Acceleration: {limits.acceleration_limits}")

Manipulator Info

ManipulatorInfo

Describes a kinematic group configuration.

Python
from tesseract_robotics.tesseract_common import ManipulatorInfo

info = ManipulatorInfo()
info.manipulator = "manipulator"        # group name
info.working_frame = "base_link"        # reference frame
info.tcp_frame = "tool0"                # tool center point
info.tcp_offset = Isometry3d.Identity() # optional TCP offset

Logging

Control console_bridge logging level.

Python
from tesseract_robotics.tesseract_common import (
    getLogLevel, setLogLevel,
    CONSOLE_BRIDGE_LOG_NONE,
    CONSOLE_BRIDGE_LOG_ERROR,
    CONSOLE_BRIDGE_LOG_WARN,
    CONSOLE_BRIDGE_LOG_INFO,
    CONSOLE_BRIDGE_LOG_DEBUG,
)

# Suppress warnings
setLogLevel(CONSOLE_BRIDGE_LOG_ERROR)

# Enable debug output
setLogLevel(CONSOLE_BRIDGE_LOG_DEBUG)

Container Types

Type Description
TransformMap dict[str, Isometry3d] - link name to transform
VectorIsometry3d list[Isometry3d]
VectorVector3d list[np.ndarray] - list of 3D points

Auto-generated API Reference

tesseract_common Python bindings (nanobind)

EIGEN_DEFAULT_PREC module-attribute

Python
EIGEN_DEFAULT_PREC: float = 1e-12

CollisionMarginOverrideType module-attribute

Python
CollisionMarginOverrideType: TypeAlias = CollisionMarginPairOverrideType

CONSOLE_BRIDGE_LOG_DEBUG module-attribute

Python
CONSOLE_BRIDGE_LOG_DEBUG: LogLevel = CONSOLE_BRIDGE_LOG_DEBUG

CONSOLE_BRIDGE_LOG_INFO module-attribute

Python
CONSOLE_BRIDGE_LOG_INFO: LogLevel = CONSOLE_BRIDGE_LOG_INFO

CONSOLE_BRIDGE_LOG_WARN module-attribute

Python
CONSOLE_BRIDGE_LOG_WARN: LogLevel = CONSOLE_BRIDGE_LOG_WARN

CONSOLE_BRIDGE_LOG_ERROR module-attribute

Python
CONSOLE_BRIDGE_LOG_ERROR: LogLevel = CONSOLE_BRIDGE_LOG_ERROR

CONSOLE_BRIDGE_LOG_NONE module-attribute

Python
CONSOLE_BRIDGE_LOG_NONE: LogLevel = CONSOLE_BRIDGE_LOG_NONE

Isometry3d

matrix property

Python
matrix: Annotated[NDArray[float64], dict(shape=(4, 4), order=F)]

translation property

Python
translation: Annotated[NDArray[float64], dict(shape=3, order=C)]

rotation property

Python
rotation: Annotated[NDArray[float64], dict(shape=(3, 3), order=F)]

linear property

Python
linear: Annotated[NDArray[float64], dict(shape=(3, 3), order=F)]

Identity staticmethod

Python
Identity() -> Isometry3d

setIdentity

Python
setIdentity() -> None

inverse

Python
inverse() -> Isometry3d

translate

Python
translate(vec: Annotated[NDArray[float64], dict(shape=3, order=C)]) -> Isometry3d

pretranslate

Python
pretranslate(vec: Annotated[NDArray[float64], dict(shape=3, order=C)]) -> Isometry3d

isApprox

Python
isApprox(other: Isometry3d, prec: float = 1e-12) -> bool

__repr__

Python
__repr__() -> str

Translation3d

x property

Python
x: float

y property

Python
y: float

z property

Python
z: float

translation

Python
translation() -> Annotated[NDArray[numpy.float64], dict(shape=3, order=C)]

inverse

Python
inverse() -> Translation3d

isApprox

Python
isApprox(other: Translation3d, prec: float = 1e-12) -> bool

__repr__

Python
__repr__() -> str

Quaterniond

w property

Python
w: float

x property

Python
x: float

y property

Python
y: float

z property

Python
z: float

Identity staticmethod

Python
Identity() -> Quaterniond

FromTwoVectors staticmethod

Python
FromTwoVectors(a: Annotated[NDArray[float64], dict(shape=3, order=C)], b: Annotated[NDArray[float64], dict(shape=3, order=C)]) -> Quaterniond

from_xyzw staticmethod

Python
from_xyzw(qx: float, qy: float, qz: float, qw: float) -> Quaterniond

coeffs

Python
coeffs() -> Annotated[NDArray[numpy.float64], dict(shape=4, order=C)]

vec

Python
vec() -> Annotated[NDArray[numpy.float64], dict(shape=3, order=C)]

toRotationMatrix

Python
toRotationMatrix() -> Annotated[NDArray[numpy.float64], dict(shape=(3, 3), order=F)]

slerp

Python
slerp(t: float, other: Quaterniond) -> Quaterniond

conjugate

Python
conjugate() -> Quaterniond

inverse

Python
inverse() -> Quaterniond

dot

Python
dot(arg: Quaterniond) -> float

angularDistance

Python
angularDistance(arg: Quaterniond) -> float

norm

Python
norm() -> float

squaredNorm

Python
squaredNorm() -> float

normalize

Python
normalize() -> None

normalized

Python
normalized() -> Quaterniond

setIdentity

Python
setIdentity() -> None

isApprox

Python
isApprox(other: Quaterniond, prec: float = 1e-12) -> bool

to_rpy

Python
to_rpy() -> Annotated[NDArray[numpy.float64], dict(shape=3, order=C)]

eulerAngles

Python
eulerAngles(order: str) -> Annotated[NDArray[numpy.float64], dict(shape=3, order=C)]

__repr__

Python
__repr__() -> str

AngleAxisd

angle property

Python
angle: float

axis property

Python
axis: Annotated[NDArray[float64], dict(shape=3, order=C)]

inverse

Python
inverse() -> AngleAxisd

toRotationMatrix

Python
toRotationMatrix() -> Annotated[NDArray[numpy.float64], dict(shape=(3, 3), order=F)]

isApprox

Python
isApprox(other: AngleAxisd, prec: float = 1e-12) -> bool

__repr__

Python
__repr__() -> str

Hyperplane3d

normal property

Python
normal: Annotated[NDArray[float64], dict(shape=3, order=C)]

offset property

Python
offset: float

Through staticmethod

Python
Through(p0: Annotated[NDArray[float64], dict(shape=3, order=C)], p1: Annotated[NDArray[float64], dict(shape=3, order=C)], p2: Annotated[NDArray[float64], dict(shape=3, order=C)]) -> Hyperplane3d

coeffs

Python
coeffs() -> Annotated[NDArray[numpy.float64], dict(shape=4, order=C)]

signedDistance

Python
signedDistance(point: Annotated[NDArray[float64], dict(shape=3, order=C)]) -> float

absDistance

Python
absDistance(point: Annotated[NDArray[float64], dict(shape=3, order=C)]) -> float

projection

Python
projection(point: Annotated[NDArray[float64], dict(shape=3, order=C)]) -> Annotated[NDArray[numpy.float64], dict(shape=3, order=C)]

normalize

Python
normalize() -> Hyperplane3d

transform

Python
transform(transform: Isometry3d) -> Hyperplane3d

isApprox

Python
isApprox(other: Hyperplane3d, prec: float = 1e-12) -> bool

__repr__

Python
__repr__() -> str

ParametrizedLine3d

origin property

Python
origin: Annotated[NDArray[float64], dict(shape=3, order=C)]

direction property

Python
direction: Annotated[NDArray[float64], dict(shape=3, order=C)]

__init__

Python
__init__(origin: Annotated[NDArray[float64], dict(shape=3, order=C)], direction: Annotated[NDArray[float64], dict(shape=3, order=C)]) -> None

Through staticmethod

Python
Through(p0: Annotated[NDArray[float64], dict(shape=3, order=C)], p1: Annotated[NDArray[float64], dict(shape=3, order=C)]) -> ParametrizedLine3d

distance

Python
distance(point: Annotated[NDArray[float64], dict(shape=3, order=C)]) -> float

squaredDistance

Python
squaredDistance(point: Annotated[NDArray[float64], dict(shape=3, order=C)]) -> float

projection

Python
projection(point: Annotated[NDArray[float64], dict(shape=3, order=C)]) -> Annotated[NDArray[numpy.float64], dict(shape=3, order=C)]

pointAt

Python
pointAt(t: float) -> Annotated[NDArray[numpy.float64], dict(shape=3, order=C)]

intersectionParameter

Python
intersectionParameter(plane: Hyperplane3d) -> float

intersectionPoint

Python
intersectionPoint(plane: Hyperplane3d) -> Annotated[NDArray[numpy.float64], dict(shape=3, order=C)]

transform

Python
transform(transform: Isometry3d) -> ParametrizedLine3d

isApprox

Python
isApprox(other: ParametrizedLine3d, prec: float = 1e-12) -> bool

__repr__

Python
__repr__() -> str

FilesystemPath

string

Python
string() -> str

__str__

Python
__str__() -> str

__repr__

Python
__repr__() -> str

Resource

isFile

Python
isFile() -> bool

getUrl

Python
getUrl() -> str

getFilePath

Python
getFilePath() -> str

getResourceContents

Python
getResourceContents() -> bytes

getResourceContentStream

Python
getResourceContentStream() -> 'std::__1::basic_istream<char, std::__1::char_traits<char>>'

BytesResource

Bases: Resource

SimpleLocatedResource

Bases: Resource

ResourceLocator

__init__

Python
__init__() -> None

locateResource

Python
locateResource(arg: str) -> Resource

GeneralResourceLocator

Bases: ResourceLocator

__init__

Python
__init__() -> None

ManipulatorInfo

manipulator property writable

Python
manipulator: str

manipulator_ik_solver property writable

Python
manipulator_ik_solver: str

working_frame property writable

Python
working_frame: str

tcp_frame property writable

Python
tcp_frame: str

tcp_offset property writable

Python
tcp_offset: object

__init__

Python
__init__() -> None

__repr__

Python
__repr__() -> str

JointState

joint_names property writable

Python
joint_names: list[str]

position property writable

Python
position: Annotated[NDArray[float64], dict(shape=(None,), order=C)]

velocity property writable

Python
velocity: Annotated[NDArray[float64], dict(shape=(None,), order=C)]

acceleration property writable

Python
acceleration: Annotated[NDArray[float64], dict(shape=(None,), order=C)]

effort property writable

Python
effort: Annotated[NDArray[float64], dict(shape=(None,), order=C)]

time property writable

Python
time: float

AllowedCollisionMatrix

__init__

Python
__init__() -> None

addAllowedCollision

Python
addAllowedCollision(arg0: str, arg1: str, arg2: str) -> None

removeAllowedCollision

Python
removeAllowedCollision(arg0: str, arg1: str) -> None

isCollisionAllowed

Python
isCollisionAllowed(arg0: str, arg1: str) -> bool

clearAllowedCollisions

Python
clearAllowedCollisions() -> None

getAllAllowedCollisions

Python
getAllAllowedCollisions() -> dict[tuple[str, str], str]

insertAllowedCollisionMatrix

Python
insertAllowedCollisionMatrix(arg: AllowedCollisionMatrix) -> None

CollisionMarginPairOverrideType

Bases: Enum

NONE class-attribute instance-attribute

Python
NONE = 0

REPLACE class-attribute instance-attribute

Python
REPLACE = 1

MODIFY class-attribute instance-attribute

Python
MODIFY = 2

CollisionMarginPairData

__init__

Python
__init__() -> None

setCollisionMargin

Python
setCollisionMargin(arg0: str, arg1: str, arg2: float) -> None

getCollisionMargin

Python
getCollisionMargin(arg0: str, arg1: str) -> float | None

getCollisionMargins

Python
getCollisionMargins() -> dict[tuple[str, str], float]

empty

Python
empty() -> bool

clear

Python
clear() -> None

CollisionMarginData

getDefaultCollisionMargin

Python
getDefaultCollisionMargin() -> float

setDefaultCollisionMargin

Python
setDefaultCollisionMargin(arg: float) -> None

getCollisionMargin

Python
getCollisionMargin(arg0: str, arg1: str) -> float

setCollisionMargin

Python
setCollisionMargin(arg0: str, arg1: str, arg2: float) -> None

getCollisionMarginPairData

Python
getCollisionMarginPairData() -> CollisionMarginPairData

getMaxCollisionMargin

Python
getMaxCollisionMargin() -> float

getPairCollisionMargin

Python
getPairCollisionMargin(arg0: str, arg1: str) -> float

setPairCollisionMargin

Python
setPairCollisionMargin(arg0: str, arg1: str, arg2: float) -> None

KinematicLimits

joint_limits property writable

Python
joint_limits: Annotated[NDArray[float64], dict(shape=(None, 2), order=F)]

velocity_limits property writable

Python
velocity_limits: Annotated[NDArray[float64], dict(shape=(None, 2), order=F)]

acceleration_limits property writable

Python
acceleration_limits: Annotated[NDArray[float64], dict(shape=(None, 2), order=F)]

__init__

Python
__init__() -> None

PluginInfo

class_name property writable

Python
class_name: str

config property writable

Python
config: 'YAML::Node'

__init__

Python
__init__() -> None

LogLevel

Bases: Enum

CONSOLE_BRIDGE_LOG_DEBUG class-attribute instance-attribute

Python
CONSOLE_BRIDGE_LOG_DEBUG = 0

CONSOLE_BRIDGE_LOG_INFO class-attribute instance-attribute

Python
CONSOLE_BRIDGE_LOG_INFO = 1

CONSOLE_BRIDGE_LOG_WARN class-attribute instance-attribute

Python
CONSOLE_BRIDGE_LOG_WARN = 2

CONSOLE_BRIDGE_LOG_ERROR class-attribute instance-attribute

Python
CONSOLE_BRIDGE_LOG_ERROR = 3

CONSOLE_BRIDGE_LOG_NONE class-attribute instance-attribute

Python
CONSOLE_BRIDGE_LOG_NONE = 4

OutputHandler

__init__

Python
__init__() -> None

log

Python
log(arg0: str, arg1: LogLevel, arg2: str, arg3: int) -> None

VectorVector3d

__init__

Python
__init__() -> None

__len__

Python
__len__() -> int

__getitem__

Python
__getitem__(arg: int) -> Annotated[NDArray[numpy.float64], dict(shape=3, order=C)]

__setitem__

Python
__setitem__(arg0: int, arg1: Annotated[NDArray[float64], dict(shape=3, order=C)]) -> None

append

Python
append(arg: Annotated[NDArray[float64], dict(shape=3, order=C)]) -> None

clear

Python
clear() -> None

VectorIsometry3d

__init__

Python
__init__() -> None

__len__

Python
__len__() -> int

__getitem__

Python
__getitem__(arg: int) -> Isometry3d

append

Python
append(arg: Isometry3d) -> None

clear

Python
clear() -> None

setLogLevel

Python
setLogLevel(level: LogLevel) -> None

getLogLevel

Python
getLogLevel() -> LogLevel

log

Python
log(filename: str, line: int, level: LogLevel, msg: str) -> None

useOutputHandler

Python
useOutputHandler(handler: OutputHandler) -> None

restorePreviousOutputHandler

Python
restorePreviousOutputHandler() -> None