What's going on here? (video)

User avatar
ejtttje
Posts: 96
Joined: Mon Nov 03, 2008 9:57 pm

What's going on here? (video)

Post by ejtttje »

This is a simulation I'm working on. The robot has spinning cylinders on the bottom, pushes it and the box along:

http://dl.dropbox.com/u/18503686/JumpySim.mp4

But at various points it looks like the box 'jams' on the ground, makes things occasionally jump. Halfway through the video, it looks like the box is stuck on the push bar and gets pulled sideways unrealistically.

So something about contact constraints not being managed I guess, any thoughts on what parameters are relevant to look to fix this? I'm using a physics time resolution of 200 Hz (doesn't seem to help to raise higher, if anything might get worse), and the tweaks Erwin helped me with last month to set 4 contact points on the ground plane to prevent boxes from jittering around on their own. Otherwise it's the standard settings. Thanks!
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Re: What's going on here? (video)

Post by Erwin Coumans »

It could be anything, for example:

1) are you using non-default collision margins?
2) the penetration recovery seems aggressive, are you using non-standard solver settings?
3) can you try enabling split impulse and using the latest svn trunk version of Bullet?
4) is the floor a btStaticPlaneShape or a btBvhTriangleMeshShape? If it is a mesh, it might be internal triangle edges

there are many more possibilities, only a good reproduction case in a Bullet demo lets us investigate the issue.
Thanks!
Erwin
User avatar
ejtttje
Posts: 96
Joined: Mon Nov 03, 2008 9:57 pm

Re: What's going on here? (video)

Post by ejtttje »

Sorry, I was getting tired last night and sloppy with the details. For one, I forgot I had also raised the erp, setting that back to default 0.2 seems to make it the most impact here (not entirely fixed though). Experimenting with other parameters since then, the wheel mass was 0.1 and the body mass was 1.5, with the box a mass of 1. Increasing the wheel mass to 0.25 seems to have it running smoothly now.

I tried split impulse from svn (before the wheel mass adjustment), it seemed to help a little, but it's not an obvious effect for this issue.

If you don't mind, two questions to really nail this down, maybe I won't need to write a full demo test case :)

1. Could you do a quick sanity-check my collision margins? I'm not sure I got the 'right' idea from when we were banging on the small-size stability stuff:
Everything on the body of the robot is in a btCompoundShape. From reading the compound shape code, it looked like compounds return a bounding box which include the component's margins, so the compound doesn't need a margin of its own?
So the compound itself has 0 margin, but the boxes therein have a margin of 0.001. The push bars are 0.01 thick, 0.33 wide, and .06 tall. The box is 0.1 per side with a margin of 0.001. The ground is a btStaticPlaneShape, with a margin of 0 (demo code seems to use a margin of 0 on static shapes? Or just planes?)

2. I'm still seeing an issue when the robot backs up, sometimes it pulls the box backward with it for a few steps. I'm wondering if something like gContactBreakingThreshold should be adjusted for the object sizes I'm using?

Just for reference, the rest of the settings in the video were:
collisionConfiguration->setConvexConvexMultipointIterations(4,4);
collisionConfiguration->setPlaneConvexMultipointIterations(); //implied 3,3
dynamicsWorld->getSolverInfo().m_erp=0.35;
dynamicsWorld->getSolverInfo().m_numIterations=250;
The friction on the wheel bodies is 100
Robot chassis mass 1.5, wheels 0.1, box 1.0

Thanks!