From ac75cc9f06f7ad24dd3bd64f91207f535ac8fc79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Caron?= Date: Mon, 28 Oct 2024 14:30:25 +0100 Subject: [PATCH 1/6] Start from base_x = -2 m in Upkie rolling example --- examples/upkie_rolling.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/upkie_rolling.py b/examples/upkie_rolling.py index 671ea38e..97d2e604 100644 --- a/examples/upkie_rolling.py +++ b/examples/upkie_rolling.py @@ -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) @@ -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) From 6e2e0834a06b83c0abbe942fda6d8a7de45d4930 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Caron?= Date: Mon, 28 Oct 2024 14:31:52 +0100 Subject: [PATCH 2/6] Release v3.1.0 --- CHANGELOG.md | 5 ++++- CITATION.cff | 4 ++-- README.md | 2 +- pink/__init__.py | 2 +- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3538ffe4..59017d8c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 @@ -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 diff --git a/CITATION.cff b/CITATION.cff index 95c8f521..afe33da3 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -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: diff --git a/README.md b/README.md index 137356b6..fa573cc3 100644 --- a/README.md +++ b/README.md @@ -163,7 +163,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} } ``` diff --git a/pink/__init__.py b/pink/__init__.py index 01343751..ae02e36b 100644 --- a/pink/__init__.py +++ b/pink/__init__.py @@ -18,7 +18,7 @@ ) from .utils import custom_configuration_vector -__version__ = "3.0.0" +__version__ = "3.1.0" __all__ = [ "Configuration", From 20be82ad74043c6a5535cc48512242059e9dda9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Caron?= Date: Mon, 28 Oct 2024 14:45:25 +0100 Subject: [PATCH 3/6] WIP: Upkie rolling-without-slipping illustrated example --- examples/README.md | 19 +++++++++++++++++++ examples/barriers/README.md | 18 +++--------------- 2 files changed, 22 insertions(+), 15 deletions(-) diff --git a/examples/README.md b/examples/README.md index 048e419b..78eb6ae7 100644 --- a/examples/README.md +++ b/examples/README.md @@ -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 @@ -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: + +... + +| 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$ | diff --git a/examples/barriers/README.md b/examples/barriers/README.md index 70351bfc..2c3d3e21 100644 --- a/examples/barriers/README.md +++ b/examples/barriers/README.md @@ -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 @@ -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) | @@ -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) | @@ -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) | @@ -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) | @@ -78,4 +67,3 @@ https://github.com/domrachev03/pink/assets/28687492/d64163b6-399f-4bbf-ac50-1135 | Barrier | Gain | |------|------| | Self Collision Avoidance | $10$ | - From 6feea44709ef5e1411204128a0784d2417dff424 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Caron?= Date: Mon, 28 Oct 2024 14:45:41 +0100 Subject: [PATCH 4/6] Update links to examples --- README.md | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index fa573cc3..876907d3 100644 --- a/README.md +++ b/README.md @@ -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/blob/main/examples/wheeled_biped_upkie.py) -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 From 7246988ff7ff9c2f777f0b3103dfa6067033b6e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Caron?= Date: Mon, 28 Oct 2024 14:49:33 +0100 Subject: [PATCH 5/6] Update README.md --- examples/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/README.md b/examples/README.md index 78eb6ae7..f049a74c 100644 --- a/examples/README.md +++ b/examples/README.md @@ -65,7 +65,7 @@ https://github.com/stephane-caron/pink/assets/1189580/711c4b92-6234-41bd-945b-e6 An Upkie wheeled biped rolling without slipping: -... +https://github.com/user-attachments/assets/18ae0b68-21a2-44ec-af48-1d8ab4a7e658 | Task | Position cost | Orientation cost | |------|---------------|------------------| From 3889034c5a844b03df74341f4b25615a8615c656 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Caron?= Date: Mon, 28 Oct 2024 14:50:45 +0100 Subject: [PATCH 6/6] Release v3.1.0 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 876907d3..8604645f 100644 --- a/README.md +++ b/README.md @@ -132,7 +132,7 @@ Illustrated examples showcase how Pink performs on various robot morphologies: - 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/blob/main/examples/wheeled_biped_upkie.py) +- Wheeled biped: [Upkie rolling without slipping](https://github.com/stephane-caron/pink/tree/main/examples#wheeled-biped-upkie) There are also more basic examples to get started: