Skip to content

tesseract_robotics.common

Common types, utilities, and resource handling.

Eigen arguments take arrays, lists and tuples

Every Eigen::Vector3d, VectorXd, Matrix3d, Matrix4d (and other dense Eigen) parameter accepts a NumPy array, a list or a tuple, nested for a matrix: iso.translate([0.5, 0.2, 0.3]), Isometry3d([x, y, z], q), Quaterniond(R.tolist()). The shape must match exactly ([1, 2] for a Vector3d raises TypeError, nothing is padded or truncated). Integers convert to float64; strings, None, complex numbers and ragged nesting raise TypeError, and an integer parameter (mesh faces) refuses floats. Returned matrices are always NumPy arrays. The exception is a parameter a function writes into (see Frame and error math): it needs the array itself.

Transforms

Isometry3d

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

Python
from tesseract_robotics.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 (read-only properties; each returns a copy)
position = pose.translation  # np.array([x, y, z])
rotation = pose.rotation     # 3x3 rotation matrix
matrix = pose.matrix         # 4x4 homogeneous matrix

# Compose
combined = pose1 * pose2

# Apply to many points at once: (N, 3) in, (N, 3) out, in one call
points = np.random.default_rng(0).normal(size=(1000, 3))
mapped = pose.apply_points(points)       # row i == pose * points[i], bitwise
rotated = pose.apply_directions(points)  # rotation only, no translation

apply_points and apply_directions take an (N, 3) array, including N = 0 and strided views such as a[:, :3], and return a new (N, 3) float64 array. A single point stays pose * p; a (3,) array passed to apply_points raises TypeError. Each row is computed exactly as pose * p computes it, so the results agree bit for bit. A Python loop over pose * p costs about 1 µs per point; apply_points costs about 1 µs per call up to a few dozen points.

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.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()

One rotation per quaternion

toRotationMatrix, to_rpy, eulerAngles, q * v, AngleAxisd(q) and the Isometry3d constructors, *, rotate and prerotate all convert the same quaternion, so Isometry3d(q).linear equals q.toRotationMatrix() bit for bit. A quaternion with |q.squaredNorm() - 1| <= 6·eps (unit to float64 rounding) is converted as given; any other is divided by its norm first, so a non-unit quaternion reads out as the rotation of its direction. A zero or non-finite quaternion raises DegenerateRotationError.

No scalar-first constructor

Eigen's Quaterniond(w, x, y, z) is not bound: four scalars raise TypeError. Use Quaterniond.from_xyzw(qx, qy, qz, qw) or Quaterniond([qx, qy, qz, qw]); reorder when porting C++.

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.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()

nearest_rotation

