J = [ -I, -(-r1.y i, r1.x j), I , (-r2.y i, r2.x j)]
K = J M-1 JT
And the result is
K = [(1/m1 + 1/m2) * eye(2) - skew(r1) * invI1 * skew(r1) - skew(r2) * invI2 * skew(r2)]
= [1/m1+1/m2 0 ] + invI1 * [r1.y*r1.y -r1.x*r1.y] + invI2 * [r1.y*r1.y -r1.x*r1.y]
[ 0 1/m1+1/m2] [-r1.x*r1.y r1.x*r1.x] [-r1.x*r1.y r1.x*r1.x]
My question is how K is calculated?
(More detailed:
how -(-r1.y i, r1.x j) * -(-r1.y i, r1.x j)
becomes
[r1.y*r1.y -r1.x*r1.y]
[-r1.x*r1.y r1.x*r1.x] )
Thanks a lot. (plus: I have understood how distance joint effect mass matrix is calculated.)
Box 2D, revolute joint effect mass matrix
-
- Posts: 3
- Joined: Fri Jun 20, 2008 4:05 pm
Box 2D, revolute joint effect mass matrix
Last edited by bendaowei on Thu Apr 16, 2009 2:10 am, edited 2 times in total.
-
- Posts: 316
- Joined: Fri Jul 01, 2005 5:29 am
- Location: Irvine
Re: Box 2D, revolute joint effect mass matrix
You need to use the outer product: v * transpose(v)bendaowei wrote: how -(r1.y i, r1.x j) * -(r1.y i, r1.x j)
becomes
[r1.y*r1.y -r1.x*r1.y]
[-r1.x*r1.y r1.x*r1.x] )
Code: Select all
[ r1.y] * [r1.y, -r1.x]
[-r1.x]
-
- Posts: 3
- Joined: Fri Jun 20, 2008 4:05 pm
Re: Box 2D, revolute joint effect mass matrix
This is very true.You need to use the outer product: v * transpose(v)
Code: Select all
J v = [1 0 -r.y][v.x] = [v.x - r.y * omega, v.y + r.x * omega]
[0 1 r.x][v.y]
[omega]
Code: Select all
J JT = [1 0 -r.y][1 0] = [1 + r.y * r.y][0 + -r.y * r.x]
[0 1 r.x][0 1] [0 + -r.y * r.x][1 + r.x * r.x]
[-r.y r.x]