How to animate vector from 6-DOF data?

9 visualizzazioni (ultimi 30 giorni)
Paul Nelson
Paul Nelson il 31 Ott 2013
Risposto: Mischa Kim il 16 Dic 2013
Hello everyone,
I have tabulated position (x,y,z) and orientation (yaw, pitch, roll) 6-DOF data that I'd like to do some processing on and animate. Basically, I want something similar to this animation (<http://stackoverflow.com/questions/7463742/matlab-for-loop-animations>) of a dot moving along a path as a function of time, but instead of a dot, I want a vector to point in a direction calculated from the 6-DOF data. The purpose is to keep an instrument (e.g. laser) aligned with another object at a different location. My initial thought is to use plot3, but am not certain how accomplish the part of drawing a vector that points in the intended (calculated) direction.
I do have the aerospace toolbox and have successfully used the aero.animation capability to animate the movement of a model with the 6-DOF data, but it doesn't solve the problem of drawing a vector that points towards a calculated direction.
Hopefully this is clear. Thanks for any guidance!

Risposte (1)

Mischa Kim
Mischa Kim il 16 Dic 2013
Hello Paul,
the most elegant approach would be to use the Simulink 3D Animation toolbox, if available. See this MATLAB Answer for more detail. Your VR world would consist of a reference frame (triad) and the arrow in the simplest case. To animate the arrow you would use the VR translation (x,y,z) and rotation properties that are fed by your data.
For information on how to handle the rotation from yaw, pitch, and roll angles check out this Answer.

Categorie

Scopri di più su Aerospace Applications in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by