Skip to content

tesseract-robotics/tesseract_nanobind

Repository files navigation

Tesseract Python (nanobind)

PyPI Python Build Status Documentation license - Apache 2.0

Note: This is a friendly fork of tesseract_python that replaces SWIG bindings with modern nanobind bindings.

Python bindings for Tesseract robotics motion planning using nanobind.

Features

  • Scene loading and management (URDF, SRDF, meshes)
  • Collision checking (Bullet, FCL)
  • Kinematics (KDL, OPW, UR)
  • Motion planning (OMPL, Descartes, TrajOpt)
  • Time parameterization (TOTG, ISP, Ruckig)
  • Task composition and pipelines
  • Pythonic high-level API

Installation

pip install tesseract-robotics-nanobind

Platform support: Linux x86_64. macOS arm64 coming soon.

Quick Start

from tesseract_robotics.planning import (
    Robot, MotionProgram, JointTarget, CartesianTarget,
    Pose, box, create_obstacle, TaskComposer,
)

# Load robot
robot = Robot.from_urdf(
    "package://tesseract_support/urdf/abb_irb2400.urdf",
    "package://tesseract_support/urdf/abb_irb2400.srdf"
)

# Add obstacle
create_obstacle(robot, "box", box(0.5, 0.5, 0.5), Pose.from_xyz(0.5, 0, 0.3))

# Build motion program
program = (MotionProgram("manipulator", tcp_frame="tool0")
    .set_joint_names(robot.get_joint_names("manipulator"))
    .move_to(JointTarget([0, 0, 0, 0, 0, 0]))
    .move_to(CartesianTarget(Pose.from_xyz(0.5, 0.3, 0.8)))
)

# Plan
composer = TaskComposer.from_config()
result = composer.plan(robot, program)

if result.successful:
    for pt in result.trajectory:
        print(pt.positions)

Low-Level API

For direct C++ API access:

from tesseract_robotics.tesseract_environment import Environment
from tesseract_robotics.tesseract_common import GeneralResourceLocator

env = Environment()
locator = GeneralResourceLocator()
env.init("/path/to/robot.urdf", "/path/to/robot.srdf", locator)

print(f"Joints: {env.getJointNames()}")
print(f"Links: {env.getLinkNames()}")

Examples

See the examples/ directory for:

  • basic_cartesian_example.py - Simple Cartesian planning
  • freespace_ompl_example.py - OMPL freespace planning
  • pick_and_place_example.py - Pick and place with TrajOpt
  • puzzle_piece_example.py - Cartesian path following
  • And more...

Acknowledgments

This project builds upon the excellent work of John Wason and the Tesseract Robotics team. The original tesseract_python SWIG bindings laid the foundation for this nanobind implementation.

Special thanks to:

  • John Wason (Wason Technology, LLC) - Original tesseract_python author and Tesseract maintainer
  • Levi Armstrong - Tesseract core developer
  • Jelle Feringa (Terrestrial) - nanobind port developer
  • The ROS-Industrial consortium for supporting Tesseract development

License

Apache 2.0

About

Tesseract python binding leveraging nanobind

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 9