<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://pybullet.org/Bullet/phpBB3/app.php/feed/topic/13235" />

	<title>Real-Time Physics Simulation Forum</title>
	
	<link href="https://pybullet.org/Bullet/phpBB3/index.php" />
	<updated>2021-07-09T19:58:22+00:00</updated>

	<author><name><![CDATA[Real-Time Physics Simulation Forum]]></name></author>
	<id>https://pybullet.org/Bullet/phpBB3/app.php/feed/topic/13235</id>

		<entry>
		<author><name><![CDATA[andytgl]]></name></author>
		<updated>2021-07-09T19:58:22+00:00</updated>

		<published>2021-07-09T19:58:22+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43484#p43484</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43484#p43484"/>
		<title type="html"><![CDATA[Re: What is the sequence of rotations applied by &quot;getEulerFromQuaternion&quot;?]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43484#p43484"><![CDATA[
Thank you for your reply. I was referring to the "getEulerFromQuaternion" method in the python interface. I have just noticed that the output of help() says that <div class="codebox"><p>Code: </p><pre><code>getQuaternionFromEuler(...)    Convert Euler [roll, pitch, yaw] as in URDF/SDF convention, to quaternion [x,y,z,w]</code></pre></div>so is potentially using the same order of rotations as defined here: <a href="http://sdformat.org/tutorials?tut=specify_pose" class="postlink">http://sdformat.org/tutorials?tut=specify_pose</a>. Will verify and let you know if it is actually true<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=14030">andytgl</a> — Fri Jul 09, 2021 7:58 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[drleviathan]]></name></author>
		<updated>2021-07-08T19:14:43+00:00</updated>

		<published>2021-07-08T19:14:43+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43481#p43481</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43481#p43481"/>
		<title type="html"><![CDATA[Re: What is the sequence of rotations applied by &quot;getEulerFromQuaternion&quot;?]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43481#p43481"><![CDATA[
Is this a question about the Bullet C++ API or the python API?<br><br>I ask because there is no <strong class="text-strong">getEulerFromQuaternion()</strong> in the C++ API proper, but there is an implementation in <strong class="text-strong">examples/SharedMemory/b3RobotSimulatorClientAPI_NoDirect.h</strong>.  For all I know the python API supplies a method with a similar name.<br><br>The example implementation looks like this:<div class="codebox"><p>Code: </p><pre><code>btVector3 b3RobotSimulatorClientAPI_NoDirect::getEulerFromQuaternion(const btQuaternion&amp; quat){        btScalar roll, pitch, yaw;        quat.getEulerZYX(yaw, pitch, roll);        btVector3 rpy2 = btVector3(roll, pitch, yaw);        return rpy2;}</code></pre></div>So the question becomes: What does <strong class="text-strong">btQuaterion::getEulerZYX(yaw, pitch, roll)</strong> do?<br><br>I looked at the code and discovered... it is not clear!  The comments do not say, and the reader would have to step through the math to figure it out.  However, if I were to hazard a guess I would think the yaw-pitch-roll decomposition would be about the <strong class="text-strong">local</strong> up-right-forward axes in that order.  In other words, the directions of the various axes are locked in the local-frame and each rotation in the sequence moves those axes relative to the original world-frame, while the angles are always applied in the local frame.  This is the decomposition that would make the most sense to someone with layman's grasp of how to formulate rotations: such as a pilot sitting in the local-frame of an airplane.<br><br>All that said, I would ask: <strong class="text-strong">What do you really want to do?</strong> (In other words: Why do you think you need Euler angles?).  I have come to the conclusion over the years that Euler angles suck and should be avoided when possible.  It is better (e.g. less dangerous and fewer headaches) to store and supply rotations in quaternion format and to do rotation math to achieve what you want.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=11033">drleviathan</a> — Thu Jul 08, 2021 7:14 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[andytgl]]></name></author>
		<updated>2021-07-08T17:58:34+00:00</updated>

		<published>2021-07-08T17:58:34+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43480#p43480</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43480#p43480"/>
		<title type="html"><![CDATA[What is the sequence of rotations applied by &quot;getEulerFromQuaternion&quot;?]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43480#p43480"><![CDATA[
As in the title, how are the Euler angles provided by the getEulerFromQuaternion method computed?<br>What is the sequence of rotations (about x, y, z, but in which order?) and they are computed in a fixed frame or in a moving frame (intrinsic or extrinsic)?<br>Thanks!<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=14030">andytgl</a> — Thu Jul 08, 2021 5:58 pm</p><hr />
]]></content>
	</entry>
	</feed>
