pythonscipysimulationphysicsmotion

Angular transformation matrix for 6 DoF simulation using scipy.spatial.transform.Rotation


I am writing a simulator for 6 DoF motion of a vehicle and need to transform the moments and angular velocities defined in the global coordinate system into the vehicle reference frame and back. Normally this is done using:

enter image description here

and an inverse of that. I have implemented this myself, taking care of the singular cases for the pitch angle, but would like to rely on the scipy module instead. That's what I'm already using for vector variables. Is this possible? I don't see anything in the docs.


Solution

  • The question is ill-posed. The transformation in the figure is part of a larger matrix used to transform the motion from vehicle to global reference frames during numerical integration via an inverse of T_theta. See here: https://physics.stackexchange.com/questions/429081/rotational-kinematics-and-angular-velocity-vector-transformation/429094#429094?newreg=6ace01d632a64236ae4b8a42ec22c8d8

    A working example showing how moments can be translated between reference frame and computed using thrust allocation is given here: https://github.com/UnnamedMoose/MarineVehicleReinforcementLearning/blob/moreComplexPhysics/example_forcesAndStuff.py