Search found 4221 matches

by Erwin Coumans
Wed Mar 11, 2020 11:56 pm
Forum: PyBullet Support and Feedback
Topic: Documents for creating environments for grasping
Replies: 1
Views: 6792

Re: Documents for creating environments for grasping

First, you need to learn how to create an OpenAI Gym environment with PyBullet: https://medium.com/@gerardmaggiolino/creating-openai-gym-environments-with-pybullet-part-1-13895a622b24 then you should investigate how this script works: https://github.com/bulletphysics/bullet3/blob/master/examples/pyb...
by Erwin Coumans
Tue Mar 10, 2020 4:05 am
Forum: PyBullet Support and Feedback
Topic: Maximum number of multibody links?
Replies: 2
Views: 7754

Re: Maximum number of multibody links?

There is currently a maximum of 128 links (see MAX_DEGREE_OF_FREEDOM)
The intention was for typical robots, which usually have only tens of links.
by Erwin Coumans
Fri Dec 20, 2019 12:12 am
Forum: PyBullet Support and Feedback
Topic: JOINT_PLANAR/SPHERICAL problem
Replies: 2
Views: 8005

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: 7439

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: 11046

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: 11806

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: 14543

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: 7490

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: 12507

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: 6720

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: 7127

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: 2
Views: 10327

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: 6416

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: 7599

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: 13759

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...