You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey, I noticed that constraints don't seem to be implemented yet, I would like to try implementing it.
Would hinge constraints just be clamping angles of the quaternion or is it more complicated to do correctly? https://github.com/TheComet/ik/blob/devel/ik/src/constraint.c#L35
This fabrik IK library is pretty useful and I'm using the version from Urho3D as a standalone, I was wondering if any insight could be provided on what parts of the this ik library need finishing and how to conceptually do so; Like implementing hinge constraints.
The text was updated successfully, but these errors were encountered:
The way this was supposed to work is you would check if the segment is within the constraint limits, and if it is not, you calculate what the rotation would need to be in order to move the segment back into the limit (delta_rotation). current_rotation would be the joint rotation in local coordinates, and constraint->hinge.(axis|min_angle|max_angle) would be your constraint parameters (also in local coordinates).
If you look at https://github.com/TheComet/ik/blob/devel/ik/src/solver_fabrik.c you will see solve_chain_forwards and solve_chain_backwards. These are the variants that don't consider constraints. There are another two functions called solve_chain_forwards_with_constraints and solve_chain_backwards_with_constraints that would be called if the IK_ALGORITHM_CONSTRAINTS flag is set. They're basically copies of the non-constraint versions, except that they need to transform the current node from global to local space before applying the constraint, and then transform the node back into global space so the algorithm can continue.
This part doesn't work at all yet. If you want you can rewrite those two functions from scratch.
I think that's all I can offer for now. I've had very little time to work on this unfortunately, I'm not sure whether the devel branch even works properly. I recall leaving the project in a mess where nothing works, so if you have issues you should probably switch to master and I'll work on merging the fixes from devel.
Hey, I noticed that constraints don't seem to be implemented yet, I would like to try implementing it.
Would hinge constraints just be clamping angles of the quaternion or is it more complicated to do correctly?
https://github.com/TheComet/ik/blob/devel/ik/src/constraint.c#L35
This fabrik IK library is pretty useful and I'm using the version from Urho3D as a standalone, I was wondering if any insight could be provided on what parts of the this ik library need finishing and how to conceptually do so; Like implementing hinge constraints.
The text was updated successfully, but these errors were encountered: