Recent Releases of pin-pink

pin-pink - v3.4.0

This release adds the JointVelocityTask whose aim is to track a reference joint-velocity vector via $\arg\minv \Vert v{ref} - v \Vert^2$. This task can be used, for instance, if a reference velocity is computed by other means (optimal control, reinforcement-learned policy, ...), and the differential IK acts as a constraint-enforcing filter. An example illustrates this with a Unitree Z1 tracking a trajectory that would violate joint limits:

https://github.com/user-attachments/assets/3c0e221b-4180-4c8c-9ced-1cc61448c2ad

(In the example, joint limits don't prevent self-collisions when the arm is folded on itself.)

Added

  • Task: JointVelocityTask for tracking a reference joint-velocity trajectory

Fixed

  • Save problem instance in NoSolutionFound exception

Removed

  • Remove unused attribute of SelfCollisionBarrier

- Python
Published by stephane-caron 7 months ago

pin-pink - v3.3.0

This version adds (1) a constraints argument to solve_ik, to enforce tasks as QP equality constraints rather than in the objective function, and (2) the omniwheel task, which is like a rolling task but allows lateral motion.

Note that, internally, exceptions have been grouped into the pink.exceptions submodule. We don't count this as an API-breaking change, although strictly speaking it is :blush:, as the expected way to handle Pink exceptions is to catch PinkError.

Thanks to @jorisv for contributing to this release :+1:

Added

  • CICD: Unit test fixture for the rolling task
  • CICD: Unit test fixture for the omniwheel task
  • Introduce constraints to enforce tasks as QP equality constraints
  • Task: Add missing task __repr__ functions
  • Task: Omniwheel task, like a rolling task but allowing lateral motion

Changed

  • CICD: Switch to Pixi for code coverage, documentation, linting and testing
  • Move pink.barriers.exceptions to pink.exceptions
  • Move pink.tasks.exceptions to pink.exceptions
  • Task: Make __repr__ of base class abstract to ensure tasks define their own
  • docs: Refactor Tasks page and update references
  • examples: Update installation hints when example dependencies are missing

Fixed

  • CICD: Improve Pixi configuration (thanks to @jorisv)
  • Task: Fix damping task when the robot model has a mobile root joint
  • Task: Report LM damping in CoM task representation

- Python
Published by stephane-caron 9 months ago

pin-pink - v3.2.0

This release introduces the NoSolutionFound exception (previously an AssertionError), and makes a stricter check that the QP solver reports successfully converging to a solution. It is still possible to catch cases where the solver converged (but not to a solution) as follows:

py try: velocity = solve_ik(configuration, tasks, dt, solver=solver) except NoSolutionFound as exn: if exn.results.x is not None: # QP solver converged but not to a solution velocity = exn.results.x raise exn

This release also removes an unrequired dependency on quadprog. This solver is still great for IK, but we cannot distribute it with Pink (permissive license: Apache-2.0) as it is licensed under the GPL-2.0. Feel free to install and use it on your own!

Thanks to @ashwinvkNV and @peterd-NV for helping address this licensing issue :+1:

Added

  • Add NoSolutionFound exception
  • Add open keyword argument to start_meshcat_visualizer
  • examples: Detail that quadprog works best on Stretch examples
  • examples: Installation instruction for loop-rate-limiters
  • examples: Switch to DAQP solvers in examples where it works well
  • examples: Switch to ProxQP on JVRC-1 example
  • examples: Switch to ProxQP on one-dof configuration limit example

Changed

  • CICD: Switch from tox to Anaconda environments
  • CICD: Update QP solvers used in unit tests
  • CICD: Update checkout action to v4
  • Raise custom NoSolutionFound rather than AssertionError in solve_ik
  • Update supported Python versions

Fixed

  • CICD: Update unit test for self-collision barrier

Removed

  • Remove dependency on quadprog (thanks to @peterd-NV)

- Python
Published by stephane-caron 10 months ago

pin-pink - v3.1.0

This release adds the RollingTask for rolling without slipping. Here is an example:

https://github.com/user-attachments/assets/18ae0b68-21a2-44ec-af48-1d8ab4a7e658

Added

  • Example: Upkie rolling without slipping on a horizontal floor
  • Task: RollingTask for rolling without slipping on a plane

Changed

  • Rename "end-effector to target" example to "inverse kinematics UR10"
  • Update icon of documentation website

Fixed

  • Update documentation Sphinx and theme versions
  • Fix Jacobian of SelfCollisionBarrier for floating-base robots

- Python
Published by stephane-caron over 1 year ago

pin-pink - v3.0.0

This major release adds Control Barrier Functions developed by @domrachev03 and @simeon-ned :+1: Examples of what we can do with barriers include:

https://github.com/domrachev03/pink/assets/28687492/d64163b6-399f-4bbf-ac50-1135fa69c2da

Another API-breaking change to the library is that limits are now optional and can be extended (for instance with the new acceleration limit) or disabled. New limits and tasks include:

  • Limit: AccelerationLimit
  • Task: ComTask for center-of-mass tracking (thanks to @simeon-ned)
  • Task: LowAccelerationTask for smoother velocities.

Check out the full changelog below for other changes and fixes. May the Motion be with you!

Added

  • Breaking: Updated the logic for handling the joint limits:
    • Add a limits argument to build_ik and solve_ik
    • The check_limits method now includes an optional safety_break argument to control whether execution should stop on exception.
    • The solve_ik function now includes the safety_break that is forwarded to check_limits.
  • Control Barrier Functions, namely: (thanks to @domrachev03 and @simeon-ned)
    • Abstract Barrier Barrier
    • Frame Position Barrier PositionBarrier
    • Body Spherical Barrier BodySphericalBarrier
    • Whole-body Self-Collision Avoidance Barrier SelfCollisionBarrier
  • Example: UR5 manipulator and GO2 quadruped robot with PositionBarrier
  • Example: YUMI two-armed manipulator with BodySphericalBarrier
  • Example: G1 humanoid squatting through regulating CoM.
  • Limit: AccelerationLimit
  • Task: ComTask for center-of-mass tracking (thanks to @simeon-ned)
  • Task: LowAccelerationTask for smoother velocities.

Changed

  • Breaking: remove lm_damping parameter from DampingTask where it wasn't used
  • CICD: Update ruff to 0.4.3
  • Configuration accepts list of Control Barrier Functions
  • DampingTask: Simplify implementation
  • Update to Pinocchio 3 with 2.7 backward compatibility

Fixed

  • PostureTask: Match implementation and documentation formula
  • Fix broken documentation links

Removed

  • CICD: Disable macOS checks until upstream PyPI package is fixed

- Python
Published by stephane-caron over 1 year ago

pin-pink - v2.1.0

This release adds the RelativeFrameTask developed with @ymontmarin :+1: This new task is a generalization of the frame task that accepts targets with respect to any robot frame. For example:

https://github.com/stephane-caron/pink/assets/1189580/f349bb55-c7f6-4074-a8bf-0b86a5693098

This release also brings a few quality-of-use improvements to configurations and costs.

Added

  • Function get_transform in the Configuration class
  • Task: relative frame task, where target is w.r.t another robot frame

Changed

  • Configuration: update function now accepts a configuration vector argument
  • Costs: setting cost in relative frame task now accepts plain float

- Python
Published by stephane-caron almost 2 years ago

pin-pink - v2.0.0

This release brings a number of fixes and completes the renaming of the BodyTask to FrameTask (details below). It also distributes Pink on conda-forge, which is now the recommended way to install for best performance:

console conda install -c conda-forge pink

Added

  • Add gain keyword argument to all task constructors where is makes sense
  • Damping task that minimizes joint velocities
  • Distribute package on conda-forge
  • Example on how differential IK may converge to a local constrained optimum
  • Expose all tasks from the top-level pink module
  • Handle unbounded joints in custom configuration vectors
  • Unit test for posture task Jacobian

Changed

  • Breaking: Define task Jacobian as derivative of the task error
  • Breaking: Rename BodyNotFound exception to FrameNotFound
  • Breaking: Rename FrameTask.body to FrameTask.frame

Removed

  • Body-minus utility function
  • Spatial-minus utility function

- Python
Published by stephane-caron almost 2 years ago

pin-pink - v1.1.0

This release fixes a bug when handling configuration limits for models that contain unbounded revolute joints.

Changed

  • Don't check configuration limits when building IK matrices

Fixed

  • Configuration limits when model has unbounded revolute joints

- Python
Published by stephane-caron about 2 years ago

pin-pink - v1.0.0

This is the first major release of Pink, Python inverse kinematics for articulated robot models, based on Pinocchio. The main update since v0.11.0 is the definition of a proper linear holonomic task on tangent spaces, with accompanying documentation, by @ymontmarin. Thanks! :+1:

API-wise, Levenberg-Marquardt damping is now defined in the base Task class and can therefore be set in any task. This release drops support for Python 3.7, and brings a seasonal batch of new examples and bug fixes.

Added

  • Example: UR5 arm
  • Example: flying dual-arm with UR3
  • General linear holonomic task

Changed

  • Cost vector is now defined for all tasks
  • Drop support for Python 3.7
  • Levenberg-Marquardt damping is now defined for all tasks
  • Update joint-coupling task to derive from general linear holonomic task

Fixed

  • Example: Draco 3 numerical stability

- Python
Published by stephane-caron over 2 years ago

pin-pink - v0.11.0

This release upgrades the BodyTask to a FrameTask handling all kinds of frames defined in the robot description. It was contributed by @proyan, thanks! :smiley:

Added

  • Example: Stretch RE1

Changed

  • Handle all frames, including non-body frames
  • Rename BodyTask to FrameTask

- Python
Published by stephane-caron almost 3 years ago

pin-pink - v0.10.0

This release fixes handling of models with/without configuration limits and with/without velocity limits.

Added

  • Base class Limit for configuration and velocity limits
  • In-place integration of a velocity from a configuration
  • Unit tests for configuration limits
  • Unit tests for velocity limits

Changed

  • Add pink.limits submodule
  • Configuration and velocity limits are now stacked rather than pre-reduced
  • Move configuration limit to ConfigurationLimit class
  • Move velocity limit to VelocityLimit class

- Python
Published by stephane-caron almost 3 years ago

pin-pink - v0.9.0

This release adds the joint-coupling and linear-holonomic tasks contributed by @shbang91 :+1: The tasks are unit tested and illustrated by a new humanoid example :muscle:

Added

  • Example: Draco 3 humanoid by @shbang91
  • Joint-coupling task by @shbang91
  • Linear holonomic task by @shbang91
  • Unit tests for joint-coupling and linear holonomic tasks by @shbang91

Changed

  • Refactor apply_configuration into Configuration constructor
  • Refactor assume_configuration into Configuration constructor
  • Refactor task dynamics into compute_error and compute_jacobian

- Python
Published by stephane-caron almost 3 years ago

pin-pink - v0.8.0

This release fixes the Jacobian of the body task, with a dedicated blog post to explain the fix. In short: we were using the frame Jacobian instead of the full task Jacobian (which includes a log-derivative). Using the frame Jacobian works fine in many use cases, but it can also fail drastically in weighted inverse kinematics. Example and details in the blog post :spiral_notepad:

Thanks to @aescande and @Gregwar for their help :+1:

Added

  • BodyNotFound exception
  • Document spatial and body minus between transforms
  • Example: SigmaBan humanoid
  • Forward keyword arguments of solve_ik to the backend QP solver

Changed

  • Return type of compute_velocity_limits now includes optionals
  • VectorSpace type is now immutable

Fixed

  • Jacobian of the body task

- Python
Published by stephane-caron about 3 years ago

pin-pink - v0.7.0

This revision improves joint limit computations significantly, with fixes, new unit tests and examples on the side.

Added

  • Bounded subspace of tangent space, that is, restricted to bounded joints
  • CI: test on both Ubuntu and macOS images
  • Tangent space from Pinocchio model

Changed

  • Example: UR3 arm
  • Expose pink.Task from top-level module
  • Improve joint limit computations

Fixed

  • Empty inequalities when model has no bounded joint

- Python
Published by stephane-caron about 3 years ago

pin-pink - v0.6.0

This release makes the solver argument mandatory for all calls to solve_ik.

Note that the project is still in beta, so don't expect proper deprecation paths / API-change preemptive warnings before it hits v1.0.0 :wink:

- Python
Published by stephane-caron about 3 years ago

pin-pink - v0.5.0

With this release, Pink handles more general joint types, including fixed or free flyer root joints, unbounded joints (called continuous in URDF), etc. New examples showcase this on both arms :mechanicalarm: and legged :mechanicalleg: robots.

Banner for Pink v0.5.0

Under the hood, this release also improves on various points of the QP formulation (joint limits, posture task, ...) so that it works nicely with more solvers (e.g. CVXOPT), beyond quadprog and OSQP which were the two main solvers so far.

Added

  • Body task targets can be read directly from a robot configuration
  • Example: double pendulum
  • Example: Kinova Gen2 arm
  • Example: loading a custom URDF description
  • Example: visualization in MeshCat
  • Example: visualization in yourdfpy
  • Generalize configuration limits to any root joint
  • Handle descriptions that have no velocity limit
  • Handle general root joint in configuration limits
  • Handle general root joint in posture task
  • Handle unbounded velocity limits in QP formulation
  • Posture task targets can be read directly from a configuration
  • Simple rate limiter in pink.utils

Changed

  • Raise an error when querying a body that doesn't exist
  • Transition from pink.models to robot_descriptions
  • Update reference posture in Upkie wheeled biped example
  • Warn when the backend QP solver is not explicitly selected

Fixed

  • Unbounded velocities when the backend solver is CVXOPT

- Python
Published by stephane-caron over 3 years ago

pin-pink - v0.4.0

This release brings documentation, full test coverage, and handles robot models installed from PyPI.

Also, it indulges in a project icon :wink:

Added

  • Coveralls for continuous coverage testing
  • Document differential inverse kinematics and task targets
  • Single-task test on task target translations mapped to IK output translations

Changed

  • Argument to build_from_urdf functions is now the path to the URDF file
  • Bumped status to beta
  • Examples use the jvrc_description and upkie_description packages
  • Use jvrc_description and upkie_description packages from PyPI
  • Task is now an abstract base class

Fixed

  • Unit tests for robot models

- Python
Published by stephane-caron over 3 years ago

pin-pink - v0.3.0

This release adds proper handling of joint position and velocity limits.

Added

  • Joint velocity limits
  • Configuration limits

Changed

  • Bumped status to alpha
  • Configuration limit check now has a tolerance argument

- Python
Published by stephane-caron almost 4 years ago

pin-pink - v0.2.0

This pre-release adds the regularizing posture task and corresponding unit tests.

Added

  • Check configuration limits against model
  • Mock configuration type for unit testing
  • Tangent member of a configuration
  • Unit test the body task

Changed

  • Specify path when loading a model description
  • Switch to the Apache 2.0 license
  • build_jvrc_model is now build_from_urdf

Fixed

  • Don't distribute robot models with the library
  • IK unit test that used robot instead of configuration

- Python
Published by stephane-caron almost 4 years ago

pin-pink - v0.1.0

This is a first working version of the library with a humanoid example that can be run and tweaked. Keep in mind that 0.x versions mean the library is still under active development, with the goal that 1.0 is the first stable version. So, this is still the very beginning :wink:

Added

  • Body task
  • Humanoid example

Changed

  • ConfiguredRobot(model, data) type is now Configuration(model, data, q)

Fixed

  • Add floating base joint when loading JVRC model

- Python
Published by stephane-caron almost 4 years ago