The rotation closest to a 3x3 matrix in the Frobenius norm: U·diag(1, 1, det(U·Vᵀ))·Vᵀ from the SVD M = U·Σ·Vᵀ (Eigen's JacobiSVD). Use it to project a rotation that carries arithmetic noise (a pose stored from float32 math) back onto SO(3).

Python
from tesseract_robotics.common import Quaterniond, nearest_rotation

R = nearest_rotation(noisy_rotation)  # (3, 3) float64, det +1
q = Quaterniond(R)                    # passes the orthonormality check
  • The result is always a proper rotation (det +1). For a reflection (det(M) < 0) it is the nearest rotation, not the orthogonal factor: the smallest singular direction flips.
  • Not bitwise idempotent: an exact rotation comes back within a few ulp (measured ≤ 5.5 ε over 10 000 random rotations, osx-arm64), because U·Vᵀ re-rounds.
  • A NaN or infinite entry raises NonFiniteMatrixError (a ValueError); a shape other than 3x3 raises TypeError.
  • The minimiser is unique only for rank ≥ 2 (and σ₂ > σ₃ when det(M) < 0). Otherwise one minimiser comes back without warning: the zero matrix, diag(1, 0, 0) and diag(1, 1, -1) all return the identity.

Rigidity readouts

The checks that accept a matrix as a rotation, in Eigen: orthonormality_residual(R) is max|RᵀR − I| of a 3x3 (0 for an exact rotation) and determinant(R) its determinant. The stack forms read the rotation block of each transform of an (M, 4, 4) stack, and norm_each the norm of each row of an (N, 3) array.

Python
from tesseract_robotics.common import (
    orthonormality_residual_each,
    rotation_determinant_each,
)

residual = orthonormality_residual_each(stack)  # (M,): row i bitwise orthonormality_residual(stack[i, :3, :3])
proper = rotation_determinant_each(stack) > 0.0  # (M,): row i bitwise determinant(stack[i, :3, :3])

Frame and error math

Re-base twists and jacobians, and compute pose errors, with tesseract's own math. A twist is a (6,) array [vx, vy, vz, wx, wy, wz]; a jacobian is (6, n).

Python
import numpy as np
from tesseract_robotics.common import Isometry3d, jacobianChangeBase, jacobianChangeRefPoint

joint_group = env.getJointGroup("manipulator")
q = np.zeros(6)
T_new_base = Isometry3d.Identity()
J = joint_group.calcJacobian(q, "tool0")    # (6, n), Fortran order, in the group base frame
jacobianChangeBase(J, T_new_base)           # rotate every column into T_new_base, in place
jacobianChangeRefPoint(J, [0.0, 0.0, 0.1])  # v += ω × p, in place

In place: these functions write into the array you pass

twistChangeRefPoint, twistChangeBase, jacobianChangeBase, jacobianChangeRefPoint and applyTolerances return None and change their first argument, as in C++. They raise TypeError for anything they would have to convert first, since the result would be written into a temporary copy and lost: a list or tuple, float32, read-only or non-contiguous arrays, and C-order (6, n > 1) jacobians. calcJacobian returns Fortran order; convert others with np.asfortranarray.

jacobianChangeRefPoint takes the point in the jacobian's base frame. To match calcJacobian(q, link, p), whose p is in the link frame, rotate it first: jacobianChangeRefPoint(J, joint_group.calcFwdKin(q)[link].rotation @ p).

Pose errors are [translation, angle-axis rotation] 6-vectors:

Python
from tesseract_robotics.common import (
    applyTolerances, calcJacobianTransformErrorDiff, calcRotationalError, calcTransformError,
)

calcRotationalError(R)               # θ·axis, θ in [-π, π]
calcTransformError(t1, t2)           # error of t1.inverse() * t2

# Finite-difference column of a pose-error jacobian. Subtracting two calcTransformError
# results jumps by ~2π near the angle-axis ±π boundary; this does not.
d = calcJacobianTransformErrorDiff(target, source, source_perturbed)
d = calcJacobianTransformErrorDiff(target, target_perturbed, source, source_perturbed)
lower_tol, upper_tol = np.full(6, -1.0), np.full(6, 1.0)
d = calcJacobianTransformErrorDiff(target, source, source_perturbed, lower_tol, upper_tol)

v = np.array([-2.0, 0.5, 3.0])
applyTolerances(v, np.full(3, -1.0), np.full(3, 1.0))  # v is now [-1., 0., 2.]

The tolerance pair of applyTolerances and of the tolerance overloads of calcJacobianTransformErrorDiff must be both empty (no tolerance) or both of the value's size (6 for the error diff); anything else raises ToleranceSizeMismatchError, a ValueError.

Ids

Links and joints are addressed by id (upstream IDENTITY_DESIGN.md). An id is built from a name; anywhere an id is expected a str converts implicitly.

Python
from tesseract_robotics.common import JointId, LinkId, LinkIdPair

tool0 = LinkId("tool0")
tool0.name()                 # "tool0"; str(tool0) is the same
tool0 == "tool0"             # True: ids compare equal to their name
{tool0: 1}["tool0"]          # 1: hash(id) == hash(name), so str keys find id-keyed entries
LinkIdPair("a", "b").orderedNameView()   # ("a", "b"), alphabetical

Maps keyed by a link or joint (SceneState.link_transforms, calcFwdKin, getLinkTransforms, ...) are plain dict[str, ...] keyed by name, so transforms["tool0"] is exactly typed. A parameter that takes such a map accepts names or ids as keys. LinkId and JointId do not convert into each other.

Type checkers

The stubs accept LinkId | str wherever a parameter takes an id, and Mapping[LinkId, V] | Mapping[str, V] wherever it takes an id-keyed map.

Resource Locators

GeneralResourceLocator

Resolves package:// URLs to file paths.

Python
from tesseract_robotics import get_tesseract_resource_path
from tesseract_robotics.common import GeneralResourceLocator

# tesseract's support data (tesseract-robotics-nanobind-support) as a search path
locator = GeneralResourceLocator(paths=[get_tesseract_resource_path()])

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

tesseract_robotics never adds search paths itself: a locator searches what it is given and the environment variables below.

A package is a directory that holds a package.xml; its name is the directory name. The locator finds packages in the directories it is given and in their subdirectories. Without arguments it reads TESSERACT_RESOURCE_PATH, ROS_PACKAGE_PATH and AMENT_PREFIX_PATH. Both other constructors take keyword arguments only, because a positional list[str] could mean either directories or environment variable names:

Python
from pathlib import Path

locator = GeneralResourceLocator(paths=[Path("~/ws/src").expanduser()])  # + the default env vars
locator = GeneralResourceLocator(environment_variables=["MY_RESOURCE_PATH"])

locator.addPath(Path("/opt/robots"))         # False if the directory does not exist
locator.loadEnvironmentVariable("MY_PATHS")  # False if the variable is unset

locateResource returns None when it cannot resolve the url.

BytesResource

In-memory resource from bytes.

Python
from tesseract_robotics.common import BytesResource

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

Every Resource is also a ResourceLocator: resource.locateResource(url) resolves a url relative to the resource, through the parent locator it was built with (None without a parent). BytesResource first asks the parent for the url as given, then for the file next to its own url:

Python
urdf = BytesResource("package://my_robot/urdf/robot.urdf", data, parent=locator)
mesh = urdf.locateResource("base.stl")  # tries "base.stl", then "package://my_robot/urdf/base.stl"

Collision

AllowedCollisionMatrix

Defines which link pairs to skip during collision checking.

Python
from tesseract_robotics.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()

An ACM converts to and from its entries, a dict[LinkIdPair, str]. The constructor takes LinkIdPair or (str, str) keys and orders each pair, so ("link_b", "link_a") is stored as ("link_a", "link_b"). A LinkIdPair is unordered and never equals a tuple: index the entries dict with a LinkIdPair, not a tuple.

Python
from tesseract_robotics.common import (
    AllowedCollisionMatrix, LinkIdPair, getAllowedCollisions,
)

acm = AllowedCollisionMatrix({("link_b", "link_a"): "Adjacent links"})
entries = acm.getAllAllowedCollisions()  # {LinkIdPair(link_a, link_b): "Adjacent links"}
assert entries[LinkIdPair("link_b", "link_a")] == "Adjacent links"
assert ("link_a", "link_b") not in entries  # a tuple never equals a LinkIdPair

print(acm)                               # one "link=<a> link=<b> reason=<r>" line per entry
acm.reserveAllowedCollisionMatrix(100)   # pre-size; entries unchanged

# Links allowed to collide with any of the given links; each partner once unless
# remove_duplicates=False. The order follows the dict's, so treat it as a set.
assert {str(link) for link in getAllowedCollisions(["link_a"], entries)} == {"link_b"}

acm.removeAllowedCollision("link_a")     # drop every entry involving link_a
assert not acm.getAllAllowedCollisions()

CollisionMarginData

Configure collision margins per link pair.

Python
from tesseract_robotics.common import CollisionMarginData

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

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

CollisionMarginPairData holds the pair margins alone. Both types build from pair data, shift and scale every margin, and merge another set of pair margins:

Python
from tesseract_robotics.common import (
    CollisionMarginData,
    CollisionMarginPairData,
    CollisionMarginPairOverrideType,
)

pairs = CollisionMarginPairData({("link_a", "link_b"): 0.05, ("link_a", "link_c"): 0.02})
margins = CollisionMarginData(0.025, pairs)  # or CollisionMarginData(pairs): default 0.0

margins.incrementMargins(0.01)  # default and every pair margin +0.01 m
margins.scaleMargins(2.0)       # then x2

# MODIFY sets the given pairs and keeps the rest; REPLACE keeps only the given pairs.
margins.apply(CollisionMarginPairData({("link_b", "link_d"): 0.07}), CollisionMarginPairOverrideType.MODIFY)

margins.getMaxCollisionMargin()          # largest margin overall
margins.getMaxCollisionMargin("link_a")  # largest margin involving link_a (at least the default)
pairs.getMaxCollisionMargin("link_z")    # None: no pair margin involves link_z

State

JointState

Joint positions and velocities.

Python
from tesseract_robotics.common import JointState

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

JointTrajectory

A sequence of JointStates with a description and a uuid (its canonical string; a malformed string raises ValueError). It behaves like a list of states: len, indexing (negative indices count from the end; out of range raises IndexError), assignment and iteration, plus push_back, pop_back, front, back, at, clear and empty.

Python
from tesseract_robotics.common import JointState, JointTrajectory

names = ["j1", "j2", "j3"]
traj = JointTrajectory([JointState(names, np.zeros(3))], "approach")
traj.push_back(JointState(names, np.array([0.0, 0.5, -0.5])))

js = traj[-1]
js.time = 1.0
traj[-1] = js  # write back: element access returns a copy

Element access returns a copy

traj[i], front(), back(), at(i), iteration and the states list are copies, so traj[0].time = 1.0 changes nothing. Assign the edited state back with traj[0] = js, or assign a whole new list to traj.states. A reference into the underlying vector would dangle as soon as push_back reallocated it.

Trajectories compare by value (== compares uuid, description and states) and are unhashable.

KinematicLimits

Joint position, velocity, acceleration limits.

Python
from tesseract_robotics.common import KinematicLimits

limits = kin_group.getLimits()
print(f"Position min: {limits.joint_limits[:, 0]}")
print(f"Position max: {limits.joint_limits[:, 1]}")
print(f"Velocity: {limits.velocity_limits}")
print(f"Acceleration: {limits.acceleration_limits}")
print(f"Jerk: {limits.jerk_limits}")

Each field is an (n, 2) array of [lower, upper] rows. limits.resize(n) resizes all four to (n, 2); their values are unset afterwards, so assign them before use.

Three free functions check or clamp joint values against an (n, 2) limit array:

Python
import numpy as np
from tesseract_robotics.common import enforceLimits, isWithinLimits, satisfiesLimits

limits = np.array([[-1.0, 1.0], [-2.0, 2.0]])
isWithinLimits(np.array([0.5, -1.5]), limits)   # True: inside or on the bounds, no tolerance
satisfiesLimits(np.array([1.0 + 1e-7, 0.0]), limits)  # True: within the 1e-6 default max_diff
enforceLimits(np.array([1.5, -3.0]), limits)    # array([ 1., -2.]): a clamped copy

enforceLimits returns a new array and leaves its input unchanged (C++ clamps in place). isWithinLimits and enforceLimits raise LimitsSizeMismatchError (a ValueError) when the number of values differs from the number of limit rows.

Manipulator Info

ManipulatorInfo

Describes a kinematic group configuration.

Python
from tesseract_robotics.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

# or all at once; tcp_offset (a link name or an Isometry3d) defaults to the identity
info = ManipulatorInfo("manipulator", "base_link", "tool0")

tcp_offset holds a str (a link name) or an Isometry3d; any other type raises TypeError. Reading it returns a copy, so assign a new value instead of editing it in place.

info.empty() is True unless manipulator, working_frame and tcp_frame are all set. base.getCombined(override) returns a copy of base with every non-empty field of override; an overriding tcp_frame brings override.tcp_offset along with it:

Python
override = ManipulatorInfo()
override.tcp_frame = "tool1"
combined = info.getCombined(override)  # tcp_frame "tool1", tcp_offset from override

Plugin Info

Plugin configuration for the four plugin loaders: KinematicsPluginInfo, ContactManagersPluginInfo, ProfilesPluginInfo and TaskComposerPluginInfo. Each has search_paths, search_libraries, insert(other), clear(), empty() and a read-only CONFIG_KEY (its key in a tesseract YAML config, e.g. "contact_manager_plugins").

Python
from tesseract_robotics.common import (
    ContactManagersPluginInfo, PluginInfo, PluginInfoContainer,
)

bullet = PluginInfo()
bullet.class_name = "BulletDiscreteBVHManagerFactory"

info = ContactManagersPluginInfo()
info.search_libraries = ["tesseract_collision_bullet_factories"]
info.discrete_plugin_infos.default_plugin = "BulletDiscreteBVHManager"
info.discrete_plugin_infos.plugins = {"BulletDiscreteBVHManager": bullet}

Note

A PluginInfoContainer field (discrete_plugin_infos, continuous_plugin_infos, executor_plugin_infos, task_plugin_infos) is a reference: editing it in place persists. A dict field (PluginInfoContainer.plugins, ProfilesPluginInfo.plugin_infos, KinematicsPluginInfo.fwd_plugin_infos) converts to a fresh dict on every access: assign the whole field, since info.plugin_infos["x"] = ... edits a copy.

Calibration Info

CalibrationInfo holds calibrated joint origins: for each joint name in joints, the environment replaces that joint's origin (a ChangeJointOriginCommand). An SRDF carries one through its <calibration_config> file, read into SRDFModel.calibration_info.

Python
from tesseract_robotics.common import CalibrationInfo, Isometry3d

info = CalibrationInfo()
info.joints = {"joint_a1": Isometry3d.Identity()}  # assign the whole dict
other = CalibrationInfo()
other.joints = {"joint_a2": Isometry3d.Identity()}
info.insert(other)  # overwrites by joint name
assert CalibrationInfo.CONFIG_KEY == "calibration"

Note

joints converts to a fresh dict on every access: info.joints["j"] = t edits a copy. Equality is upstream's: each transform compares with isApprox(1e-5).

Every class on this page whose C++ type declares operator== compares by value (==, with the C++ tolerances) and is unhashable, except ResourceLocator and Resource, which compare by identity (their C++ operator== is always true). KinematicLimits of different shapes are unequal.

Logging

Tesseract logs through spdlog (upstream #1367). The default logger is named "tesseract"; its level controls tesseract's console output.

Python
from tesseract_robotics.common import (
    LogLevel, addLogRecordHandler, getLogger, isLogLevelEnabled, removeLogRecordHandler,
)

logger = getLogger()              # getLogger("tesseract")
logger.set_level(LogLevel.err)    # suppress warnings
logger.set_level(LogLevel.debug)  # enable debug output
assert isLogLevelEnabled(LogLevel.debug)

# Route records into Python (any thread; the handler runs with the GIL held)
records = []
handler_id = addLogRecordHandler(records.append)
...
removeLogRecordHandler(handler_id)

A LogRecord carries level, message, logger_name, component_name, attributes, timestamp, filename, line and function_name. An exception raised by a handler is reported through sys.unraisablehook.

A handler sees every record in addition to the logger's sinks, which still write to stderr. To send tesseract's output to Python logging instead, replace the sinks: a record then goes to each sink whose level admits it, once.

Python
import logging
from tesseract_robotics.common import PythonLoggingSink, StderrSink, getLogger

sink = PythonLoggingSink("myapp.tesseract")  # records go to logging.getLogger("myapp.tesseract")
sink.set_pattern("%v (%s:%#)")              # spdlog pattern for the text; "%v" (the message) by default
getLogger().sinks = [sink]                    # replaces stderr; assign before other threads log

getLogger().sinks = [StderrSink()]            # back to stderr

Each Python LogRecord gets the level (spdlog trace maps to 5, below DEBUG), the source pathname, lineno and funcName, and the spdlog logger's name as the spdlog_logger attribute. Records the Python logger is not enabled for are dropped at the sink. A sink's own level (set_level) filters before that.

Sinks are C++ objects that Python holds a share of: a logger that keeps one does not keep a Python object alive, so the default logger, which outlives the interpreter, holds nothing of Python's at exit.

Python handlers, Python sinks and C++ threads

A Python handler or PythonLoggingSink takes the GIL on whichever thread logs. C++ code that joins logging threads while the caller holds the GIL then deadlocks: drain an executor's futures (wait()) before dropping it while a handler or Python sink is installed.

console_bridge API removed

setLogLevel, getLogLevel, log, useOutputHandler, restorePreviousOutputHandler, OutputHandler and the CONSOLE_BRIDGE_LOG_* constants are gone: upstream tesseract no longer logs through console_bridge, so they had no effect on its output.

Container Types

C++ containers cross as plain Python containers; there are no container classes to import.

C++ Python
std::vector<Isometry3d> list[Isometry3d]
std::vector<Vector3d> list[np.ndarray] - list of 3D points
link-name to transform maps dict[str, Isometry3d], keyed by link name

Reference

tesseract_common Python bindings (nanobind)

EIGEN_DEFAULT_PREC module-attribute

Python
EIGEN_DEFAULT_PREC: float = 1e-12

LinkId

name

Python
name() -> str

value

Python
value() -> int

isValid

Python
isValid() -> bool

__eq__

Python
__eq__(other: object) -> bool

__ne__

Python
__ne__(other: object) -> bool

__lt__

Python
__lt__(arg: LinkId | str) -> bool

__hash__

Python
__hash__() -> int

__str__

Python
__str__() -> str

__repr__

Python
__repr__() -> str

__getstate__

Python
__getstate__() -> str

__setstate__

Python
__setstate__(arg: str) -> None

JointId

name

Python
name() -> str

value

Python
value() -> int

isValid

Python
isValid() -> bool

__eq__

Python
__eq__(other: object) -> bool

__ne__

Python
__ne__(other: object) -> bool

__lt__

Python
__lt__(arg: JointId | str) -> bool

__hash__

Python
__hash__() -> int

__str__

Python
__str__() -> str

__repr__

Python
__repr__() -> str

__getstate__

Python
__getstate__() -> str

__setstate__

Python
__setstate__(arg: str) -> None

LinkIdPair

first

Python
first() -> LinkId

second

Python
second() -> LinkId

orderedNameView

Python
orderedNameView() -> tuple[str, str]

__eq__

Python
__eq__(other: object) -> bool

__ne__

Python
__ne__(other: object) -> bool

__hash__

Python
__hash__() -> int

__repr__

Python
__repr__() -> str

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() -> Self

apply_points

Python
apply_points(points: Annotated[NDArray[float64], dict(shape=(None, 3), writable=False)] | Sequence[Sequence[float]]) -> Annotated[NDArray[numpy.float64], dict(shape=(None, 3), order=C)]

apply_directions

Python
apply_directions(vectors: Annotated[NDArray[float64], dict(shape=(None, 3), writable=False)] | Sequence[Sequence[float]]) -> Annotated[NDArray[numpy.float64], dict(shape=(None, 3), order=C)]

compose_each

Python
compose_each(transforms: Annotated[NDArray[float64], dict(shape=(None, 4, 4), order=C, writable=False)]) -> Annotated[NDArray[numpy.float64], dict(shape=(None, 4, 4), order=C)]

precompose_each

Python
precompose_each(transforms: Annotated[NDArray[float64], dict(shape=(None, 4, 4), order=C, writable=False)]) -> Annotated[NDArray[numpy.float64], dict(shape=(None, 4, 4), order=C)]

translate

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

pretranslate

Python
pretranslate(vec: Annotated[NDArray[float64], dict(shape=3, order=C)] | Sequence[float]) -> 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)] | Sequence[float], b: Annotated[NDArray[float64], dict(shape=3, order=C)] | Sequence[float]) -> 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)]

