RoboPlan Documentation

repository·main·Indexed 19 days ago

https://github.com/open-planning/roboplan

A 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.

Tokens
13.8K
Snippets
27
Records
62
Agent score
64%

What's inside RoboPlan

  1. Overview of roboplan-toppra

    main
    roboplan-toppra is 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.
  2. Overview of RoboPlan

    main

    RoboPlan 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.

  3. Access the RoboPlan C++ API Reference

    main

    The 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.
  4. What is Sampling-Based Planning in RoboPlan

    main

    Sampling-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_rrt package.

  5. What is OInK (Optimal Inverse Kinematics)?

    main

    OInK 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 ProxQP backend 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)
  6. Overview of RoboPlan Algorithm Packages

    main

    RoboPlan 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 Scene for sampling/collision checks and dynotree for nearest-neighbor lookups.
    • TOPP-RA: A wrapper for the toppra library used to time-parameterize joint paths based on velocity and acceleration limits stored in the Scene.
    • CartesianPathPlanner: An integration package that resolves a task-space path into a joint path (via OInK) and then applies time-parameterization (via TOPP-RA).
  7. Use SimpleIK for fast Jacobian-based IK

    main

    SimpleIK 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.
  8. How Cartesian Planning works in roboplan_cartesian_planning

    main

    The roboplan_cartesian_planning package generates a joint-space path that follows a Cartesian reference using the OInK optimal IK solver. The process occurs in two distinct stages:

    Stage 1: Resolve (Geometric)

    1. Reference Generation: An SE(3) reference is built from waypoints using linear interpolation for position and SLERP for orientation.
    2. Sampling: The reference is sampled by arc length based on the path tolerance.
    3. IK Solving: An OInK differential-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.
    4. Constraints: Joint position limits and a VelocityLimit (capping the maximum movement per iteration) are enforced within the QP solver.

    Stage 2: Time (Temporal)

    1. Decimation: The resolved joint path is reduced to shape-carrying waypoints.
    2. Parameterization: The path is time-parameterized using TOPP-RA over a straight-segment + circular-blend geometry to respect joint velocity and acceleration limits.
    3. Corner Blending: The parameter toppra_blend_deviation controls 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.

  9. Python Visualization and Interpolation

    main

    Two specialized modules are implemented in pure Python to extend the core functionality:

    • roboplan.visualization: Renders scenes, paths, and trajectories in a web browser using Viser (via Pinocchio's ViserVisualizer) and uses matplotlib for 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, the Scene'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 the Scene.