Skip to content

Commit e22207a

Browse files
authored
Merge pull request #2797 from Ipuch/topic-ellipsoid
Adding an ellipsoid joint to the joint collection
2 parents 67e736d + ee6833b commit e22207a

35 files changed

+3088
-18
lines changed

.github/workflows/macos-linux-windows-pixi.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ concurrency:
2929
group: ${{ github.workflow }}-${{ github.ref }}
3030
cancel-in-progress: true
3131

32+
env:
33+
# This is needed on Windows because ellipsoid-joint-kinematics.py output
34+
# some utf8 char.
35+
# More detail here: https://gist.github.com/NodeJSmith/e7e37f2d3f162456869f015f842bcf15
36+
PYTHONIOENCODING: "utf8"
37+
3238
jobs:
3339
pinocchio-pixi:
3440
name: Standard - ${{ matrix.os }} - Env ${{ matrix.environment }} ${{ matrix.build_type }} ${{ matrix.compiler }}

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
1818
- Add names to joints that are inside a composite joint ([#2786](https://github.com/stack-of-tasks/pinocchio/pull/2786))
1919
- Add color support for robot meshes in Viser ([#2793](https://github.com/stack-of-tasks/pinocchio/pull/2793))
2020
- Add Realtime Sanitizer (RTSan) uniittest and CI to track dynamic allocations in main API ([#2809](https://github.com/stack-of-tasks/pinocchio/pull/2809))
21+
- Add Ellipsoid Joint (3-DOF surface constraint), get ready for biomechanics ([#2797](https://github.com/stack-of-tasks/pinocchio/pull/2797))
2122

2223
### Changed
2324
- Python version update ([#2802](https://github.com/stack-of-tasks/pinocchio/pull/2802)):
@@ -36,7 +37,6 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
3637
### Removed
3738
- Remove CMake < 3.22 details ([#2790](https://github.com/stack-of-tasks/pinocchio/pull/2790))
3839

39-
4040
## [3.8.0] - 2025-09-17
4141

4242
### Added

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,8 @@ In addition to the core dev team, the following people have also been involved i
288288
- [Lev Kozlov](https://github.com/lvjonok): Kinetic and potential energy regressors
289289
- [Simeon Nedelchev](https://github.com/simeon-ned): Pseudo inertia and Log-Cholesky parametrization
290290
- [Alexy Legrand](https://www.linkedin.com/in/alexy-legrand-125889232/): Viser color bug fixes
291+
- [Pierre Puchaud](https://github.com/ipuch): Ellipsoid Joint
292+
- [Lucas Joseph](https://github.com/LucasJoseph): Ellipsoid Joint
291293

292294
If you have participated in the development of **Pinocchio**, please add your name and contribution to this list.
293295

bindings/python/parsers/graph/expose-edges.cpp

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ namespace pinocchio
3636
const int JointSphericalZYX::nq;
3737
const int JointSphericalZYX::nv;
3838

39+
const int JointEllipsoid::nq;
40+
const int JointEllipsoid::nv;
41+
3942
const int JointTranslation::nq;
4043
const int JointTranslation::nv;
4144

@@ -111,6 +114,20 @@ namespace pinocchio
111114
.def_readonly("nq", &JointSphericalZYX::nq, "Number of configuration variables.")
112115
.def_readonly("nv", &JointSphericalZYX::nv, "Number of tangent variables.");
113116

117+
bp::class_<JointEllipsoid>(
118+
"JointEllipsoid", "Represents an ellipsoidal joint.",
119+
bp::init<>(bp::args("self"), "Default constructor."))
120+
.def(bp::init<double, double, double>(
121+
bp::args("self", "radius_x", "radius_y", "radius_z"), "Constructor with radii."))
122+
.def_readwrite(
123+
"radius_x", &JointEllipsoid::radius_x, "Semi-axis length in the x direction.")
124+
.def_readwrite(
125+
"radius_y", &JointEllipsoid::radius_y, "Semi-axis length in the y direction.")
126+
.def_readwrite(
127+
"radius_z", &JointEllipsoid::radius_z, "Semi-axis length in the z direction.")
128+
.def_readonly("nq", &JointEllipsoid::nq, "Number of configuration variables.")
129+
.def_readonly("nv", &JointEllipsoid::nv, "Number of tangent variables.");
130+
114131
bp::class_<JointTranslation>(
115132
"JointTranslation", "Represents a translation joint.",
116133
bp::init<>(bp::args("self"), "Default constructor."))

doc/a-features/c-joints.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ belongs to one of the following categories:
99
- **Revolute** joints, rotating around a fixed axis, either one of \f$X,Y,Z\f$ or a custom one;
1010
- **Prismatic** joints, translating along any fixed axis, as in the revolute case;
1111
- **Spherical** joints, free rotations in the 3D space;
12+
- **Spherical ZYX** joints, free rotations parameterized by ZYX Euler angles;
13+
- **Ellipsoid** joints, constraining motion to an ellipsoid surface with 3-DOF (2 rotations + 1 spin),
14+
useful for biomechanics. The translation follows the ellipsoid surface \f$\left(\frac{x}{a}\right)^2 + \left(\frac{y}{b}\right)^2 + \left(\frac{z}{c}\right)^2 = 1\f$,
15+
while the rotational part uses the normal direction of an equivalent sphere.
16+
This approximation is exact only when \f$a = b = c\f$ (spherical case).
17+
See Seth et al., "Minimal formulation of joint motion for biomechanisms," Nonlinear Dynamics 62(1):291-303, 2010.
1218
- **Translation** joints, for free translations in the 3D space;
1319
- **Planar** joints, for free movements in the 2D space;
1420
- **Free-floating** joints, for free movements in the 3D space. Planar and free-floating joints are meant to be

0 commit comments

Comments
 (0)