[Rock-dev] RidigBodyState
Alexander Duda
Alexander.Duda at dfki.de
Sun Jul 15 19:58:08 CEST 2012
On 07/15/2012 12:35 PM, Satia Herfert wrote:
> Hi,
>
> how can I simply set an new yaw-Angle inside a RigidBodyState? It has an
> quaternion for its orientation and sadly I don't understand the meaning
> of the 4 values the quaternion-constructor needs.
>
> I would like to simply change the yaw-angle and leave roll and pitch
> untouched...
>
> Thanks in advance
> Satia
> _______________________________________________
>
You can find some nice documentation about Quaternions here:
http://www.ogre3d.org/tikiwiki/tiki-index.php?page=Quaternion+and+Rotation+Primer
Here is a small example how to use quaternions in rock (Eigen)
base::Matrix3d m;
m = Eigen::AngleAxisd(nav.heading, base::Vector3d::UnitZ())*
Eigen::AngleAxisd(nav.pitch, base::Vector3d::UnitY())*
Eigen::AngleAxisd(nav.roll, base::Vector3d::UnitX());
rigid_body_state.orientation = base::Quaterniond(m);
Alex
--
Dipl.-Ing. Alexander Duda
Unterwasserrobotik
DFKI Bremen
Robotics Innovation Center
Robert-Hooke-Straße 5
28359 Bremen, Germany
Phone: +49 (0)421 178-456620
Fax: +49 (0)421 178-454150
E-Mail: alexander.duda at dfki.de
Weitere Informationen: http://www.dfki.de/robotik
-----------------------------------------------------------------------
Deutsches Forschungszentrum fuer Kuenstliche Intelligenz GmbH
Firmensitz: Trippstadter Straße 122, D-67663 Kaiserslautern
Geschaeftsfuehrung: Prof. Dr. Dr. h.c. mult. Wolfgang Wahlster
(Vorsitzender) Dr. Walter Olthoff
Vorsitzender des Aufsichtsrats: Prof. Dr. h.c. Hans A. Aukes
Amtsgericht Kaiserslautern, HRB 2313
Sitz der Gesellschaft: Kaiserslautern (HRB 2313)
USt-Id.Nr.: DE 148646973
Steuernummer: 19/673/0060/3
More information about the Rock-dev
mailing list