I was playing with modifying the examples.
I made a very simple script by modifying the collision example. I just have a cube and it is always vibrating. Why is this happening? Is this the expected behavior? How can I make it stop vibrating:
import pybullet as p
p.connect(p.GUI)
p.loadURDF("plane.urdf")
cubeId = p.loadURDF("cube_small.urdf",0,0,10)
p.setGravity(0,0,-10)
p.setRealTimeSimulation(0)
cid = p.createConstraint(cubeId,-1,-1,-1,p.JOINT_FIXED,[0,0,0],[0,0,0],[0,0,0])
while 1:
p.stepSimulation()
here is a video showing the problem: https://cl.ly/2j1U202L1j1k
vibrating object? is this expected behaviour?
-
- Posts: 8
- Joined: Sat Aug 26, 2017 2:04 am
-
- Posts: 8
- Joined: Sat Aug 26, 2017 2:04 am
Re: vibrating object? is this expected behaviour?
and those urdfs are the ones included with pybullet.
-
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
Re: vibrating object? is this expected behaviour?
You constraint to move the cube to [0,0,0] conflicts with the contact constraints between cube and plane, which is also at [0,0,0].
Either change the constraint or move the plane down, for example
Either change the constraint or move the plane down, for example
Code: Select all
import pybullet as p
p.connect(p.GUI)
p.loadURDF("plane.urdf",[0,0,-0.2]
)
cubeId = p.loadURDF("cube_small.urdf",0,0,10)
p.setGravity(0,0,-10)
p.setRealTimeSimulation(0)
cid = p.createConstraint(cubeId,-1,-1,-1,p.JOINT_FIXED,[0,0,0],[0,0,-0.2],[0,0,0])
while 1:
p.stepSimulation()