RoboPlan Documentation
repository·main·Indexed 19 days ago
https://github.com/open-planning/roboplanA modern robot motion planning library built on Pinocchio. RoboPlan provides a modular suite of tools for inverse kinematics (including simple IK and Optimal Inverse Kinematics/OInK), RRT-based motion planning, Cartesian path following, and trajectory timing using TOPP-RA (Time Optimal Path Parameterization based on Reachability Analysis). The library includes a C++ core and Python bindings, supporting multi-end-effector planning and various speed modes for trajectory optimization.
What's inside RoboPlan
- RoboPlan provides the foundational building blocks for robotic planning, including core types, scene representation, and various utility functions required for planning tasks.
Overview of roboplan_cartesian_planning
mainTheroboplan_cartesian_planningpackage provides a Cartesian path planner for the RoboPlan ecosystem. It is designed to handle path planning tasks within the Cartesian workspace.Overview of roboplan-toppra
mainroboplan-topprais a wrapper for RoboPlan that implements Time Optimal Path Parameterization based on Reachability Analysis (TOPP-RA). It is used to parameterize a given path in time such that the robot follows the path while respecting velocity and acceleration constraints, optimizing for minimum time.Overview of RoboPlan
mainRoboPlan is a modern robot motion planning library built on top of Pinocchio. It provides a suite of tools for motion planning, inverse kinematics, and trajectory optimization.
Note: This is an experimental repository. Until version 1.0 is released, users should expect breaking changes in the API.
Use roboplan-simple-ik for inverse kinematics
mainTheroboplan-simple-ikpackage provides a simple inverse kinematics (IK) solver designed for use within the RoboPlan ecosystem. It is intended for users who need a straightforward way to compute joint configurations for desired end-effector poses.Access the RoboPlan C++ API Reference
mainThe RoboPlan C++ API is organized into several specialized modules. Developers can find detailed documentation for each component via the Doxygen-generated indices. The core modules include:
- Core Library: The fundamental building blocks of the RoboPlan framework.
- Example Models: Robot descriptions and models (e.g., generated from
franka_description). - Simple IK: Basic Inverse Kinematics implementations.
- Optimal IK (OInK): Advanced optimal inverse kinematics solvers.
- RRT: Rapidly-exploring Random Tree motion planning implementations.
- TOPP-RA: Time-Optimal Path Parameterization with Reachability Analysis.
- Cartesian Planning: Tools for planning in Cartesian space.
What is Sampling-Based Planning in RoboPlan
mainSampling-based motion planners find collision-free paths by randomly sampling the robot's configuration space and incrementally building a tree of valid motions. Instead of explicitly modeling obstacle geometry, they use a collision checker as a black box to probe the space. This approach is highly effective for high-dimensional problems, such as controlling articulated robot arms, where representing free space explicitly is computationally intractable.
RoboPlan provides these capabilities through the
roboplan_rrtpackage.What is OInK (Optimal Inverse Kinematics)?
mainOInK is a Quadratic Programming (QP) based solver that computes joint displacements ($\Delta q$) to achieve multiple objectives (tasks) while respecting hard constraints and safety barriers.
It uses a prioritized task formulation where lower-priority tasks are projected into the nullspace of higher-priority tasks, ensuring they do not interfere with primary objectives. The solver optimizes a cost function consisting of:
- Tasks: Weighted objectives (e.g., tracking a pose).
- Regularization: Tikhonov regularization ($\lambda$) and Levenberg-Marquardt damping ($\mu_k$).
- Barrier Regularization: Encourages motion toward a safe configuration when near boundaries.
OInK uses the
ProxQPbackend and supports warm-starting and closest-feasible solving for graceful degradation when constraints conflict.import numpy as np from roboplan.optimal_ik import Oink # Initialize solver for a specific robot group oink = Oink(scene, group_name="arm") # Solve for joint displacement delta_q = np.zeros(len(oink.v_indices)) oink.solveIk(scene, tasks, constraints, barriers, delta_q)Overview of RoboPlan Algorithm Packages
mainRoboPlan provides several specialized algorithm packages that build upon the core
Scene:- SimpleIK: Performs damped least-squares inverse kinematics updates using Jacobians from the
Scene. - OInK (Optimal Inverse Kinematics): Formulates IK as a quadratic program (QP) over tasks, constraints, and control barrier functions, utilizing
ProxSuite. - RRT: A sampling-based motion planner that grows search trees in configuration space using the
Scenefor sampling/collision checks anddynotreefor nearest-neighbor lookups. - TOPP-RA: A wrapper for the
toppralibrary used to time-parameterize joint paths based on velocity and acceleration limits stored in theScene. - CartesianPathPlanner: An integration package that resolves a task-space path into a joint path (via
OInK) and then applies time-parameterization (viaTOPP-RA).
- SimpleIK: Performs damped least-squares inverse kinematics updates using Jacobians from the
Use SimpleIK for fast Jacobian-based IK
mainSimpleIK is a lightweight solver that uses the damped least squares (DLS) method to minimize Cartesian error. It accounts for SE(3) curvature by chaining the frame Jacobian through the derivative of the $\log_6$ error, allowing for faster convergence than standard frame Jacobians.
Key Features
- Efficiency: Minimal computational overhead.
- Multi-frame support: Can handle multiple simultaneous goal frames.
- Robustness: Includes collision checking with random restarts on failure.
- Convergence: Monitored via separate linear (meters) and angular (radians) error thresholds.
- Search: Can optionally attempt to find the nearest solution to a seed configuration until a timeout is reached.
How Cartesian Planning works in roboplan_cartesian_planning
mainThe
roboplan_cartesian_planningpackage generates a joint-space path that follows a Cartesian reference using theOInKoptimal IK solver. The process occurs in two distinct stages:Stage 1: Resolve (Geometric)
- Reference Generation: An SE(3) reference is built from waypoints using linear interpolation for position and SLERP for orientation.
- Sampling: The reference is sampled by arc length based on the path tolerance.
- IK Solving: An
OInKdifferential-IK problem is solved to convergence at each sample, seeded from the previous solution. This ensures the joint path does not lag behind the reference. - Constraints: Joint position limits and a
VelocityLimit(capping the maximum movement per iteration) are enforced within the QP solver.
Stage 2: Time (Temporal)
- Decimation: The resolved joint path is reduced to shape-carrying waypoints.
- Parameterization: The path is time-parameterized using
TOPP-RAover a straight-segment + circular-blend geometry to respect joint velocity and acceleration limits. - Corner Blending: The parameter
toppra_blend_deviationcontrols how much a rounded corner may deviate from the sharp waypoint.
If IK fails to converge (e.g., due to singularities or joint limits), the planner returns an error specifying the failure location.
Python Visualization and Interpolation
mainTwo specialized modules are implemented in pure Python to extend the core functionality:
roboplan.visualization: Renders scenes, paths, and trajectories in a web browser usingViser(via Pinocchio'sViserVisualizer) and usesmatplotlibfor plotting trajectories.roboplan.interpolation: Provides helper functions for sampling trajectories and Cartesian paths at arbitrary time points.
Note on Pinocchio Integration: Because Pinocchio's Python bindings do not yet use
nanobind, theScene's C++ Pinocchio model cannot be passed directly to Pinocchio's Python API. Consequently, the visualization module builds a separate Pinocchio model on the Python side, loaded from the same URDF as theScene.