Point-point constraint
Posted: Fri Dec 14, 2012 4:10 am
Hi,
I have followed this process in deriving the jacobian matrix for a point-point constraint:
C(x) = xa + ra - xb - rb = 0 where x is the position of each body and r is the distance vector to the anchor point from each body
dC/dt = va + cross(wa, ra) - vb - cross(wb, rb) = 0 where w is the angular velocity of each body
Now that we have this relative velocity, i get the jacobian by inspection as follows:
dC/dt = Jv = [ 1 skew(ra) -1 skew(rb) ] [ va wa vb wb ] where the velocity vector is a column vector
Given the jacobian [ 1 skew(ra) -1 skew(rb) ]
J*M^-1*JT*lambda = -Jva
Now [1 skew(ra) - 1 skew(rb) ] * M where M is:
[ Ma^-1 0 0 0 ]
[ 0 Ia^-1 0 0 ]
[ 0 0 Mb^-1 0 ]
[ 0 0 0 Ib^-1 ]
Gives:
[ Ma^-1 skew(ra)*Ia^-1 -Mb^-1 -skew(rb)*Ib^-1 ]
And multiplying this by the transpose of the jacobian [1 skew(ra) - 1 skew(rb) ] which is a column vector with the same entries gives:
J*M^-1*JT = [ Ma^-1 skew(ra)*skew(ra) *Ia^-1 Mb^-1 skew(rb)*skew(rb)*Ib^-1 ]
Since I now have a mass matrix(m^-1*Identity) and a tensor matrix inside a matrix, what is the next step? I multiplied the skew with the tensor in each case and this doesnt simplify the problem.
I can easily do this problem using Erin's derivation which uses impulse momentum and relative velocity but I want to use the lagrange multiplier to put the problem into a common form for the solver.
Thanks
I have followed this process in deriving the jacobian matrix for a point-point constraint:
C(x) = xa + ra - xb - rb = 0 where x is the position of each body and r is the distance vector to the anchor point from each body
dC/dt = va + cross(wa, ra) - vb - cross(wb, rb) = 0 where w is the angular velocity of each body
Now that we have this relative velocity, i get the jacobian by inspection as follows:
dC/dt = Jv = [ 1 skew(ra) -1 skew(rb) ] [ va wa vb wb ] where the velocity vector is a column vector
Given the jacobian [ 1 skew(ra) -1 skew(rb) ]
J*M^-1*JT*lambda = -Jva
Now [1 skew(ra) - 1 skew(rb) ] * M where M is:
[ Ma^-1 0 0 0 ]
[ 0 Ia^-1 0 0 ]
[ 0 0 Mb^-1 0 ]
[ 0 0 0 Ib^-1 ]
Gives:
[ Ma^-1 skew(ra)*Ia^-1 -Mb^-1 -skew(rb)*Ib^-1 ]
And multiplying this by the transpose of the jacobian [1 skew(ra) - 1 skew(rb) ] which is a column vector with the same entries gives:
J*M^-1*JT = [ Ma^-1 skew(ra)*skew(ra) *Ia^-1 Mb^-1 skew(rb)*skew(rb)*Ib^-1 ]
Since I now have a mass matrix(m^-1*Identity) and a tensor matrix inside a matrix, what is the next step? I multiplied the skew with the tensor in each case and this doesnt simplify the problem.
I can easily do this problem using Erin's derivation which uses impulse momentum and relative velocity but I want to use the lagrange multiplier to put the problem into a common form for the solver.
Thanks