Skip to content

feat(pin ik): nullspace and joint limits - #332

Merged
juelg merged 16 commits into
masterfrom
feat/ik-nullspace
Oct 14, 2026
Merged

juelg merged 16 commits into
masterfrom
feat/ik-nullspace

Conversation

@juelg

@juelg juelg commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

No description provided.

juelg and others added 16 commits August 25, 2026 22:39
A posture step larger than the remaining distance to the posture
overshoots, so gains above 1/dt made the solver oscillate and fail
(FR3 failed from a gain of 25 with dt 0.1).
The solver returned before its first step when the seed already reached
the target, so the posture task never acted on a static target. The
first iteration now always runs while the posture task is active.
The posture term can keep the solver from reaching the target: with
q_home as posture, 31 of 400 reachable FR3 targets failed at gain 1 and
224 at gain 10. The solve is now repeated without the posture before
giving up, so enabling the null space never loses a solution.
getFrameId returns the number of frames for an unknown name, never -1,
so the check never fired and the solver read past the frame array. This
is what crashed Pin for the Panda, whose attachment site Pinocchio drops
because it sits on a body without a joint.
Pin poses are expressed in the root body of the model, because
Pinocchio ignores the pose of the MJCF root body. base_frame expresses
them relative to another frame fixed to the world instead, e.g. the
robot base when the model mounts the robot on another body. None keeps
the current behaviour.
Pin clamped to the joint ranges of the MJCF or URDF, which for the FR3
are the physical limits, wider than the recommended limits in the RCS
config. joint_limits replaces them, e.g. with the robot config limits,
and None keeps the model limits. The constructor is now documented.
All Pin constructions now pass the joint_limits of the robot config, so
IK solutions stay inside the same limits as the gym action and
observation spaces. For the FR3 these are the recommended limits, which
are narrower than the physical ranges in the MJCF.
The Panda limits in the C++ PandaConfig shadow the RobotConfig field and
are not visible from Python, so the default hardware config reported the
FR3 limits to the gym spaces and the IK. It now sets the Panda limits
like the FR3 config does.
With the FR3 config limits now equal to the MJCF limits the test passed
only because its seed already reached the target. It now uses its own
narrower limits.
@juelg
juelg merged commit 85e755c into master Oct 14, 2026
13 checks passed
@juelg
juelg deleted the feat/ik-nullspace branch October 14, 2026 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant