ROS Answers: Open Source Q&A Forum - RSS feedhttps://answers.ros.org/questions/Open source question and answer forum written in Python and DjangoenROS Answers is licensed under Creative Commons Attribution 3.0Tue, 28 Apr 2015 08:45:27 -0500Rotation and transformation for a n axis by PI/4https://answers.ros.org/question/208070/rotation-and-transformation-for-a-n-axis-by-pi4/
I have the follwoing:
Eigen::Vector3d x_axis=..... // Heading
Eigen::Vector3d z_axis= .....
Eigen::Vector3d y_axis=z_axis.cross(x_axis).normalized();
how to get a rotation matrix and quaternion for these axis?? How can I do a rotation by PI/4 for this axis or the yaw rotated by PI/4... I mean I want to heading to be rotated by PI/4 so the heading will be between the x and y axises.. ???
Tue, 28 Apr 2015 02:39:09 -0500https://answers.ros.org/question/208070/rotation-and-transformation-for-a-n-axis-by-pi4/Comment by dornhege for <p>I have the follwoing: </p>
<pre><code> Eigen::Vector3d x_axis=..... // Heading
Eigen::Vector3d z_axis= .....
Eigen::Vector3d y_axis=z_axis.cross(x_axis).normalized();
</code></pre>
<p>how to get a rotation matrix and quaternion for these axis?? How can I do a rotation by PI/4 for this axis or the yaw rotated by PI/4... I mean I want to heading to be rotated by PI/4 so the heading will be between the x and y axises.. ??? </p>
https://answers.ros.org/question/208070/rotation-and-transformation-for-a-n-axis-by-pi4/?comment=208087#post-id-208087What do you actually want as a result? An eigen representation of a rotation in any form that is a yaw angle of pi/4? There is AngleAxis that does this directly: http://eigen.tuxfamily.org/dox/classEigen_1_1AngleAxis.htmlTue, 28 Apr 2015 08:45:27 -0500https://answers.ros.org/question/208070/rotation-and-transformation-for-a-n-axis-by-pi4/?comment=208087#post-id-208087