Skip to content

Conversation

@MegMll
Copy link
Collaborator

@MegMll MegMll commented Oct 10, 2025

Description

In this PR, we introduce the new spline joint to pinocchio. This implementation is based on the paper of Lee et al. available here

It allows to define a number of SE3 frames, that will define the movement and dynamics of the joint. It's very useful for biomechanics, but can be used in other applications.

For now the joint configuration has to be bounded between 0 and 1, otherwise the transformation computation will fail.

To do

  • Add better tests
  • Remove the change in act-on-set.hxx
  • Remove dynamic allocation in the bias computation
  • use the reduce sum instead of the full sum over all control frames
  • Make it casadi, cppad, cppadcg, boost::mpfr compatible
  • add it to model-graph
  • Need to redefine lieGroupType to avoid generating random numbers outside of bounds [0, 1]
  • update changelog

Future

  • Add a fit spline algorithm
  • Introduce lower and upper bounds

Copy link
Contributor

@github-actions github-actions bot left a 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.

@pgraverdy pgraverdy added the pr status wip To not review in weekly meeting label Oct 13, 2025
@MegMll MegMll force-pushed the topic/spline_joint branch from f464bc1 to 660af02 Compare October 13, 2025 11:43
@jorisv jorisv force-pushed the topic/spline_joint branch from b4923b1 to 86b40d7 Compare November 25, 2025 13:45
Comment on lines +133 to +138
SE3 operator()(const JointSpline &) const
{
PINOCCHIO_THROW_PRETTY(
std::invalid_argument,
"Graph - Joint Spline cannot have a q_ref. Please use the joint offset directly.");
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why ? It's strange but I don't get why it's not possible.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I looked into it, and for now the spline joint can not accept q_ref. if we put a q_ref, that means we need to redefine the spline joint, from this q_ref to the end, or make the q_ref the 0 of the joint, and compute position from both side of the q_ref (-0.5/0.5, for example).
So q_ref is for now, not possible, but could be integrated when the fit_spline algorithm is added or when the upper and lower bounds are implemented

Comment on lines +353 to +355
if (!edge.forward)
PINOCCHIO_THROW_PRETTY(
std::invalid_argument, "Graph - JointSpline cannot be reversed.");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have to think about that.

Right now I'm not very confident about the reversal of this joint.
I don't think creating a ctrlFrames vector with inverse transformation inside will give us the inverse transformation.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I looked into it as well. Indeed, reversing the ctrlFrames vector will only work when degree of the spline is 1.
So maybe it's better to leave it as it is, right now.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a way that neutral and randomConfiguration return us a valid spline configuration ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

neutral is working, because it returns 0. However if we want random, we need to redefine a lieGroup...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to manage spline with abritrary bounds ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in the future, it would be nice

@jorisv jorisv force-pushed the topic/spline_joint branch from 2e60ca8 to 096a5ec Compare November 26, 2025 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants