petercorke / robotics-toolbox-matlab

Robotics Toolbox for MATLAB
GNU Lesser General Public License v2.1
1.26k stars 440 forks source link

Loss of coordinate frame in quadrotor_dynamics #13

Open eric-wieser opened 8 years ago

eric-wieser commented 8 years ago

This line strikes me as incorrect.

Vr = cross(o,D(:,i)) + v;

D is in body coordinates, but o and v are in world coordinates, so this doesn't make any sense.

Assuming Vr should be in body coordinates, I think this should be

Vr = inv(R) * (cross(o,R*D(:,i)) + v);
eric-wieser commented 8 years ago

Or if o is actually body rate, then

Vr = cross(o,D(:,i)) + inv(R) * v;