Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v3.1.0 #119

Merged
merged 6 commits into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unreleased

## [3.1.0] - 2024-10-28

### Added

- Example: Upkie rolling without slipping on a horizontal floor
Expand Down Expand Up @@ -329,7 +331,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Python package infrastructure

[unreleased]: https://github.com/qpsolvers/qpsolvers/compare/v3.0.0...HEAD
[unreleased]: https://github.com/qpsolvers/qpsolvers/compare/v3.1.0...HEAD
[3.1.0]: https://github.com/qpsolvers/qpsolvers/compare/v3.0.0...v3.1.0
[3.0.0]: https://github.com/qpsolvers/qpsolvers/compare/v2.1.0...v3.0.0
[2.1.0]: https://github.com/qpsolvers/qpsolvers/compare/v2.0.0...v2.1.0
[2.0.0]: https://github.com/qpsolvers/qpsolvers/compare/v1.1.0...v2.0.0
Expand Down
4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
cff-version: 1.2.0
message: "If you find this code helpful, please cite it as below."
title: "Pink: Python inverse kinematics based on Pinocchio"
version: 3.0.0
date-released: 2024-07-29
version: 3.1.0
date-released: 2024-10-28
url: "https://github.com/stephane-caron/pink"
license: "Apache-2.0"
authors:
Expand Down
28 changes: 16 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,21 +123,25 @@ If task targets are continuously updated, there will be no stationary solution t

## Examples

Basic examples to get started:
Illustrated examples showcase how Pink performs on various robot morphologies:

