-
Notifications
You must be signed in to change notification settings - Fork 483
Adding an ellipsoid joint to the joint collection #2797
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
base: devel
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👋 Hi,
This is a reminder message to assign an extra build label to this Pull Request if needed.
By default, this PR will be build with minimal build options (URDF support and Python bindings)
The possible extra labels are:
- build_collision (build Pinocchio with coal support)
- build_casadi (build Pinocchio with CasADi support)
- build_autodiff (build Pinocchio with CppAD support)
- build_codegen (build Pinocchio with CppADCodeGen support)
- build_extra (build Pinocchio with extra algorithms)
- build_mpfr (build Pinocchio with Boost.Multiprecision support)
- build_sdf (build Pinocchio with SDF parser)
- build_accelerate (build Pinocchio with APPLE Accelerate framework support)
- build_all (build Pinocchio with ALL the options stated above)
Thanks.
The Pinocchio development team.
0e2e9e8 to
f401813
Compare
bf2867e to
31f949c
Compare
6fc4fdc to
6edb477
Compare
0ea8243 to
4733edb
Compare
21587ba to
c215a78
Compare
c215a78 to
ada9fb1
Compare
fa6bb97 to
25bbc67
Compare
| }; | ||
| typedef JointDataEllipsoidTpl<Scalar, Options> JointDataDerived; | ||
| typedef JointModelEllipsoidTpl<Scalar, Options> JointModelDerived; | ||
| // typedef JointMotionSubspaceTpl<3, Scalar, Options, 3> Constraint_t; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| // typedef JointMotionSubspaceTpl<3, Scalar, Options, 3> Constraint_t; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
ea5fa9e to
4d97d00
Compare
Ipuch
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One last problem with ConstraintForceSetOp which does not compile.
| }; | ||
| typedef JointDataEllipsoidTpl<Scalar, Options> JointDataDerived; | ||
| typedef JointModelEllipsoidTpl<Scalar, Options> JointModelDerived; | ||
| // typedef JointMotionSubspaceTpl<3, Scalar, Options, 3> Constraint_t; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
0877a59 to
2644cc0
Compare
forcing subspace with one column finite diff for S Sdot
changelog again
scooting spherical ZYX clean(joint-ellipsoid): extra include removed hard precommit
Co-authored-by: Joris Vaillant <[email protected]>
Co-authored-by: Joris Vaillant <[email protected]>
This reverts commit 36e708a.
Co-authored-by: Joris Vaillant <[email protected]> precommit
2644cc0 to
3850bf0
Compare
| "radius_a", &JointEllipsoid::radius_a, "Semi-axis length in the x direction.") | ||
| .def_readwrite( | ||
| "radius_b", &JointEllipsoid::radius_b, "Semi-axis length in the y direction.") | ||
| .def_readwrite( | ||
| "radius_c", &JointEllipsoid::radius_c, "Semi-axis length in the z direction.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would recommend changing the naming here. Something like radius_x or semi_axis_x. a, b, c is a bit meaningless.
| { | ||
| EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(Vector3Like, 3); | ||
| // Compute first 6 rows from first 2 columns | ||
| Eigen::Matrix<Scalar, 6, 1> result = S.template block<6, 2>(0, 0) * v.template segment<2>(0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Eigen::Matrix<Scalar, 6, 1> result = S.template block<6, 2>(0, 0) * v.template segment<2>(0); | |
| Eigen::Matrix<Scalar, 6, 1> result = S.template leftCols<2>() * v.template head<2>(); |
| /// @brief Default constructor. Creates a sphere (0.01, 0.01, 0.01). | ||
| JointModelEllipsoidTpl() | ||
| : radius_a(Scalar(0.01)) | ||
| , radius_b(Scalar(0.01)) | ||
| , radius_c(Scalar(0.01)) | ||
| { | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The default constructor should not have such values. It is better to set everything to 0 or 1.
| double radius_a = 0.01; | ||
| double radius_b = 0.01; | ||
| double radius_c = 0.01; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Default values should be changed?
jcarpent
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @Ipuch @LucasJoseph and @MegMll for making this nice add-on to Pinocchio.
I made some minor remarks about member naming notably.
Thanks for taking the time to make and fill out this pull request! I'll be open to any enhancement. Thanks to @MegMll and @LucasJoseph for helping out on this one !
Description
In this PR, we introduce the new ellipsoid joint to pinocchio. This implementation is based on the paper:
available here. It has been adapted to the formalism of Pinocchio. It allows defining an ellipsoid on which a solid can glide and rotate with respect to the "normal" of the ellipsoid. The joint is driven as function of angles XYZ, meaningful for biomechanists and thoraco-scapular joint.
Capture.video.du.2025-11-06.23-35-48.webm
Checklist
pre-commit run --all-filesorpixi run lintExtra To-dos
We have tested that the ellipsoid joint behave as a ZYX spherical joint when radii are zeros. We have to test the translation part as well with a composite joint.
doc/e-developmentLinting
Question
Should we add references in the code for what we have implemented ? Doc added in `joint-ellipsoid.hxx
To make it pass I had to modify second Dim and second MaxDim to 1 in this line :
pinocchio/include/pinocchio/multibody/joint-motion-subspace-generic.hpp
Line 52 in 468acc3
Model-graphs, need to make sure the build of the graph happens the expected way for ellipsoid joint -> we can't reverse the joint ellipsoid because the translations and the motion subspace are tight to the parent frame, and it would necessitate to have a new joint definition to get the transform in the child frame. To say it simply, we can't just modify
qto express the spatial transform in the child frame.