The 3x3 rotation matrix; bitwise Isometry3d(q).linear. The quaternion is converted as given when |q.squaredNorm() - 1| <= 6·eps (unit to float64 rounding) and as q / |q| otherwise, so every member gives one quaternion the same rotation, bit for bit. A zero or non-finite quaternion raises DegenerateRotationError.

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)]

(roll, pitch, yaw) [rad] of R = Rz(yaw)·Ry(pitch)·Rx(roll), the inverse of from_rpy; read from toRotationMatrix(). The quaternion is converted as given when |q.squaredNorm() - 1| <= 6·eps (unit to float64 rounding) and as q / |q| otherwise, so every member gives one quaternion the same rotation, bit for bit. A zero or non-finite quaternion raises DegenerateRotationError.

eulerAngles

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

Intrinsic Euler angles [rad] in the 3-axis order (e.g. 'ZYX'), Eigen's eulerAngles of toRotationMatrix(). The quaternion is converted as given when |q.squaredNorm() - 1| <= 6·eps (unit to float64 rounding) and as q / |q| otherwise, so every member gives one quaternion the same rotation, bit for bit. A zero or non-finite quaternion raises DegenerateRotationError.

__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

NotRotationError

Bases: ValueError

A matrix offered as a rotation (or rigid transform) is not one: max|RᵀR − I| above EIGEN_DEFAULT_PREC, a non-finite entry, or a bottom row other than [0, 0, 0, 1].

DegenerateRotationError

Bases: ValueError

A quaternion or rotation axis that is zero or not finite: it names no rotation.

DegenerateGeometryError

Bases: ValueError

A Hyperplane3d / ParametrizedLine3d input with no direction: a zero normal or direction, coincident points, or collinear points.

NonFiniteMatrixError

Bases: ValueError

nearest_rotation got a matrix with a NaN or infinite entry.

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)] | Sequence[float], p1: Annotated[NDArray[float64], dict(shape=3, order=C)] | Sequence[float], p2: Annotated[NDArray[float64], dict(shape=3, order=C)] | Sequence[float]) -> 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)] | Sequence[float]) -> float

absDistance

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

projection

Python
projection(point: Annotated[NDArray[float64], dict(shape=3, order=C)] | Sequence[float]) -> 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)] | Sequence[float], direction: Annotated[NDArray[float64], dict(shape=3, order=C)] | Sequence[float]) -> None

Through staticmethod

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

distance

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

squaredDistance

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

projection

Python
projection(point: Annotated[NDArray[float64], dict(shape=3, order=C)] | Sequence[float]) -> 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

ResourceLocator

__init__

Python
__init__() -> None

locateResource

Python
locateResource(url: str) -> Resource | None

GeneralResourceLocator

Bases: ResourceLocator

__hash__ class-attribute instance-attribute

Python
__hash__: None = None

addPath

Python
addPath(path: str | PathLike) -> bool

loadEnvironmentVariable

Python
loadEnvironmentVariable(environment_variable: str) -> bool

__eq__

Python
__eq__(other: object) -> bool

__ne__

Python
__ne__(other: object) -> bool

Resource

Bases: ResourceLocator

isFile

Python
isFile() -> bool

getUrl

Python
getUrl() -> str

getFilePath

Python
getFilePath() -> str

getResourceContents

Python
getResourceContents() -> bytes

getResourceContentStream

Python
getResourceContentStream() -> io.BytesIO

BytesResource

Bases: Resource

__hash__ class-attribute instance-attribute

Python
__hash__: None = None

__eq__

Python
__eq__(other: object) -> bool

__ne__

Python
__ne__(other: object) -> bool

SimpleLocatedResource

Bases: Resource

__hash__ class-attribute instance-attribute

Python
__hash__: None = None

__eq__

Python
__eq__(other: object) -> bool

__ne__

Python
__ne__(other: object) -> bool

ManipulatorInfo

manipulator property writable

Python
manipulator: str

manipulator_ik_solver property writable

Python
manipulator_ik_solver: str

working_frame property writable

Python
working_frame: LinkId

tcp_frame property writable

Python
tcp_frame: LinkId

tcp_offset property writable

Python
tcp_offset: LinkId | Isometry3d

TCP offset: a link (LinkId, or its name as str) or a pose (Isometry3d). Reading returns a copy.

__hash__ class-attribute instance-attribute

Python
__hash__: None = None

getCombined

Python
getCombined(manip_info_override: ManipulatorInfo) -> ManipulatorInfo

empty

Python
empty() -> bool

__repr__

Python
__repr__() -> str

__eq__

Python
__eq__(other: object) -> bool

__ne__

Python
__ne__(other: object) -> bool

JointState

joint_ids property writable

Python
joint_ids: list[JointId]

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

__hash__ class-attribute instance-attribute

Python
__hash__: None = None

__eq__

Python
__eq__(other: object) -> bool

__ne__

Python
__ne__(other: object) -> bool

JointTrajectory

states property writable

Python
states: list[JointState]

description property writable

Python
description: str

uuid property writable

Python
uuid: str

UUID as its canonical string; a malformed string raises ValueError.

__hash__ class-attribute instance-attribute

Python
__hash__: None = None

__len__

Python
__len__() -> int

__getitem__

Python
__getitem__(index: int) -> JointState

A copy of the state at index; write back with traj[index] = js.

__setitem__

Python
__setitem__(index: int, state: JointState) -> None

__iter__

Python
__iter__() -> Iterator[JointState]

Iterate over copies of the states.

empty

Python
empty() -> bool

max_size

Python
max_size() -> int

reserve

Python
reserve(n: int) -> None

capacity

Python
capacity() -> int

shrink_to_fit

Python
shrink_to_fit() -> None

front

Python
front() -> JointState

back

Python
back() -> JointState

at

Python
at(n: int) -> JointState

clear

Python
clear() -> None

push_back

Python
push_back(x: JointState) -> None

pop_back

Python
pop_back() -> None

insert

Python
insert(index: int, state: JointState) -> None

__eq__

Python
__eq__(other: object) -> bool

__ne__

Python
__ne__(other: object) -> bool

AllowedCollisionMatrix

__hash__ class-attribute instance-attribute

Python
__hash__: None = None

isCollisionAllowed

Python
isCollisionAllowed(pair: LinkIdPair | tuple[str, str]) -> bool

clearAllowedCollisions

Python
clearAllowedCollisions() -> None

getAllAllowedCollisions

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

insertAllowedCollisionMatrix

Python
insertAllowedCollisionMatrix(arg: AllowedCollisionMatrix) -> None

