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

	<title>Real-Time Physics Simulation Forum</title>
	
	<link href="https://pybullet.org/Bullet/phpBB3/index.php" />
	<updated>2021-02-20T23:30:22+00:00</updated>

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

		<entry>
		<author><name><![CDATA[8Observer8]]></name></author>
		<updated>2021-02-20T23:30:22+00:00</updated>

		<published>2021-02-20T23:30:22+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43324#p43324</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43324#p43324"/>
		<title type="html"><![CDATA[Re: How to run the &quot;Hello World&quot; PyBullet example]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43324#p43324"><![CDATA[
I tried to use PyBullet but it is very complicated and I cannot understand haw to use it with OpenGL. The Panda3D Bullet wrapper is only one way that I found. And there is a very great manual: <a href="https://docs.panda3d.org/1.10/python/programming/physics/bullet/index" class="postlink">https://docs.panda3d.org/1.10/python/pr ... llet/index</a> I hope I will not have unresolved problems with using the Panda3D Bullet wrapper with Qt and OpenGL.<br><br>I use:<br><ul><li>the Panda3D Bullet wrapper for Physics</li><li>PyQt5 (and PySide2) for creating a window</li><li>OpenGL 3.3 for rendering</li></ul>I created a textured cube with Blender and GIMP. I exported the cube to dae (COLLADA) and imported it to my program with built-in Qt XML parser.<br><br>Source:<ul><li>PyQt6: <a href="https://github.com/8Observer8/falling-collada-cube-bullet-physics-opengl33-pyqt6" class="postlink">https://github.com/8Observer8/falling-c ... gl33-pyqt6</a></li><li>PySide6: <a href="https://github.com/8Observer8/falling-collada-cube-bullet-physics-opengl33-pyside6" class="postlink">https://github.com/8Observer8/falling-c ... 33-pyside6</a></li></ul><div class="inline-attachment"><dl class="file"><dt class="attach-image"><img src="https://pybullet.org/Bullet/phpBB3/download/file.php?id=1865" class="postimage" alt="textured_cubes_bullet_pyqt5.gif" onclick="viewableArea(this);" /></dt></dl></div><p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=11017">8Observer8</a> — Sat Feb 20, 2021 11:30 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[8Observer8]]></name></author>
		<updated>2021-02-20T18:17:28+00:00</updated>

		<published>2021-02-20T18:17:28+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43323#p43323</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43323#p43323"/>
		<title type="html"><![CDATA[Re: How to run the &quot;Hello World&quot; PyBullet example]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43323#p43323"><![CDATA[
I found a solution. It is possible to use Python wrapper of Panda3D with my custom render in OpenGL.<br><br>To install Panda3D you need to write: <blockquote class="uncited"><div>pip install Panda3D</div></blockquote>main.py<br><div class="codebox"><p>Code: </p><pre><code>from panda3d.bullet import BulletWorldfrom panda3d.core import TransformState, Vec3, Quat, Point3from panda3d.bullet import BulletBoxShapefrom panda3d.bullet import BulletRigidBodyNodeworld = BulletWorld()world.setGravity(Vec3(0, 0, -9.81))shape = BulletBoxShape(Vec3(0.5, 0.5, 0.5))node = BulletRigidBodyNode('Box')node.setMass(1.0)p = Point3(1, 0, 0)q = Quat.identQuat()s = Vec3(2, 2, 2)transform = TransformState.make_pos_quat_scale(p, q, s)node.setTransform(transform)node.addShape(shape)world.attachRigidBody(node)for i in range(10):    world.doPhysics(0.016)    print(node.getTransform())</code></pre></div>Output:<br><blockquote class="uncited"><div>T:(pos 1 0 0 scale 2)<br>T:(pos 1 0 -0.002507 scale 2)<br>T:(pos 1 0 -0.007521 scale 2)<br>T:(pos 1 0 -0.015042 scale 2)<br>T:(pos 1 0 -0.02507 scale 2)<br>T:(pos 1 0 -0.037605 scale 2)<br>T:(pos 1 0 -0.052647 scale 2)<br>T:(pos 1 0 -0.070196 scale 2)<br>T:(pos 1 0 -0.090252 scale 2)<br>T:(pos 1 0 -0.112815 scale 2)</div></blockquote><p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=11017">8Observer8</a> — Sat Feb 20, 2021 6:17 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[8Observer8]]></name></author>
		<updated>2021-01-28T14:20:26+00:00</updated>

		<published>2021-01-28T14:20:26+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43280#p43280</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43280#p43280"/>
		<title type="html"><![CDATA[Re: How to run the &quot;Hello World&quot; PyBullet example]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43280#p43280"><![CDATA[
Please, write that it is impossible.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=11017">8Observer8</a> — Thu Jan 28, 2021 2:20 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[8Observer8]]></name></author>
		<updated>2021-01-28T04:03:58+00:00</updated>

		<published>2021-01-28T04:03:58+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43278#p43278</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43278#p43278"/>
		<title type="html"><![CDATA[Re: How to run the &quot;Hello World&quot; PyBullet example]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43278#p43278"><![CDATA[
I use Bullet from C++. Could I use C++ Bullet library from Python without PyBullet? I really do not understand how to rewrite C++ code with OpenGL to PyBullet and OpenGL.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=11017">8Observer8</a> — Thu Jan 28, 2021 4:03 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[8Observer8]]></name></author>
		<updated>2021-01-28T03:40:39+00:00</updated>

		<published>2021-01-28T03:40:39+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43277#p43277</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43277#p43277"/>
		<title type="html"><![CDATA[Re: How to run the &quot;Hello World&quot; PyBullet example]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43277#p43277"><![CDATA[
What version of PyBullet I must install to run the example above?<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=11017">8Observer8</a> — Thu Jan 28, 2021 3:40 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[8Observer8]]></name></author>
		<updated>2021-01-15T18:38:41+00:00</updated>

		<published>2021-01-15T18:38:41+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43254#p43254</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43254#p43254"/>
		<title type="html"><![CDATA[How to run the &quot;Hello World&quot; PyBullet example]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43254#p43254"><![CDATA[
I try to run the first official example: <a href="https://github.com/dgym/pybullet/blob/master/demos/helloworld.py" class="postlink">https://github.com/dgym/pybullet/blob/m ... loworld.py</a><br><br>I installed PyBullet like this:<div class="codebox"><p>Code: </p><pre><code>pip install pybullet</code></pre></div>When I try to run the example I get this error message:<br><div class="codebox"><p>Code: </p><pre><code>Traceback (most recent call last):File "main.py", line 1, in &lt;module&gt;from bullet.bullet import (ModuleNotFoundError: No module named 'bullet'</code></pre></div>I think it is because the example is old (Mar 31, 2012) and PyBullet was updated. The module name is "pybullet". I renamed import like this:<br><div class="codebox"><p>Code: </p><pre><code>from pybullet import (    Vector3, Transform,    BoxShape,    DefaultMotionState,    RigidBody,    DiscreteDynamicsWorld)</code></pre></div>I have this error message:<br><div class="codebox"><p>Code: </p><pre><code>pybullet build time: Nov  3 2020 18:27:37Traceback (most recent call last):File "main.py", line 1, in &lt;module&gt;from pybullet import (ImportError: cannot import name 'Vector3' from 'pybullet'(C:\Users\8Observer8\AppData\Roaming\Python\Python37\site-packages\pybullet.cp37-win32.pyd)</code></pre></div>Could you copy the official example above and try it you your machine? How I should to change the example to run it? I want to use PyBullet with OpenGL and PyQt5. I want to have GUI and 3D graphics with Physics in one window. Please, help me to run the simple PyBullet example above.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=11017">8Observer8</a> — Fri Jan 15, 2021 6:38 pm</p><hr />
]]></content>
	</entry>
	</feed>
