<?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/8153" />

	<title>Real-Time Physics Simulation Forum</title>
	
	<link href="https://pybullet.org/Bullet/phpBB3/index.php" />
	<updated>2021-02-03T21:39:32+00:00</updated>

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

		<entry>
		<author><name><![CDATA[BluePrintRandom]]></name></author>
		<updated>2021-02-03T21:39:32+00:00</updated>

		<published>2021-02-03T21:39:32+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43290#p43290</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43290#p43290"/>
		<title type="html"><![CDATA[Re: 6DOF Constraint: Y-axis angular limit &gt; 90 degrees?]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43290#p43290"><![CDATA[
BUMP<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=10520">BluePrintRandom</a> — Wed Feb 03, 2021 9:39 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[cmeyer]]></name></author>
		<updated>2012-10-14T22:53:29+00:00</updated>

		<published>2012-10-14T22:53:29+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=28978#p28978</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=28978#p28978"/>
		<title type="html"><![CDATA[Re: 6DOF Constraint: Y-axis angular limit &gt; 90 degrees?]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=28978#p28978"><![CDATA[
What about the btConeTwistConstraint? You use a quaternion to set the motor target. <br>Wouldn't that be the 3DOF quaternion constraint you are talking about? If not, what would be the difference?<br><br>I tried the btConeTwistConstraint and it will point to the direction set by a quaternion via setMotorTarget. Unfortunately I am unable to control the motor force, so it is always at maximum and the rotations are almost immediate. m_maxMotorImpulse is only used for the obsolete constraint solver. And if I turn the obsolete solver on the body attached to the constraint will just vanish with m_maxMotorImpulse &gt;= 0  <img class="smilies" src="https://pybullet.org/Bullet/phpBB3/images/smilies/icon_question.gif" width="15" height="15" alt=":?:" title="Question"><br>Would it be hard to make the motor force adjustable? I looked through the code, but my understanding about bullet's inner workings and physics (engines) in general is way too low to make the right changes.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=9507">cmeyer</a> — Sun Oct 14, 2012 10:53 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Erwin Coumans]]></name></author>
		<updated>2012-10-13T16:13:54+00:00</updated>

		<published>2012-10-13T16:13:54+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=28976#p28976</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=28976#p28976"/>
		<title type="html"><![CDATA[Re: 6DOF Constraint: Y-axis angular limit &gt; 90 degrees?]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=28976#p28976"><![CDATA[
At some stage I'll look into implementing a quaternion constraint. There is plenty of other work first though.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=2">Erwin Coumans</a> — Sat Oct 13, 2012 4:13 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[gjaegy]]></name></author>
		<updated>2012-10-05T12:11:45+00:00</updated>

		<published>2012-10-05T12:11:45+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=28934#p28934</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=28934#p28934"/>
		<title type="html"><![CDATA[Re: 6DOF Constraint: Y-axis angular limit &gt; 90 degrees?]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=28934#p28934"><![CDATA[
I just came into this issue, and to be honnest, I didn't expect such a restriction in such a hi-end physic engine <img class="smilies" src="https://pybullet.org/Bullet/phpBB3/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><br><br>Now, in my case I have been able to easily implement a workaround (frame basis change), however, I would second the need for a unrestricted 6 DOF constraint !<br><br>Still ,thanks guys for your work <img class="smilies" src="https://pybullet.org/Bullet/phpBB3/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=2399">gjaegy</a> — Fri Oct 05, 2012 12:11 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Flix]]></name></author>
		<updated>2012-06-01T12:54:44+00:00</updated>

		<published>2012-06-01T12:54:44+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=28012#p28012</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=28012#p28012"/>
		<title type="html"><![CDATA[Re: 6DOF Constraint: Y-axis angular limit &gt; 90 degrees?]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=28012#p28012"><![CDATA[
<blockquote class="uncited"><div>your proposed solution will not work</div></blockquote> Well, actually all that (I think) I've managed to do is to replace a rigidBody-&gt;setAngularFactor(0,1,0) with a "one axis free" 6dof constraint and that seemed to work in almost the same way. I haven't tried to lock the Y axis to a different limit range (&gt;90 degrees) so I don't know it it works. <br><br>Basically I've implemeted this replecement as a test using this demo as a starting point <a href="http://bulletphysics.org/Bullet/phpBB3/viewtopic.php?f=17&amp;t=7855" class="postlink">http://bulletphysics.org/Bullet/phpBB3/ ... =17&amp;t=7855</a> (the demo uses the Y "angular factor" to prevent the ragdoll from falling) and it seems to work. The advantage is that I can lock the Y axis while walking so that the character can keep a precise direction, and I can apply a velocity motor to it while the right or left keys are being pressed to make it turn right or left.<br><br>Of course it's still Euler axis based, but it works when the character is perfectly vertical.<br><br>Thanks for the documentation you're posted; it seems interesting.<br><blockquote class="uncited"><div>Dirk Gregorius posted a response here on gamedev.net, referencing the book "Game Physics Pearls", which has a chapter on the topic of quaternion constraints. In the post he mentions that he implemented a rigid body engine using quaternion constraints, and the solutions are more stable vs Euler angle constraints. <br><br>I am going to order a copy of the book and take a look. Has anyone else either implemented this or thought of doing so? This would be a really cool addition to the Bullet physics library - 3DOF or 6DOF quaternion based constraint, thereby avoiding range limitations to angle limits.</div></blockquote>Useless to say that I would appreciate a similiar addition too.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=2180">Flix</a> — Fri Jun 01, 2012 12:54 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[info128]]></name></author>
		<updated>2012-05-31T06:44:20+00:00</updated>

		<published>2012-05-31T06:44:20+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=28001#p28001</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=28001#p28001"/>
		<title type="html"><![CDATA[Re: 6DOF Constraint: Y-axis angular limit &gt; 90 degrees?]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=28001#p28001"><![CDATA[
Thanks for your response - yes, the main problem seems to be that the constraint solver uses Euler angles, and in order to avoid orthogonality problems, one axis must always be limited to +-90 degrees (as you noted).  Unfortunately, in my case your proposed solution will not work.  As far as I have researched, all solutions involve allowing one axis to freely rotate.  I need to lock down all axes, with each axis low/high limit set to a single value in the range [-PI, PI].  In essence, I need to constrain the rigid body to a single rotation matrix in a full sphere range of rotation.  In Bullet, there is currently no solution for this type of problem, but it seems to me that it would be a common desired feature in many physics simulation projects.<br><br>So far, it seems the best solution would be a quaternion-based 3DOF (rotation only) constraint.  This is discussed by Claude Lacoursière in his PhD thesis "Ghosts and Machines", as noted by Erwin here:<br><br><a href="http://www.bulletphysics.org/Bullet/phpBB3/viewtopic.php?f=6&amp;t=1180" class="postlink">PhD thesis on numerical methods for rigid bodies</a><br><br>Dirk Gregorius posted a response <a href="http://www.gamedev.net/topic/581942-rotational-joint-constraints-using-quaternions" class="postlink">here on gamedev.net</a>, referencing the book "Game Physics Pearls", which has a chapter on the topic of quaternion constraints.  In the post he mentions that he implemented a rigid body engine using quaternion constraints, and the solutions are more stable vs Euler angle constraints.  <br><br>I am going to order a copy of the book and take a look.  Has anyone else either implemented this or thought of doing so?  This would be a really cool addition to the Bullet physics library - 3DOF or 6DOF quaternion based constraint, thereby avoiding range limitations to angle limits.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=7859">info128</a> — Thu May 31, 2012 6:44 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Flix]]></name></author>
		<updated>2012-05-26T11:09:15+00:00</updated>

		<published>2012-05-26T11:09:15+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=27967#p27967</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=27967#p27967"/>
		<title type="html"><![CDATA[Re: 6DOF Constraint: Y-axis angular limit &gt; 90 degrees?]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=27967#p27967"><![CDATA[
<blockquote class="uncited"><div>This works great within a limited range of joint orientations. </div></blockquote>Well, the major issue here is probably that the 6DOF Constraint animations are not "quaternion based" but "Euler axis based". Is that the reason of your "limited" range of joint orientations ?<blockquote class="uncited"><div>Unfortunately, once a joint exceeds +/-90 degrees, the constraint goes haywire. I finally looked at the source for the btGeneric6DofConstraint and found that the y-axis is limited to +/-PI/2, explaining the strange behavior.<br><br>For now I am planning to rotate the joint space such that the y-axis maps to each joint's twist axis (which should never exceed +/-90 degrees). Hopefully the x and z axis limit of 180 degrees will avoid this problem... If not, I'm not looking forward to rolling my own custom constraint code.<br><br>To the Bullet developers: is there any plan to increase the angular limit range for future Bullet revisions? Or, to create a quaternion based "orientation-matching" constraint? This would be extremely useful for me, and I imagine, for others in the future.</div></blockquote>A quaternion-based hinge constraint would be very useful indeed (and it would require just one motor instead of the 3 in a 6DOF constraint): basically, as far as I can understand it, this "quaternion hinge" should be able to change its "hinge axis" based on a "starting" orientation quaternion and a "target" quaternion (without doing any "slerp" rotation, just setting up a motor for it); if somebody knows how to implement it, he's welcome (but I guess it would still be difficult to add "Euler angles limits" to such an implementation: so there are some advantages in sticking to 6DOF constraints after all...).<br><br>As far as the 360° rotation around the Y axis with the current implementation of the 6DOF constraint, it's possible and it's working good. See this link: <a href="http://bulletphysics.org/Bullet/phpBB3/viewtopic.php?f=9&amp;t=4457" class="postlink">http://bulletphysics.org/Bullet/phpBB3/ ... f=9&amp;t=4457</a>  (it seems to work with the X or Z axis free, since the Y axis must always be in [-SIMD_HALF_PI,SIMD_HALF_PI] ). I suggest you use a recent Bullet version for this fix (<a href="http://bulletphysics.org/Bullet/phpBB3/viewtopic.php?f=9&amp;t=5046&amp;hilit=spinning+like+crazy" class="postlink">http://bulletphysics.org/Bullet/phpBB3/ ... like+crazy</a>).<br><br>PS. You may try the code I posted some time ago as a guideline: <a href="http://bulletphysics.org/Bullet/phpBB3/viewtopic.php?f=9&amp;t=7676&amp;p=27180&amp;hilit=limits#p27180" class="postlink">http://bulletphysics.org/Bullet/phpBB3/ ... its#p27180</a><p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=2180">Flix</a> — Sat May 26, 2012 11:09 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[info128]]></name></author>
		<updated>2012-05-26T00:34:53+00:00</updated>

		<published>2012-05-26T00:34:53+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=27964#p27964</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=27964#p27964"/>
		<title type="html"><![CDATA[6DOF Constraint: Y-axis angular limit &gt; 90 degrees?]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=27964#p27964"><![CDATA[
I've been putting together a skeletal animation/dynamics system using two identical skeletons.  One skeleton's joints are keyed/animated.  Each of the second skeleton's bones (section between each joint) are set up as a rigid body with a btGeneric6DofConstraint between each rigid body pair.  <br><br>Each frame, I calculate the proper orientation of each joint's constraint from the keyed/animated skeleton, and set the driven skeleton's 6DOF constraint joint angular limits.  This works great within a limited range of joint orientations.  <br><br>Unfortunately, once a joint exceeds +/-90 degrees, the constraint goes haywire.  I finally looked at the source for the btGeneric6DofConstraint and found that the y-axis is limited to +/-PI/2, explaining the strange behavior.<br><br>For now I am planning to rotate the joint space such that the y-axis maps to each joint's twist axis (which should never exceed +/-90 degrees).  Hopefully the x and z axis limit of 180 degrees will avoid this problem...  If not, I'm not looking forward to rolling my own custom constraint code.<br><br>To the Bullet developers: is there any plan to increase the angular limit range for future Bullet revisions?  Or, to create a quaternion based "orientation-matching" constraint?  This would be extremely useful for me, and I imagine, for others in the future.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=7859">info128</a> — Sat May 26, 2012 12:34 am</p><hr />
]]></content>
	</entry>
	</feed>
