-
Notifications
You must be signed in to change notification settings - Fork 35
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
A Problem in The Constraint Solver #17
Comments
Hi there. Yes, you're correct I do just "check the angle" - which acts as a circular 'limiting-gate' rather than an ellipsoidal one. The problem at the moment is that storing the bones as two points does not provide enough information to generate a consistent rotation matrix - so a createRotationMatrix() method is used (in the Mat3f class) to do as best it can. To resolve this issue bone directions would either need to be stored in quaternions or each bone would require its own rotation matrix which would keep everything consistent and allow for checking the 'quarters' of the ellipsoidal shape. I don't have the time to perform these modifications, but as the library is open source you are of course welcome to submit your own solution to the issue. |
Hello again.
Many thanks for your answer.
I am trying to solve the problem you mentioned.
But I have a question.
What is exactly a hinge reference axis? in some part of your code, you
mentioned it is perpendicular to the hinge rotation axis, and some part you
said it should not be perpendicular.
How exactly it is determined for each joint?
Regards.
Thanks
…On Sun, Apr 26, 2020 at 1:34 AM Al Lansley ***@***.***> wrote:
Hi there.
Yes, you're correct I do just "check the angle" - which acts as a circular
'limiting-gate' rather than an ellipsoidal one. The problem at the moment
is that storing the bones as two points does not provide enough information
to generate a consistent rotation matrix - so a createRotationMatrix()
method is used (in the Mat3f class) to do as best it can.
To resolve this issue bone directions would either need to be stored in
quaternions or each bone would require its own rotation matrix which would
keep everything consistent and allow for checking the 'quarters' of the
ellipsoidal shape.
I don't have the time to perform these modifications, but as the library
is open source you are of course welcome to submit your own solution to the
issue.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#17 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHECEVXXQLITQSBBZJCLA53RONXQPANCNFSM4MOCB2FA>
.
|
The reference axis of a hinge joint is a vector in the plane of the hinge about which clockwise and anti-clockwise constraint angles are measured. So if you've got a vector, like think of a pencil standing point upwards on a desk, then the surface of the desk describes the hinge rotation axis - then, a reference axis is like placing a second pencil pointing (for example) directly towards you. The hinge constraint angles (clockwise and anti-clockwise) are relative to the reference angle (i.e. the pencil pointing towards you). Hope that makes sense... Reference axes must be within the plane of the hinge rotation axis. For example, if you take a look at the setHinge() method of FabrikJoint3D you'll notice that if a reference axis does not fall within the plane of the rotation axis (as determined by the fact that the dot-product of the two vectors is zero [or very close to zero if we're being picky], i.e. they're perpendicular) then the method throws an exception. Global hinges have the hinge plane (e.g. the plane which is perpendicular to a given vector) specified in world-space, while for local hinges the hinge plane is in the local space of the previous bone in the chain (which is to say, it's in the coordinate system as generated by the Mat3f.createRotationMatrix() method ). Take a look at 3D Demo 5 / Figure 20 of the documentation for an example of global hinges with reference constraints, and 3D Demos 6 and 7 for local hinges with reference constraints. Cheers! =D |
Thanks
…On Thu, May 21, 2020 at 10:02 AM Al Lansley ***@***.***> wrote:
The reference axis of a hinge joint is a vector in the plane of the hinge
about which clockwise and anti-clockwise constraint angles are measured. So
if you've got a vector, like think of a pencil standing point upwards on a
desk, then the surface of the desk describes the hinge rotation axis -
then, a reference axis is like placing a second pencil pointing (for
example) directly towards you. The hinge constraint angles (clockwise and
anti-clockwise) are relative to the reference angle (the pencil pointing
towards you). Hope that makes sense...
Reference axes must be within the plane of the hinge rotation axis. For
example, if you take a look at the setHinge() method of FabrikJoint3D
you'll notice that if a reference axis does not fall within the plane of
the rotation axis (as determined by the fact that the dot-product of the
two vectors is zero [or very close to zero if we're being picky], i.e.
they're perpendicular) then the method throws an exception.
Global hinges have the hinge plane (e.g. the plane which is perpendicular
to a given vector) specified in world-space, while for local hinges the
hinge plane is in the local space of the previous bone in the chain (which
is to say, it's in the coordinate system as generated by the
Mat3f.createRotationMatrix() method ).
Take a look at 3D Demo 5 / Figure 20 of the documentation for an example
of global hinges with reference constraints, and 3D Demos 6 and 7 for local
hinges with reference constraints.
Cheers! =D
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#17 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHECEVR36T7XQMFVGE3H263RSTN2DANCNFSM4MOCB2FA>
.
|
In forward or backward phase of FABRIK algorithm, it should be check that the target is not out of the ellipsoidal shape according to the paper you mentioned:
Aristidou, A., & Lasenby, J. (2011). FABRIK: a fast, iterative solver for the inverse kinematics problem. Graphical Models, 73(5), 243-260.
But in your code, you're just checking the angle between two vectors and rotating the vector that relates to the target.
I think this is not the correct way that FABRIK solves it. The algorithm should check the position of the target according to an ellipsoidal shape, as explained in the paper.
The text was updated successfully, but these errors were encountered: