Search found 4189 matches

by Erwin Coumans
Fri Dec 20, 2019 12:12 am
Forum: PyBullet Support and Feedback
Topic: JOINT_PLANAR/SPHERICAL problem
Replies: 2
Views: 609

Re: JOINT_PLANAR/SPHERICAL problem

We only tested spherical joints in deep_mimic through URDF, not programmatically. Have you tried that? Here is a patch that enables spherical joint creation through the API (instead of URDF): https://github.com/bulletphysics/bullet3/pull/2551 Attached is an example that works after applying this pat...
by Erwin Coumans
Fri Dec 20, 2019 12:08 am
Forum: PyBullet Support and Feedback
Topic: Inaccurate RayTest in Pybullet
Replies: 2
Views: 349

Re: Inaccurate RayTest in Pybullet

Yes, by default we use convex hulls. Best to create a convex decomposition for moving objects (using VHACD, there are utils from obj -> vhacd). See this example: https://github.com/bulletphysics/bullet3/blob/master/data/teddy_vhacd.urdf For concave static trangle meshes, you can mark them as 'concav...
by Erwin Coumans
Mon Dec 09, 2019 5:32 pm
Forum: General Bullet Physics Support and Feedback
Topic: curved trajectory(rolling Friction) fix for bullet in unity
Replies: 6
Views: 501

Re: curved trajectory(rolling Friction) fix for bullet in unity

Good point, I will create a 2.89 release soon (in October was just a file change, not a real 'tag')
by Erwin Coumans
Fri Nov 22, 2019 4:56 am
Forum: General Bullet Physics Support and Feedback
Topic: Maximum angular velocity
Replies: 5
Views: 1759

Re: Maximum angular velocity

>> I know how to shift CoM before the simulation starts with createMultibody, but how to do it during the simulation I recommend to create an additional link (without visual shape, but with some collision shape) along a slider joint, and move that link. You can change the mass of that link using pyb...
by Erwin Coumans
Wed Nov 20, 2019 5:56 pm
Forum: General Bullet Physics Support and Feedback
Topic: Collision detection failed for Ellipsoid shapes
Replies: 7
Views: 807

Re: Collision detection failed for Ellipsoid shapes

drleviathan makes good points.

Aside from that, you could provide a full working small example (single c++ file, no dependencies other than Bullet) and file an issue here:
https://github.com/bulletphysics/bullet3
it accepts zip file attachments, or just add the code inline.
by Erwin Coumans
Thu Oct 24, 2019 1:58 am
Forum: PyBullet Support and Feedback
Topic: What's the best way to pin a rigid body to another rigid body?
Replies: 1
Views: 772

Re: What's the best way to pin a rigid body to another rigid body?

The best way is to create a new URDF and attach them as a fixed joint. You can use the URDF editor to do this. See this example how to combine a car and a kuka: https://github.com/bulletphysics/bullet3/blob/master/examples/pybullet/gym/pybullet_utils/examples/combineUrdf.py Alternatively, you get so...
by Erwin Coumans
Thu Oct 24, 2019 1:56 am
Forum: PyBullet Support and Feedback
Topic: How to convert rotation matrix to quaternion in PyBullet
Replies: 2
Views: 882

Re: How to convert rotation matrix to quaternion in PyBullet

Only Euler <-> Quaternion conversions are exposed in PyBullet, not the Matrix <-> Quaternion yet.
by Erwin Coumans
Thu Oct 24, 2019 1:55 am
Forum: PyBullet Support and Feedback
Topic: Segment-wise collision detection
Replies: 1
Views: 523

Re: Segment-wise collision detection

You could use getClosestPoints to get a better conservative answer how far you can safely move, and then use bigger steps along your trajectory.
by Erwin Coumans
Thu Oct 24, 2019 1:53 am
Forum: PyBullet Support and Feedback
Topic: The difference between setJointMotorControl2 and resetJointState
Replies: 1
Views: 472

Re: The difference between setJointMotorControl2 and resetJointState

reset* functions teleport the robot into some state, ignoring all dynamics. setJointMotorControl2 will set some targets and let the simulation try to achieve those, so they obey the laws of physics. The examples may use one or the other. It is best to never use reset* functions while simulating, onl...
by Erwin Coumans
Thu Sep 05, 2019 2:35 pm
Forum: PyBullet Support and Feedback
Topic: Dynamically attached fixed joint is not fix
Replies: 1
Views: 701

Re: Dynamically attached fixed joint is not fix

Mouse forces are very strong and possibly stronger than the fixed joint constraint forces. It is better to attach a fixed joint as part of the urdf instead of using a constraint.
by Erwin Coumans
Thu Sep 05, 2019 2:34 pm
Forum: General Bullet Physics Support and Feedback
Topic: Chain of constraints is very unstable if masses differ
Replies: 2
Views: 758

Re: Chain of constraints is very unstable if masses differ

You can use btMultiBody instead, together with some velocity motors to model joint friction/damping. It is easiest to prototype this directly in PyBullet first, see its quickstart guide . For btRigidBody, using a smaller time step would help more than increasing the number of iterations, but btMulti...
by Erwin Coumans
Sat Aug 24, 2019 12:26 am
Forum: PyBullet Support and Feedback
Topic: Connecting pybullet to a C++ Bullet Physics instance?
Replies: 1
Views: 703

Re: Connecting pybullet to a C++ Bullet Physics instance?

Yes, you can create a PyBullet server and client and also connect to this from a C++ client using the C-API, which is pretty much identical to the PyBullet API (PyBullet uses this same C API). The API header file is here: https://github.com/bulletphysics/bullet3/blob/master/examples/SharedMemory/Phy...
by Erwin Coumans
Sat Aug 24, 2019 12:23 am
Forum: General Bullet Physics Support and Feedback
Topic: Create bullet shape from .obj mesh
Replies: 5
Views: 4460

Re: Create bullet shape from .obj mesh

PyBullet has some examples that create a mesh (convex or concave) from an .obj file or from vertices in memory. See https://github.com/bulletphysics/bullet3/blob/master/examples/pybullet/examples/createMesh.py https://github.com/bulletphysics/bullet3/blob/master/examples/pybullet/examples/createText...
by Erwin Coumans
Sat Aug 24, 2019 12:21 am
Forum: General Bullet Physics Support and Feedback
Topic: Pybullet Deterministic Simulation
Replies: 2
Views: 892

Re: Pybullet Deterministic Simulation

PyBullet is fully 100% deterministic after calling resetSimulation and adding the objects in the same order. Many of our reinforcement learning environments rely on this. In fact, there are unit tests that show that PyBullet is also fully deterministic after a save/restoreState call, not just resetS...
by Erwin Coumans
Wed Aug 07, 2019 8:11 pm
Forum: General Bullet Physics Support and Feedback
Topic: Bullet on colab
Replies: 2
Views: 824

Re: Bullet on colab

OpenGL isn't available from within a colab/browser. You can still use getCameraImage to render images, using the software renderer. (TinyRenderer)