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

	<title>Real-Time Physics Simulation Forum</title>
	
	<link href="https://pybullet.org/Bullet/phpBB3/index.php" />
	<updated>2020-06-24T07:28:42+00:00</updated>

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

		<entry>
		<author><name><![CDATA[water]]></name></author>
		<updated>2020-06-24T07:28:42+00:00</updated>

		<published>2020-06-24T07:28:42+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=42956#p42956</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=42956#p42956"/>
		<title type="html"><![CDATA[Re: How to solve the problem of the ball penetrating the cuboid]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=42956#p42956"><![CDATA[
<blockquote class="uncited"><div>The simple way to do it is to use: <a href="https://pybullet.org/Bullet/BulletFull/classbtCollisionObject.html#a64238c6823e02cfb7b09d0db21d0e021" class="postlink">btCollisionObject::setWorldTransform()</a><br><br>So the code might look like this:<div class="codebox"><p>Code: </p><pre><code>btTransform t = body-&gt;getWorldTransform();t.setRotation(btQuaternion(roll, pitch, yaw));body-&gt;setWorldTransform(t);</code></pre></div></div></blockquote><br>Thank you very much<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=13653">water</a> — Wed Jun 24, 2020 7:28 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[drleviathan]]></name></author>
		<updated>2020-06-24T06:21:31+00:00</updated>

		<published>2020-06-24T06:21:31+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=42955#p42955</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=42955#p42955"/>
		<title type="html"><![CDATA[Re: How to solve the problem of the ball penetrating the cuboid]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=42955#p42955"><![CDATA[
The simple way to do it is to use: <a href="https://pybullet.org/Bullet/BulletFull/classbtCollisionObject.html#a64238c6823e02cfb7b09d0db21d0e021" class="postlink">btCollisionObject::setWorldTransform()</a><br><br>So the code might look like this:<div class="codebox"><p>Code: </p><pre><code>btTransform t = body-&gt;getWorldTransform();t.setRotation(btQuaternion(roll, pitch, yaw));body-&gt;setWorldTransform(t);</code></pre></div><p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=11033">drleviathan</a> — Wed Jun 24, 2020 6:21 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[water]]></name></author>
		<updated>2020-06-24T00:50:07+00:00</updated>

		<published>2020-06-24T00:50:07+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=42953#p42953</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=42953#p42953"/>
		<title type="html"><![CDATA[Re: How to solve the problem of the ball penetrating the cuboid]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=42953#p42953"><![CDATA[
Thank you very much for your reply. I found that initobjectground() in my code was initialized only once, so btquaternion quaternion = btquaternion (yaw, pich, roll); it was also called only once, resulting in unable to change the Euler angle of the model. Can I ask if there is any way to control the Euler angle of the rigid body in the bullet to realize the rotation of the rigid body?<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=13653">water</a> — Wed Jun 24, 2020 12:50 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[drleviathan]]></name></author>
		<updated>2020-06-23T13:33:45+00:00</updated>

		<published>2020-06-23T13:33:45+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=42950#p42950</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=42950#p42950"/>
		<title type="html"><![CDATA[Re: How to solve the problem of the ball penetrating the cuboid]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=42950#p42950"><![CDATA[
I see.  You have a logic error rather than a question about Euler angles and quaternions.  The good news is: I don't see the fault of the code you posted.  The bad news would be: your bug is somewhere else.   Maybe post your full code up on github?  Good luck.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=11033">drleviathan</a> — Tue Jun 23, 2020 1:33 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[water]]></name></author>
		<updated>2020-06-23T03:42:08+00:00</updated>

		<published>2020-06-23T03:42:08+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=42949#p42949</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=42949#p42949"/>
		<title type="html"><![CDATA[Re: How to solve the problem of the ball penetrating the cuboid]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=42949#p42949"><![CDATA[
I want to change the Euler angle in real time through the keyboard and display it through OpenGL,I put the initialization of the model in InitObjectground();But the model doesn't move when I press the key to change yaw roll <div class="codebox"><p>Code: </p><pre><code>glPushMatrix();glTranslated(float(trans.getOrigin().getX()), float(trans.getOrigin().getY()), float(trans.getOrigin().getZ()));DrawBulletObject();glPopMatrix();</code></pre></div><div class="codebox"><p>Code: </p><pre><code>void MyWindow::initializeGL(){glClearColor(0.0, 0.0, 0.0, 0.0);glEnable(GL_DEPTH_TEST);glShadeModel(GL_SMOOTH);glEnable(GL_AUTO_NORMAL);glEnable(GL_NORMALIZE);InitObject();InitObjectground();}</code></pre></div><div class="codebox"><p>Code: </p><pre><code>void MyWindow::paintGL(){Display();}</code></pre></div><p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=13653">water</a> — Tue Jun 23, 2020 3:42 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[drleviathan]]></name></author>
		<updated>2020-06-22T14:30:17+00:00</updated>

		<published>2020-06-22T14:30:17+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=42946#p42946</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=42946#p42946"/>
		<title type="html"><![CDATA[Re: How to solve the problem of the ball penetrating the cuboid]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=42946#p42946"><![CDATA[
The code looks ok.  What is the error?<br><br>The angles you are using... they are in radians (not degrees) right?<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=11033">drleviathan</a> — Mon Jun 22, 2020 2:30 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[water]]></name></author>
		<updated>2020-06-22T10:24:12+00:00</updated>

		<published>2020-06-22T10:24:12+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=42944#p42944</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=42944#p42944"/>
		<title type="html"><![CDATA[How to solve the problem of the ball penetrating the cuboid]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=42944#p42944"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>btQuaternion quaternion = btQuaternion(yaw,pich,roll);quaternion.setEuler(yaw, pitch, roll);groundTransform.setRotation(quaternion);</code></pre></div>I want to rotate the rigid body by setting the Euler angle, but there is an error. Can you help me to see how to write it?<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=13653">water</a> — Mon Jun 22, 2020 10:24 am</p><hr />
]]></content>
	</entry>
	</feed>
