Search found 4146 matches

by Erwin Coumans
Tue Jan 15, 2019 5:40 pm
Forum: General Bullet Physics Support and Feedback
Topic: C API, how to get body position/orientation by id (URDF)
Replies: 2
Views: 89

Re: C API, how to get body position/orientation by id (URDF)

It is easiest to look into the PyBullet documentation and how it uses the C API in pybullet.c or use/enhance the BulletRobotics C++ wrapper on top of the C API. @mnaveau, this is example code, so you are supposed to copy it into your own project, if you want to use it. See also BulletRobotics target...
by Erwin Coumans
Tue Jan 15, 2019 4:58 pm
Forum: General Bullet Physics Support and Feedback
Topic: why are importers in the examples directory?
Replies: 4
Views: 561

Re: why are importers in the examples directory?

Good point. Python bindings and URDF import is not really part of the core SDK and it has been under heavy development. Our primary users are using Python nowadays, so the Python API is where the focus is at the moment. At some state, I'll move the files into a final 'BulletRobotics' library under '...
by Erwin Coumans
Mon Dec 31, 2018 9:27 pm
Forum: PyBullet Support and Feedback
Topic: How to implement a Continuous Control of a quadruped robot with Deep Reinforcement Learning in Pybullet and OpenAI Gym?
Replies: 1
Views: 338

Re: How to implement a Continuous Control of a quadruped robot with Deep Reinforcement Learning in Pybullet and OpenAI G

Thanks for sharing, that looks pretty cool! You could try to use ARS, augmented random search or alternatively PPO. Implement your environment as a Gym environment, with a reset, step etc. Here is a simple ARS implementation: https://github.com/bulletphysics/bullet3/tree/master/examples/pybullet/gym...
by Erwin Coumans
Fri Dec 21, 2018 3:05 am
Forum: PyBullet Support and Feedback
Topic: Rope for Unity
Replies: 2
Views: 231

Re: Rope for Unity

That code hasn't been exposed through the C-API yet. We may improve soft body support in PyBullet next year.
by Erwin Coumans
Fri Dec 21, 2018 1:34 am
Forum: General Bullet Physics Support and Feedback
Topic: Mass values.
Replies: 3
Views: 149

Re: Mass values.

Haven't seen this before. Can you create a simple repro case and file it in the issue tracker?
by Erwin Coumans
Fri Nov 30, 2018 6:03 pm
Forum: PyBullet Support and Feedback
Topic: generic 6DOF constraint in pyBullet
Replies: 2
Views: 227

Re: generic 6DOF constraint in pyBullet

PyBullet doesn't use constraints by default, it uses btMultiBody primarily. So joints are not represented by constraints internally. then create a constraint that encapsulates those DOFs without having to do collision detection/simulation Why? Can you explain more in detail what you try to do with P...
by Erwin Coumans
Mon Nov 26, 2018 4:56 am
Forum: General Bullet Physics Support and Feedback
Topic: Dynamically skipping collision response.
Replies: 2
Views: 134

Re: Dynamically skipping collision response.

One thing you can try it setting the cp.m_distance1 to a very large value (for exampe BT_LARGE_FLOAT), so it will be skipped by the solver.

The cp.m_appliedImpulse is a return value from the solver, also used in case of warmstarting, so I wouldn't modify that value.
by Erwin Coumans
Sat Nov 24, 2018 2:03 am
Forum: PyBullet Support and Feedback
Topic: Varying the center of mass of an object
Replies: 2
Views: 345

Re: Varying the center of mass of an object

What I've tried so far is to create a multiBody and offset the collisionFramePosition and visualFramePosition to emulate a com that is not at the center of the mesh. However, I'm not sure if that correctly alters the center of mass for simulation or if I just offset frame positions without physical...
by Erwin Coumans
Sat Nov 24, 2018 1:03 am
Forum: General Bullet Physics Support and Feedback
Topic: Generating Contact Constraints.
Replies: 6
Views: 273

Re: Generating Contact Constraints.

>> m_lateralFrictionInitialized does no longer exists. It was replaced by a flag. Try using this instead: contactPoint.m_contactPointFlags |= BT_CONTACT_FLAG_LATERAL_FRICTION_INITIALIZED Also, best to use the gContactProcessedCallback (not added callback, so no need for the CUSTOM MATERIAL flag): gC...
by Erwin Coumans
Fri Nov 23, 2018 11:58 pm
Forum: General Bullet Physics Support and Feedback
Topic: Different types of friction.
Replies: 7
Views: 348

Re: Different types of friction.

The contact added callback is only called if one (or two) of the objects have the btCollisionObject::CF_CUSTOM_MATERIAL_CALLBACK set.
(use body->setCollisionFlags() ( body->getCollisionFlags() | btCollisionObject::CF_CUSTOM_MATERIAL_CALLBACK))

Using only the contact processed callback should work.
by Erwin Coumans
Fri Nov 23, 2018 11:54 pm
Forum: General Bullet Physics Support and Feedback
Topic: Generating Contact Constraints.
Replies: 6
Views: 273

Re: Generating Contact Constraints.

The m_appliedImpulseLaterial1/2 are the applied impulses after the solver is done. You can set cp.m_combinedFriction (scalar) and m_lateralFrictionDir1/m_lateralFrictionDir2 (orthogonal directions, projected in the ground plane). There are also cp.m_contactMotion1, cp.m_frictionCFM etc. cp.m_contact...
by Erwin Coumans
Fri Nov 23, 2018 8:52 pm
Forum: General Bullet Physics Support and Feedback
Topic: Different types of friction.
Replies: 7
Views: 348

Re: Different types of friction.

Bullet computes 2 friction directions, orthogonal to the contact normal. You can override those directions in a contactAddedCallback. By default, Bullet aligns the first friction direction along the projected velocity vector. You can disable this by adding a solver mode 'SOLVER_DISABLE_VELOCITY_DEPE...
by Erwin Coumans
Fri Nov 23, 2018 8:17 pm
Forum: General Bullet Physics Support and Feedback
Topic: Generating Contact Constraints.
Replies: 6
Views: 273

Re: Generating Contact Constraints.

There are a multiple ways, to name a few: one way is to implement your own near callback. By default, Bullet uses void btCollisionDispatcher::defaultNearCallback. There is an API for this: btCollisionDispatcher::setNearCallback Right after the call "collisionPair.m_algorithm->processCollision(&obj0W...
by Erwin Coumans
Wed Nov 21, 2018 6:49 pm
Forum: General Bullet Physics Support and Feedback
Topic: Different types of friction.
Replies: 7
Views: 348

Re: Different types of friction.

Latest Bullet uses an implicit friction cone, clamping against lateral friction coefficient (setFriction). There is still the option to use pyramid friction cone approximation, like ODE. With setAnisotropicFriction you can have different friction coefficients along 2 orthogonal axis, which may help ...
by Erwin Coumans
Mon Nov 19, 2018 9:48 pm
Forum: General Bullet Physics Support and Feedback
Topic: Hinge2 damping
Replies: 5
Views: 266

Re: Hinge2 damping

We need to look into that. Would it be possible to re-create a small demo that shows the problem in the ExampleBrowser, and file a issue in the tracker? See https://github.com/bulletphysics/bullet3/issues (note that this tracker is mostly volunteering work, so it sometimes takes long time before it ...