# cyclic coordinate descent inverse kinematics

This topic is 4081 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hi! I'm trying to implement some form of inverse kinematics, and from what I've read it seems this method is better than the Jacobian variant- I hope I've made the correct choice! Anyway, from what I'm reading it seems that from the root bone I just have to iteratively nudge them 1 degree at a time, minimising the distance to the target at each step. Is that correct? From CCD article, I think theres a mistake on that page too. It defines
F = F1M12 + F2M22F3M32
Probably should be,
F = F1M12 + F2M22 + F3M32
How can I use this to make Inverse Kinematics? Is that last section with S, a, b, c, just relevant to proteins, because that seems only relevant for that 2 axis layout. All the equations there seem to be specifically for 2D... How can I do this in 3D? Solving for 2D using trig is easy... But how with 3D, when you have rotation constraints too? Thanks!

##### Share on other sites
Quote:
 Anyway, from what I'm reading it seems that from the root bone I just have to iteratively nudge them 1 degree at a time, minimising the distance to the target at each step.

I only glanced at that article and I've never done inverse kinematics myself, but from how you explained it this sounds something like a direct greedy approach to inverse kinematics. I can see how something like that might work, but maybe not in all cases and I don't think it would produce very natural movements. You could loop through each joint and check the closeness to the goal if it were left alone, moved one degree up, or moved one degree down. Then bend that joint(or not) to whichever position had the highest fitness. For ball socket joints 2 perpendicular regular joints could be used really close together.

##### Share on other sites
Quote:
 I'm trying to implement some form of inverse kinematics, and from what I've read it seems this method is better than the Jacobian variant- I hope I've made the correct choice!

I never implemented CCD, but I did Transpose, PI, and DLS, and there is a pretty big difference in them, but CCD apparently is fine if you are only ever making very small changes,...

Dampened Least Squares would be my recommendation though.
(get some source code for IK here:
http://jgt.akpeters.com/papers/BussKim05/
)

##### Share on other sites
Quote:
 Original post by GenjixI'm trying to implement some form of inverse kinematics, and from what I've read it seems this method is better than the Jacobian variant- I hope I've made the correct choice!

It's often more efficient than the Jacobian variant, particularly for long joint chains. It is less likely to produce realistic motions, particularly for large target displacement.

Quote:
 Anyway, from what I'm reading it seems that from the root bone I just have to iteratively nudge them 1 degree at a time, minimising the distance to the target at each step. Is that correct?

No. The way CCD works is, you numerically figure out which position is best for that particular joint, keeping all other joints constant.

Here's an example. Suppose my right upper arm is out in front of me and my forearm is pointing straight up (try that out now) and I want to reach out to a point 3 feet in front of me. Let's assume I move my shoulder, then my elbow. So first I'd pivot my shoulder down while keeping my elbow locked at a 90 degree angle, with the result that my hand would be close to the target point but not touching it. Then I'd move only my elbow, while keeping my shoulder at the position I'd found before. Again I wouldn't quite get there, but I'd put my elbow in the best possible position for that shoulder position. Then I'd only move my shoulder again. And so on, until I hit the target, or at least got close enough.

##### Share on other sites
Quote:
Original post by Sneftel
Quote:
 Original post by GenjixI'm trying to implement some form of inverse kinematics, and from what I've read it seems this method is better than the Jacobian variant- I hope I've made the correct choice!

It's often more efficient than the Jacobian variant, particularly for long joint chains. It is less likely to produce realistic motions, particularly for large target displacement.

Quote:
 Anyway, from what I'm reading it seems that from the root bone I just have to iteratively nudge them 1 degree at a time, minimising the distance to the target at each step. Is that correct?

No. The way CCD works is, you numerically figure out which position is best for that particular joint, keeping all other joints constant.

Here's an example. Suppose my right upper arm is out in front of me and my forearm is pointing straight up (try that out now) and I want to reach out to a point 3 feet in front of me. Let's assume I move my shoulder, then my elbow. So first I'd pivot my shoulder down while keeping my elbow locked at a 90 degree angle, with the result that my hand would be close to the target point but not touching it. Then I'd move only my elbow, while keeping my shoulder at the position I'd found before. Again I wouldn't quite get there, but I'd put my elbow in the best possible position for that shoulder position. Then I'd only move my shoulder again. And so on, until I hit the target, or at least got close enough.

Thanks! This is kind of what I meant though :)

How does IK tie into the whole situation then of animated characters and the environment? Say I'm running up stairs- I'm told IK would be used here- surely I would just interpolate and stop moving an FK chain if theres a collision response instead of using IK?

Thanks again.

1. 1
Rutin
23
2. 2
3. 3
JoeJ
20
4. 4
5. 5

• 29
• 41
• 23
• 13
• 13
• ### Forum Statistics

• Total Topics
631741
• Total Posts
3001976
×