Repository navigation
feat(pin ik): nullspace and joint limits - #332
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.