reserveAllowedCollisionMatrix

Python
reserveAllowedCollisionMatrix(size: int) -> None

__str__

Python
__str__() -> str

__eq__

Python
__eq__(other: object) -> bool

__ne__

Python
__ne__(other: object) -> bool

ContactAllowedValidator

__call__

Python
__call__(pair: LinkIdPair | tuple[str, str]) -> bool

ACMContactAllowedValidator

CombinedContactAllowedValidatorType

Bases: Enum

AND class-attribute instance-attribute

Python
AND = 0

OR class-attribute instance-attribute

Python
OR = 1

CombinedContactAllowedValidator

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

__hash__ class-attribute instance-attribute

Python
__hash__: None = None

setCollisionMargin

Python
setCollisionMargin(link_id1: LinkId | str, link_id2: LinkId | str, margin: float) -> None

getCollisionMargin

Python
getCollisionMargin(pair: LinkIdPair | tuple[str, str]) -> float | None

getCollisionMargins

Python
getCollisionMargins() -> dict[LinkIdPair, float]

incrementMargins

Python
incrementMargins(increment: float) -> None

scaleMargins

Python
scaleMargins(scale: float) -> None

apply

Python
apply(pair_margin_data: CollisionMarginPairData, override_type: CollisionMarginPairOverrideType) -> None

empty

Python
empty() -> bool

clear

Python
clear() -> None

__eq__

Python
__eq__(other: object) -> bool

__ne__

Python
__ne__(other: object) -> bool

CollisionMarginData

__hash__ class-attribute instance-attribute

Python
__hash__: None = None

getDefaultCollisionMargin

Python
getDefaultCollisionMargin() -> float

setDefaultCollisionMargin

Python
setDefaultCollisionMargin(arg: float) -> None

setCollisionMargin

Python
setCollisionMargin(link_id1: LinkId | str, link_id2: LinkId | str, collision_margin: float) -> None

getCollisionMarginPairData

Python
getCollisionMarginPairData() -> CollisionMarginPairData

incrementMargins

Python
incrementMargins(increment: float) -> None

scaleMargins

Python
scaleMargins(scale: float) -> None

apply

Python
apply(pair_margin_data: CollisionMarginPairData, override_type: CollisionMarginPairOverrideType) -> None

__eq__

Python
__eq__(other: object) -> bool

__ne__

Python
__ne__(other: object) -> bool

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)]

jerk_limits property writable

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

__hash__ class-attribute instance-attribute

Python
__hash__: None = None

__init__

Python
__init__() -> None

resize

Python
resize(size: int) -> None

__eq__

Python
__eq__(other: object) -> bool

__ne__

Python
__ne__(other: object) -> bool

LimitsSizeMismatchError

Bases: ValueError

isWithinLimits / enforceLimits got values and limits of different lengths.

ToleranceSizeMismatchError

Bases: ValueError

lower_tolerance / upper_tolerance are not both empty or both the expected size.

PluginInfo

class_name property writable

Python
class_name: str

config property writable

Python
config: str

Plugin config as a YAML document string (a YAML::Node in C++).

__hash__ class-attribute instance-attribute

Python
__hash__: None = None

__init__

Python
__init__() -> None

getConfigString

Python
getConfigString() -> str

__eq__

Python
__eq__(other: object) -> bool

__ne__

Python
__ne__(other: object) -> bool

PluginInfoContainer

default_plugin property writable

Python
default_plugin: str

plugins property writable

Python
plugins: dict[str, PluginInfo]

__hash__ class-attribute instance-attribute

Python
__hash__: None = None

__init__

Python
__init__() -> None

clear

Python
clear() -> None

__eq__

Python
__eq__(other: object) -> bool

__ne__

Python
__ne__(other: object) -> bool

PluginDiscoveryInfo

Plugin library discovery: search paths and library names (without prefix or suffix).

search_paths property writable

Python
search_paths: list[str]

search_libraries property writable

Python
search_libraries: list[str]

__hash__ class-attribute instance-attribute

Python
__hash__: None = None

__init__

Python
__init__() -> None

insert

Python
insert(other: PluginDiscoveryInfo) -> None

clear

Python
clear() -> None

empty

Python
empty() -> bool

__eq__

Python
__eq__(other: object) -> bool

__ne__

Python
__ne__(other: object) -> bool

PropertyTree

A node of a configuration schema: a YAML value, metadata attributes and ordered children.

__init__

Python
__init__() -> None

applyConfig

Python
applyConfig(config: str, allow_extra_properties: bool = False) -> list[str]

Merge the YAML config text into the schema and validate it; returns every error, empty when valid. A key the schema does not declare is an error unless allow_extra_properties. Malformed YAML raises ValueError.

validate

Python
validate(allow_extra_properties: bool = False) -> list[str]

Every validation error of the tree, empty when valid.

at

Python
at(key: str) -> PropertyTree

The child at key; raises IndexError when absent.

__getitem__

Python
__getitem__(key: str) -> PropertyTree

The child at key; raises KeyError when absent.

find

Python
find(key: str) -> PropertyTree

The child at key, or None.

__contains__

Python
__contains__(key: str) -> bool

setValue

Python
setValue(value: str) -> None

Set the value from YAML text.

getValue

Python
getValue() -> str

The value as YAML text.

isNull

Python
isNull() -> bool

isContainer

Python
isContainer() -> bool

keys

Python
keys() -> list[str]

The child keys, in insertion order.

hasAttribute

Python
hasAttribute(name: str) -> bool

getAttribute

Python
getAttribute(name: str) -> str | None

The attribute as YAML text, or None.

getAttributeKeys

Python
getAttributeKeys() -> list[str]

isRequired

Python
isRequired() -> bool

fromYAML staticmethod

Python
fromYAML(text: str) -> PropertyTree

A tree from the YAML that toYAML(exclude_attributes=False) writes.

toYAML

Python
toYAML(exclude_attributes: bool = True) -> str

The tree as YAML text.

size

Python
size() -> int

__len__

Python
__len__() -> int

empty

Python
empty() -> bool

__bool__

Python
__bool__() -> bool

__str__

Python
__str__() -> str

KinematicsPluginInfo

Bases: PluginDiscoveryInfo

search_paths property writable

Python
search_paths: list[str]

search_libraries property writable

Python
search_libraries: list[str]

fwd_plugin_infos property writable

Python
fwd_plugin_infos: dict[str, PluginInfoContainer]

inv_plugin_infos property writable

Python
inv_plugin_infos: dict[str, PluginInfoContainer]

CONFIG_KEY class-attribute instance-attribute

Python
CONFIG_KEY: str = 'kinematic_plugins'

__hash__ class-attribute instance-attribute

Python
__hash__: None = None

__init__

Python
__init__() -> None

clear

Python
clear() -> None

empty

Python
empty() -> bool

__eq__

Python
__eq__(other: object) -> bool

__ne__

Python
__ne__(other: object) -> bool

ContactManagersPluginInfo

Bases: PluginDiscoveryInfo

search_paths property writable

Python
search_paths: list[str]

search_libraries property writable

Python
search_libraries: list[str]

discrete_plugin_infos property writable

Python
discrete_plugin_infos: PluginInfoContainer

continuous_plugin_infos property writable

Python
continuous_plugin_infos: PluginInfoContainer

CONFIG_KEY class-attribute instance-attribute

Python
CONFIG_KEY: str = 'contact_manager_plugins'

__hash__ class-attribute instance-attribute

Python
__hash__: None = None

__init__

Python
__init__() -> None

clear

Python
clear() -> None

empty

Python
empty() -> bool

__eq__

Python
__eq__(other: object) -> bool

__ne__

Python
__ne__(other: object) -> bool

CalibrationInfo

joints property writable

Python
joints: dict[str, Isometry3d]

Joint name -> calibrated joint origin. A copy on read: assign the whole dict, or use insert.

CONFIG_KEY class-attribute instance-attribute

Python
CONFIG_KEY: str = 'calibration'

__hash__ class-attribute instance-attribute

Python
__hash__: None = None

__init__

Python
__init__() -> None

insert

Python
insert(other: CalibrationInfo) -> None

clear

Python
clear() -> None

empty

Python
empty() -> bool

__eq__

Python
__eq__(other: object) -> bool

__ne__

Python
__ne__(other: object) -> bool

TaskComposerPluginInfo

Bases: PluginDiscoveryInfo

search_paths property writable

Python
search_paths: list[str]

search_libraries property writable

Python
search_libraries: list[str]

executor_plugin_infos property writable

Python
executor_plugin_infos: PluginInfoContainer

task_plugin_infos property writable

Python
task_plugin_infos: PluginInfoContainer

CONFIG_KEY class-attribute instance-attribute

Python
CONFIG_KEY: str = 'task_composer_plugins'

__hash__ class-attribute instance-attribute

Python
__hash__: None = None

__init__

Python
__init__() -> None

clear

Python
clear() -> None

empty

Python
empty() -> bool

__eq__

Python
__eq__(other: object) -> bool

__ne__

Python
__ne__(other: object) -> bool

ProfilesPluginInfo

Bases: PluginDiscoveryInfo

search_paths property writable

Python
search_paths: list[str]

search_libraries property writable

Python
search_libraries: list[str]

plugin_infos property writable

Python
plugin_infos: dict[str, dict[str, PluginInfo]]

CONFIG_KEY class-attribute instance-attribute

Python
CONFIG_KEY: str = 'profile_plugins'

__hash__ class-attribute instance-attribute

Python
__hash__: None = None

__init__

Python
__init__() -> None

clear

Python
clear() -> None

empty

Python
empty() -> bool

__eq__

Python
__eq__(other: object) -> bool

__ne__

Python
__ne__(other: object) -> bool

LogLevel

Bases: Enum

trace class-attribute instance-attribute

Python
trace = 0

debug class-attribute instance-attribute

Python
debug = 1

info class-attribute instance-attribute

Python
info = 2

warn class-attribute instance-attribute

Python
warn = 3

err class-attribute instance-attribute

Python
err = 4

critical class-attribute instance-attribute

Python
critical = 5

off class-attribute instance-attribute

Python
off = 6

LogSink

An spdlog sink: one place a Logger writes its records

level

Python
level() -> LogLevel

set_level

Python
set_level(level: LogLevel) -> None

Drop records below this level at this sink only

set_pattern

Python
set_pattern(pattern: str) -> None

Format records with an spdlog pattern (e.g. '%v (%g:%#)' for the message and its source)

StderrSink

Bases: LogSink

Colored standard error, the kind of sink tesseract's default logger starts with

__init__

Python
__init__() -> None

PythonLoggingSink

Bases: LogSink

Writes each record to Python's logging module, on the logger named name, with its level, source file, line and function; the text is the sink's pattern ('%v', the message, by default). Records the Python logger is not enabled for are dropped there. Takes the GIL on the logging thread.

name property

Python
name: str

The Python logger records go to

__init__

Python
__init__(name: str = 'tesseract') -> None

Logger

A named spdlog logger (tesseract's default is 'tesseract')

sinks property writable

Python
sinks: list[LogSink]

The logger's sinks, as a list. Assign a new list to change them, before other threads log (spdlog's sink list is not thread safe), e.g. at startup. A logger created later by getLogger(name) copies the default logger's sinks.

name

Python
name() -> str

level

Python
level() -> LogLevel

set_level

Python
set_level(level: LogLevel) -> None

should_log

Python
should_log(level: LogLevel) -> bool

set_pattern

Python
set_pattern(pattern: str) -> None

Set the pattern of every sink

flush

Python
flush() -> None

LogRecord

One tesseract log event, as passed to a record handler

timestamp property

Python
timestamp: datetime

level property

Python
level: LogLevel

logger_name property

Python
logger_name: str

component_name property

Python
component_name: str

message property

Python
message: str

attributes property

Python
attributes: dict[str, bool | int | int | float | str]

filename property

Python
filename: str

line property

Python
line: int

function_name property

Python
function_name: str

apply_directions_each

Python
apply_directions_each(transforms: Annotated[NDArray[float64], dict(shape=(None, 4, 4), order=C, writable=False)], vectors: Annotated[NDArray[float64], dict(shape=(None, 3), writable=False)] | Sequence[Sequence[float]]) -> Annotated[NDArray[numpy.float64], dict(shape=(None, 3), order=C)]

nearest_rotation

Python
nearest_rotation(matrix: Annotated[NDArray[float64], dict(shape=(3, 3), order=F)] | Sequence[Sequence[float]]) -> Annotated[NDArray[numpy.float64], dict(shape=(3, 3), order=F)]

The rotation closest to a 3x3 matrix in the Frobenius norm, U·diag(1, 1, det(U·Vᵀ))·Vᵀ from its SVD; det is +1 also for a reflection. A new array; the input is unchanged.

orthonormality_residual

Python
orthonormality_residual(matrix: Annotated[NDArray[float64], dict(shape=(3, 3), order=F)] | Sequence[Sequence[float]]) -> float

max|RᵀR − I| of a 3x3 matrix, dimensionless: 0 for an exact rotation.

determinant

Python
determinant(matrix: Annotated[NDArray[float64], dict(shape=(3, 3), order=F)] | Sequence[Sequence[float]]) -> float

The determinant of a 3x3 matrix: +1 for a rotation, -1 for a reflection.

orthonormality_residual_each

Python
orthonormality_residual_each(transforms: Annotated[NDArray[float64], dict(shape=(None, 4, 4), order=C, writable=False)]) -> Annotated[NDArray[numpy.float64], dict(shape=(None,), order=C)]

max|RᵀR − I| of the rotation block of each transform of an (M, 4, 4) stack, (M,); row i is bitwise orthonormality_residual(stack[i, :3, :3]).

rotation_determinant_each

Python
rotation_determinant_each(transforms: Annotated[NDArray[float64], dict(shape=(None, 4, 4), order=C, writable=False)]) -> Annotated[NDArray[numpy.float64], dict(shape=(None,), order=C)]

The determinant of the rotation block of each transform of an (M, 4, 4) stack, (M,); row i is bitwise determinant(stack[i, :3, :3]).

norm_each

Python
norm_each(vectors: Annotated[NDArray[float64], dict(shape=(None, 3), writable=False)] | Sequence[Sequence[float]]) -> Annotated[NDArray[numpy.float64], dict(shape=(None,), order=C)]

The Euclidean norm of each row of an (N, 3) array, (N,).

getAllowedCollisions

Python
getAllowedCollisions(link_ids: Sequence[LinkId | str], acm_entries: Mapping[LinkIdPair, str] | Mapping[tuple[str, str], str], remove_duplicates: bool = True) -> list[LinkId]

isWithinLimits

Python
isWithinLimits(values: Annotated[NDArray[float64], dict(shape=(None,), writable=False)] | Sequence[float], limits: Annotated[NDArray[float64], dict(shape=(None, 2), writable=False)] | Sequence[Sequence[float]]) -> bool

True if every value lies in its [lower, upper] row; no tolerance.

enforceLimits

Python
enforceLimits(values: Annotated[NDArray[float64], dict(shape=(None,), writable=False)] | Sequence[float], limits: Annotated[NDArray[float64], dict(shape=(None, 2), writable=False)] | Sequence[Sequence[float]]) -> Annotated[NDArray[numpy.float64], dict(shape=(None,), order=C)]

values clamped into limits, as a new array; the input is unchanged.

twistChangeRefPoint

Python
twistChangeRefPoint(twist: Annotated[NDArray[float64], dict(shape=6, order=C)], ref_point: Annotated[NDArray[float64], dict(shape=3, writable=False)] | Sequence[float]) -> None

Move the twist's reference point by ref_point (v += ω × ref_point), in place.

twistChangeBase

Python
twistChangeBase(twist: Annotated[NDArray[float64], dict(shape=6, order=C)], change_base: Isometry3d) -> None

Rotate the twist into the frame change_base, in place.

jacobianChangeBase

Python
jacobianChangeBase(jacobian: Annotated[NDArray[float64], dict(shape=(6, None))], change_base: Isometry3d) -> None

Rotate every column of a (6, n) Fortran-order jacobian into change_base, in place.

jacobianChangeRefPoint

Python
jacobianChangeRefPoint(jacobian: Annotated[NDArray[float64], dict(shape=(6, None))], ref_point: Annotated[NDArray[float64], dict(shape=3, writable=False)] | Sequence[float]) -> None

Move the reference point of a (6, n) Fortran-order jacobian by ref_point, in place.

calcRotationalError

Python
calcRotationalError(R: Annotated[NDArray[float64], dict(shape=(3, 3), writable=False)] | Sequence[Sequence[float]]) -> Annotated[NDArray[numpy.float64], dict(shape=3, order=C)]

Angle-axis vector θ·a of the rotation R, with θ in [-π, π].

calcTransformError

Python
calcTransformError(t1: Isometry3d, t2: Isometry3d) -> Annotated[NDArray[numpy.float64], dict(shape=(None,), order=C)]

Error of t1.inverse() * t2 as [translation, angle-axis rotation].

applyTolerances

Python
applyTolerances(v: Annotated[NDArray[float64], dict(shape=(None,), order=C)], lower_tolerance: Annotated[NDArray[float64], dict(shape=(None,), writable=False)] | Sequence[float], upper_tolerance: Annotated[NDArray[float64], dict(shape=(None,), writable=False)] | Sequence[float]) -> None

In place: 0 inside [lower, upper], v - lower below it, v - upper above it; no-op when both are empty.

getLogger

Python
getLogger(name: str = 'tesseract') -> Logger

Get (or create) a tesseract spdlog logger; set_level() on it controls tesseract's output

isLogLevelEnabled

Python
isLogLevelEnabled(level: LogLevel) -> bool

Whether the default tesseract logger emits at this level

addLogRecordHandler

Python
addLogRecordHandler(handler: Callable) -> int

Register handler(record: LogRecord), called for every emitted record; returns its id

removeLogRecordHandler

Python
removeLogRecordHandler(handler_id: int) -> bool

Unregister a handler by id; False if the id is not registered