As I mentioned on previous post. This post will describe more about CCD in relation to Inverse Kinematics and Human Body Animation.The basic idea of Cyclic Coordinate Descent (CCD) Method is performing iterative heuristic search for each joint angle, so at the end, the end-effector could reach a desired location in space. By doing iterative heuristic search, we try to find the best location of an articulated structure given its joint angles. This would result in the best (closest) distance of the end-effectors and the desired end points. The calculation is done one joint at a time, and in backward fashion, until we reached the parent joint. For calculating the joint angle, we also give certain limitation for the angle, just like the angle of a human. We implement this, so the animation wouldn’t do any strange movement. The first thing to do in CCD method is to determine the desired location of the end-effector (X). After that, we try to minimize the distance (ΔX) between end-effector position (X^) and the desired destination (X) as low as possible. We do this by increasing/decreasing the current joint angle of the end-effector. When the distance of the end-effector is as low as possible, it means that the current joint angle (Θ) has reached its maximum point, given the current position. Then we move backwards to the upper joint, where we then try again to minimize the distance between end-effector and destination point, but this time only altering the current upper joint. We do this until we reached the parent joint. An example can be seen in the following figure.
For example, we can imagine when we try to move the whole hand. The first thing that we do is to calculate the minimum distance that could be reached by our hand only using the wrist joint. After that, we then move backwards and try manipulate the elbow joint and again calculate the minimum distance that could be reached by our hand. We do this until the last joint is manipulated, for instance, the shoulder joint, or even our backbone joint. Each human body joint are capable to rotate in one to three different axis (3-Dimension). This ability to rotate is called Degree of Freedom of a joint. So each joint could have 1 to 3 Degree of Freedom (DOF). Using CCD method, we try to find the best joint angle for x-axis, y-axis and z-axis for a joint given the coordinate of the destination point (i.e. the best joint angle of each axis that could make the end-effector closer to the destination point). Suppose a joint cannot move in an axis, the best joint angle for that axis is zero. After calculating both three joint angles for each axis, we then calculate the rotation matrix for each axis, using the following rotation matrix:
Where RotX is the rotation matrix for x-axis, RotY is for y-axis and RotZ is for z-axis. We then combine these rotation matrixes into a single rotation matrix:
Where R matrix is the rotation matrix of a joint. Applying rotation matrix of Joint(i) towards the end-effector will cause all the part from Joint(i) up to the end-effector to rotate. After that, the calculation will move backwards to Joint(i-1) and again we calculate the joint angle for Joint(i-1) and calculate the rotation matrix. In order to move end-effector given the rotation of Joint(i-1), besides rotation matrix of the current joint, we also need rotation matrix of the previous joint and the translation matrix of the previous link. The following is the translation matrix:
Where dX, dY, dZ is the length of the link (i.e. the distance between two joints). For transforming the end-effector given the rotation of Joint(i-1), we need the matrix of R(i-1)*T(i)*R(i), where T(i) is the translation matrix from the current joint to the previous joint (i.e. length of the link) and R(i) is the rotation matrix from the previous joint. Keep in mind that the calculation is done backwards starting from the end-effector towards the parent joint.This calculation will continue until we reached the parent joint where there will be no more joints that could rotate after this joint. After reaching the parent joint, the calculated distance between current end-effector location and the desired location should be as minimum as possible.
Cyclic Coordinate Descent Method for: a) Rotational Joint and b) Prismatic Joint
For example, we can imagine when we try to move the whole hand. The first thing that we do is to calculate the minimum distance that could be reached by our hand only using the wrist joint. After that, we then move backwards and try manipulate the elbow joint and again calculate the minimum distance that could be reached by our hand. We do this until the last joint is manipulated, for instance, the shoulder joint, or even our backbone joint. Each human body joint are capable to rotate in one to three different axis (3-Dimension). This ability to rotate is called Degree of Freedom of a joint. So each joint could have 1 to 3 Degree of Freedom (DOF). Using CCD method, we try to find the best joint angle for x-axis, y-axis and z-axis for a joint given the coordinate of the destination point (i.e. the best joint angle of each axis that could make the end-effector closer to the destination point). Suppose a joint cannot move in an axis, the best joint angle for that axis is zero. After calculating both three joint angles for each axis, we then calculate the rotation matrix for each axis, using the following rotation matrix:
Where RotX is the rotation matrix for x-axis, RotY is for y-axis and RotZ is for z-axis. We then combine these rotation matrixes into a single rotation matrix:
R = RotZ*RotY*RotX
Where R matrix is the rotation matrix of a joint. Applying rotation matrix of Joint(i) towards the end-effector will cause all the part from Joint(i) up to the end-effector to rotate. After that, the calculation will move backwards to Joint(i-1) and again we calculate the joint angle for Joint(i-1) and calculate the rotation matrix. In order to move end-effector given the rotation of Joint(i-1), besides rotation matrix of the current joint, we also need rotation matrix of the previous joint and the translation matrix of the previous link. The following is the translation matrix:
Where dX, dY, dZ is the length of the link (i.e. the distance between two joints). For transforming the end-effector given the rotation of Joint(i-1), we need the matrix of R(i-1)*T(i)*R(i), where T(i) is the translation matrix from the current joint to the previous joint (i.e. length of the link) and R(i) is the rotation matrix from the previous joint. Keep in mind that the calculation is done backwards starting from the end-effector towards the parent joint.This calculation will continue until we reached the parent joint where there will be no more joints that could rotate after this joint. After reaching the parent joint, the calculated distance between current end-effector location and the desired location should be as minimum as possible.
What about doing straight lines to the goal. Most of which will of course overs-shoot.
ReplyDeleteAnd decrease amount of joints each time. Until You reach first one.
You get bunch of errors ...
Has there been something which explored such idea?
Regards
hribek
there is a mistake at the RotZ matrix.
ReplyDeletem33 needs to be a 1 instead a 0 !
Great post! It's a shame that I do not understand those formulas and equations.
ReplyDeletechenlina20150709
ReplyDeletelouis vuitton
louis vuitton handbags
prada handbags
abercrombie fitch
longchamp sale
adidas wings
coach outlet
coach purses
coach outlet store online
michael kors handbags
abercrombie outlet
coach outlet
coach outlet online
gucci shoes
chanel outlet online
retro 11
timberland outlet
gucci outlet
tory burch outlet
jordan 6 rings
hollister kids
michael kors
michael kors
fitflops
jordan 13 shoes
coach outlet
louis vuitton handbags
jordan retro 11
louis vuitton handbags
hollister clothing
soccer jerseys
louis vuitton outlet
true religion sale
true religion
ray ban outlet
abercrombie and fitch
louis vuitton handbags
true religion sale
discount oakley sunglasses
adidas outlet
as
QF0723
ReplyDeletejordan 13
nick foles jersey,eagles elite jersey
cartier love bracelet
nhl jerseys
peyton manning jersey,eric decker jersey,aqib talib jersey,emmanuel sanders jersey,shannon sharpe jersey,louis vasquez jersey
raiders jerseys
golden state warriors jerseys
oakley sunglasses outlet
beats by dre
nike air max uk
russell westbrook jersey
nike free 5.0
toms outlet
the north face uk
larry fitzgerald jerseys,kevin kolb jerseys,patrick peterson jersey,andre ellington jersey,larry fitzgerald jersey,calais campbell jersey,deone bucannon jersey,andre ellington elite jersey,darnell dockett jersey,michael floyd jersey,sam acho jersey
ugg boots uk
mulberry sale
nike soccer shoes
ralph lauren uk
north face outlet store
kate spade outlet
north face jackets
michael kors handbags
robert griffin jersey,joe theismann jersey,andre roberts jersey,sonny jurgensen jersey,art monk jersey,bashaud breeland jersey,barry cofield jersey,perry riley jersey,e.j. biggers jersey,duke ihenacho jersey,josh morgan jersey
ahmad bradshaw jersey,josh mcnary jersey,andrew luck jersey,donte moncrief jersey,delano howell jersey,robert mathis jersey,andrew luck jersey,trent richardson jersey
nike running shoes
mulberry outlet
the north face outlet
coach outlet store
tory burch outlet
manchester united jersey
2015-7-28 xiaozhengm
ReplyDeletecoach outlet store online
borse louis vuitton
true religion jeans
oakley sunglasses outlet
soccer jerseys
gucci outlet
oakley sunglasses
pandora charms
sac longchamp
chaussure louboutin
chanel bags
ray bans
burberry sale
michael kors handbag
coach factory outlet
coach outlet
michael kors bags
michael kors bag
pandora outlet
true religion outlet
michael kors outlet online
toms shoes
cheap ray ban sunglasses
snabacks wholesale
michael kors handbags
mcm handbags
michael kors
mont blanc pens
kate spade uk
toms outlet
mont blanc pen
jordan shoes
ray ban sunglasses
oakley sunglasses sale
burberry outlet
cheap beats
sac longchamp
louis vuitton
michael kors outlet online
replica watches
201595dongdong
ReplyDeletemichael kors outlet
michael kors outlet
louis vuitton outlet
louis vuitton outlet
jordan 11s
ray bans
ralph lauren
hollister co,hollister jeans,hollister.com,hollister ca
michael kors handbags
ray ban sunglasses
sac longchamp
louis vuitton handbags
nike uk
nike trainers
jordan 6 cigar
michael kors outlet online
uggs outlet
louis vuitton
true religion jeans
louis vuitton handbags
prada outlet
rolex watches outlet
hollister uk
michael kors outlet online
coach outlet store online
oakley galsses
ray ban sunglass
air jordan 13
michael kors handbags
jordan 4s
ray ban outlet
coach outlet
michael kors handbags
ugg outlet
abercrombie and fitch
201510.29dongdong
ReplyDeletemichael kors bags
Montblanc Pen Refills Outlet
authentic louis vuitton handbags
Canada Goose Outlet,Canada Goose Outlet Online,Canada Goose Clearance
canada goose jackets
jordan shoes
Coach Diaper Bag Outlet
ray-ban sunglasses
Authentic Louis Vuitton Handbags Outlet Sale
michale kors outlet
Jordan Concords Low And High
mihchael kors bag
New Michael Kors Handbags Outlet Online
toms outlet
football jerseys cheap
ugg outlet
hollister clothing
Louis Vuitton Canada Official Site
Abercrombie and Fitch Women's Clothing
michael kors outlet
ray-ban sunglasses,ray ban sunglasses,ray bans,rayban,ray ban wayfarer,raybans,ray ban glasses,ray ban aviators,ray ban clubmaster,ray ban eyeglasses,cheap ray bans,ray bans sunglasses,ray ban aviator,ray bands,fake ray bans,ray ban prescription glasses,ray ban outlet,ray ban canada,ray ban sunglasses sale,ray ban sale
cheap ugg boots
Michael Kors Handbags Clearance Outlet
Official Coach Online Factory Sale
Louis Vuitton Neverfull Tote Bag
nike football,airmax,nike free 3.0,nike air huarache,nike womens shoes,nike free run womens
Louis Vuitton Purses For Cheap
michael kors uk
Abercrombie and Fitch Store
Outlet Michael Kors Sale Online
canada goose jackets
hermes outlet
Cheap Ray Ban Wayfarer
20160112xiaodaige
ReplyDeleteghd uk
cheap ray ban sunglasses
mulberry outlet,mulberry handbags outlet
nhl jerseys
burberry outlet online
timberland shoes
true religion outlet
ugg boots
longchamp handbags
juicy couture tracksuit
coach outlet online
ugg outlet
swarovski crystal
michael kors outlet
oakley outlet store
tory burch outlet
cheap jordan shoes
ed hardy clothing
nfl jersey wholesale
oakley sunglasses wholesale
cleveland cavaliers
ugg clearance
michael kors outlet
michael kors outlet
louis vuitton handbags outlet
discount ugg boots
louis vuitton,borse louis vuitton,louis vuitton sito ufficiale,louis vuitton outlet
cheap oakley sunglasses
hermes outlet
ralph lauren outlet
nike outlet
ray-ban sunglasses
ralph lauren outlet
replica watches
ugg outlet
chenlina20160125
ReplyDeletelouis vuitton outlet
michael kors outlet stores
true religion outlet
oakley sunglasses cheap
michael kors handbags
cheap jerseys
coach outlet online
canada goose outlet
oakley outlet
tiffany and co
ugg outlet
cheap jordans
tory burch sale
tiffany and co
louis vuitton
the north face
the north face outlet
coach outlet
ray ban sunglasses
uggs outlet
jordan retro
louis vuitton outlet online
abercrombie and fitch new york
coach outlet online
cheap oakley sunglasses
ugg boots
timberland outlet
polo ralph lauren
coach factory outlet online
ugg sale
adidas originals
coach factory outlet
nba jerseys
michael kors outlet
canada goose jackets
kobe bryant shoes
oakley outlet
ralph lauren uk
canada goose coats
michael kors outlet online
as
nike free run 2
ReplyDeletetods outlet
coach factory outlet
coach outlet
coach outlet online
michael kors outlet
christian louboutin sale
coach factory outlet
michael kors outlet
ray ban sunglasses
air jordans
coach outlet online
fitflops sale clearance
nike air huarache
ray ban sunglasses
tiffany outlet
true religion shorts
rolex watches
ray ban sunglasses
hollister clothing
michael kors outlet
toms shoes
michael kors outlet
nike free run
jordan 8
ray bans
louis vuitton outlet
cheap oakley sunglasses
michael kors outlet
toms shoes
kevin durant shoes
louis vuitton handbags
true religion jeans
polo ralph lauren outlet
adidas trainers
nike nfl jerseys
nike running shoes
oakley sunglasses
ralph lauren outlet
asics running shoes
20165.5wengdongdong
michael kors outlet online
ReplyDeletenike air max 2017
michael kors outlet
irving shoes
chrome hearts online
adidas nmd runner
nike air zoom pegasus 32
cheap jordans
michael kors outlet online
basketball shoes
polo ralph lauren outlet
ReplyDeletecheap oakley sunglasses
ralph lauren
pandora jewelry
chicago bears jerseys
skechers shoes
chargers jerseys
true religion jeans sale
bengals jersey
kobe 9 elite
20170408
christian louboutin heels
ReplyDeletekobe 9 shoes
pandora charms
nike air max 90
michael kors handbags
saint laurent handbags
ray ban eyeglasses
nike free run flyknit
adidas nmd
burberry handbags
2017.5.16chenlixiang
michael kors outlet clearance
ReplyDeletejordan 4
oakley sunglasses
oklahoma city thunder jerseys
polo ralph lauren
adidas nmd r1
oakley sunglasses
nike factory outlet
coach outlet
converse shoes
new york jets jerseys
ReplyDeletepackers jerseys
bottega veneta
cincinnati bengals jerseys
nfl jerseys wholesale
nike huarache
coach outlet
ed hardy uk
cheap jordan shoes
coach handbags
20180419xiaoke
ReplyDeletecanada goose jackets
ugg boots on sale
longchamp bags
pandora charms sale clearance
ferragamo shoes
uggs outlet online
mac cosmetics
fitflops shoes
coach factory outlet
coach outlet
2018515leilei3915
ReplyDeleteugg boots clearance
michael kors outlet
michael kors outlet clearance
adidas superstar shoes
michael kors handbags
puma shoes
true religion
michael kors outlet online
fred perry shirts
pandora jewelry outlet