* [Double pendulum](https://github.com/stephane-caron/pink/blob/main/examples/double_pendulum.py)
* [Loading a custom URDF](https://github.com/stephane-caron/pink/blob/main/examples/load_custom_urdf.py)
* [Visualization in MeshCat](https://github.com/stephane-caron/pink/blob/main/examples/visualize_in_meshcat.py)
* [Visualization in yourdfpy](https://github.com/stephane-caron/pink/blob/main/examples/visualize_in_yourdfpy.py)
- Arm: [UR5](https://github.com/stephane-caron/pink/tree/main/examples#arm-ur5) and [UR5 with end-effector limits](https://github.com/stephane-caron/pink/tree/main/examples/barriers#arm-ur5)
- Dual arms: [Flying dual-arm UR3](https://github.com/stephane-caron/pink/tree/main/examples#flying-dual-arm-ur3)
- Dual arms: [Yumi with spherical self-collision avoidance](https://github.com/stephane-caron/pink/tree/main/examples/barriers#yumi-end-effector-self-collision-avoidance)
- Dual arms: [Iiwa with whole-body self-collision avoidance](https://github.com/stephane-caron/pink/tree/main/examples/barriers#iiwa-whole-body-collision-avoidance)
- Humanoid: [Draco 3](https://github.com/stephane-caron/pink/tree/main/examples#humanoid-draco-3)
- Mobile base: [Stretch R1](https://github.com/stephane-caron/pink/tree/main/examples#mobile-stretch)
- Quadruped: [Go2 squatting with floating-base limits](https://github.com/stephane-caron/pink/tree/main/examples/barriers#go2-squat)
- Wheeled biped: [Upkie rolling without slipping](https://github.com/stephane-caron/pink/tree/main/examples#wheeled-biped-upkie)

Pink works with all kinds of robot morphologies:
There are also more basic examples to get started:

* Arms: [Kinova Gen2](https://github.com/stephane-caron/pink/blob/main/examples/arm_kinova_gen2.py), [UR3](https://github.com/stephane-caron/pink/blob/main/examples/arm_ur3.py)
* Humanoids: [JVRC-1](https://github.com/stephane-caron/pink/blob/main/examples/humanoid_jvrc.py), [SigmaBan](https://github.com/stephane-caron/pink/blob/main/examples/humanoid_sigmaban.py)
* Mobile base: [Omnidirectional robot](https://github.com/stephane-caron/pink/blob/main/examples/mobile_omni_wheeled_robot.py), [Stretch R1](https://github.com/stephane-caron/pink/blob/main/examples/mobile_stretch.py)
* Wheeled biped: [Upkie](https://github.com/stephane-caron/pink/blob/main/examples/wheeled_biped_upkie.py)
- [Double pendulum](https://github.com/stephane-caron/pink/blob/main/examples/double_pendulum.py)
- [Loading a custom URDF](https://github.com/stephane-caron/pink/blob/main/examples/load_custom_urdf.py)
- [Visualization in MeshCat](https://github.com/stephane-caron/pink/blob/main/examples/visualize_in_meshcat.py)
- [Visualization in yourdfpy](https://github.com/stephane-caron/pink/blob/main/examples/visualize_in_yourdfpy.py)

Check out the examples directory for more code.
Check out the [examples](https://github.com/stephane-caron/pink/tree/main/examples) directory for more.

## Frequently Asked Questions

Expand All @@ -163,7 +167,7 @@ If you use Pink in your scientific works, please cite it *e.g.* as follows:
author = {Caron, Stéphane and De Mont-Marin, Yann and Budhiraja, Rohan and Bang, Seung Hyeon and Domrachev, Ivan and Nedelchev, Simeon},
license = {Apache-2.0},
url = {https://github.com/stephane-caron/pink},
version = {3.0.0},
version = {3.1.0},
year = {2024}
}
```
Expand Down
19 changes: 19 additions & 0 deletions examples/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
# Examples

The following examples include *tasks* and *limits*:

- [Arm: UR5](#arm-ur5)
- [Flying dual-arm UR3](#flying-dual-arm-ur3)
- [Humanoid: Draco 3](#humanoid-draco-3)
- [Mobile: Stretch](#mobile-stretch)
- [Wheeled biped: Upkie](#wheeled-biped-upkie)

Check out the [barriers](barriers/) sub-directory for more examples including *control barrier functions*.

## Arm: UR5

Expand Down Expand Up @@ -55,3 +60,17 @@ https://github.com/stephane-caron/pink/assets/1189580/711c4b92-6234-41bd-945b-e6
|------|---------------|------------------|
| Mobile base | $0.1$ | 1 |
| Fingertip | 1 | $10^{-4}$ |

## Wheeled biped: Upkie

An Upkie wheeled biped rolling without slipping:

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

| Task | Position cost | Orientation cost |
|------|---------------|------------------|
| Floating base | $1$ | $1$ |
| Left wheel rolling | $10$ | - |
| Right wheel rolling | $10$ | - |
| Left wheel position | $1$ | $0$ |
| Right wheel position | $1$ | $0$ |
18 changes: 3 additions & 15 deletions examples/barriers/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
Here we will have the examples of using barriers, please go over [notes](https://simeon-ned.com/blog/2024/cbf/) for more info.
Here we will have the examples of using barriers, please go over [this note](https://simeon-ned.com/blog/2024/cbf/) for more info.

# Barrier Examples


- [Arm: UR5](#arm-ur5): with joints and end effector limits
- [Quadruped: Go2](#go2-squat): Go 2 squatting with floating base position limits
- [Dual Arms: Yumi](#yumi-end-effector-self-collision-avoidance): self-collision avoidance with spheres
Expand All @@ -12,10 +11,8 @@ Here we will have the examples of using barriers, please go over [notes](https:/

A UR5 arm tracking a moving target while stopping in front of virtual wall:


https://github.com/domrachev03/pink/assets/28687492/f30ba7a1-98a3-44cb-ab52-23f99e42714c


| Task | Cost |
|------|------|
| End-effector | (50,1) |
Expand All @@ -29,10 +26,8 @@ https://github.com/domrachev03/pink/assets/28687492/f30ba7a1-98a3-44cb-ab52-23f9

Go2 quadruped squating with base position is constrained by z and y coordinates:


https://github.com/domrachev03/pink/assets/28687492/78281f44-3676-4d4d-9619-768b951a15a2


| Task | Cost |
|------|------|
| Base | (50, 1) |
Expand All @@ -43,16 +38,12 @@ https://github.com/domrachev03/pink/assets/28687492/78281f44-3676-4d4d-9619-768b
|------|------|
| End-effector | $10^{2}$ |


## Yumi end-effector self-collision avoidance
Yumi two-armed manimpulator with constraint on minimal distance between frames, defined by end-effectors


Yumi two-armed manimpulator with constraint on minimal distance between frames, defined by end-effectors

https://github.com/domrachev03/pink/assets/28687492/f8c4bc8d-63e3-4bf7-a34f-e7ede43c0438



| Task | Cost |
|------|------|
| End-effector | (50,10) |
Expand All @@ -63,13 +54,11 @@ https://github.com/domrachev03/pink/assets/28687492/f8c4bc8d-63e3-4bf7-a34f-e7ed
| Body Spherical | $10^{2}$ |

## Iiwa whole-body collision avoidance
Two iiwas with custom collision geometry with some barely feasible tasks for end-effectors.

Two iiwas with custom collision geometry with some barely feasible tasks for end-effectors.

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



| Task | Cost |
|------|------|
| End-effector | (50,10) |
Expand All @@ -78,4 +67,3 @@ https://github.com/domrachev03/pink/assets/28687492/d64163b6-399f-4bbf-ac50-1135
| Barrier | Gain |
|------|------|
| Self Collision Avoidance | $10$ |

6 changes: 4 additions & 2 deletions examples/upkie_rolling.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,10 @@
right_wheel_rolling,
]

init_x = -2.0 # in [m]
q_init = robot.q0.copy()
q_init[2] = 0.56
q_init[0] = init_x # world x-axis
q_init[2] = 0.56 # world z-axis
configuration = pink.Configuration(robot.model, robot.data, q_init)
base_task.set_target_from_configuration(configuration)
left_wheel_position.set_target_from_configuration(configuration)
Expand Down Expand Up @@ -95,7 +97,7 @@

while True:
# Update base task target
base_x = 0.1 * t
base_x = 0.1 * t + init_x
base_target.translation[0] = base_x
left_wheel_target.translation[0] = base_x + 0.1 * np.sin(t)
right_wheel_target.translation[0] = base_x - 0.1 * np.sin(t)
Expand Down
2 changes: 1 addition & 1 deletion pink/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
)
from .utils import custom_configuration_vector

__version__ = "3.0.0"
__version__ = "3.1.0"

__all__ = [
"Configuration",
Expand Down
Loading