Physics Simulation Forum

 

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Sun May 13, 2012 1:11 am 
Offline

Joined: Thu May 10, 2012 4:51 am
Posts: 3
Location: sfbay
I have a sphere slowly rolling on a trimesh floor. At 60hz, it's a pretty bumpy ride... btGenerateInternalEdgeInfo is supposed to fix this, but I don't see any difference. I've verified that my custom combiner callback is called and it seems to go through the right code path inside btAdjustInternalEdgeContacts.

- The sphere has a radius of ~0.2 and the triangles have sides between 0.3 and 1.3. I tried scaling everything by 5, but it made no difference.

- I tried adjusting the btTriangleInfoMap fields and didn't see any improvement, but I'm not sure I fully understand what each does and what reasonable values are.

- I tried enabling BT_INTERNAL_EDGE_DEBUG_DRAW, rebuilding bullet, and setting btSetDebugDrawer. I can see normals going from the trimesh+sphere contact and up, and normals rotating along with the sphere when it rolls over edges, but I'm not sure how this tells me if the internal edge utility is working or not. I looked at the internal edge demo and its visualization seems to contain lines along the floor that mine does not. I modified the internal edge demo to skip btGenerateInternalEdgeInfo and the visualization went away, but I couldn't tell if it made any difference to the behavior of the demo.

Is there anything else I can do to debug and understand what's going on here?

I've attached a serialized world.bullet, in case it contains anything useful.


Attachments:
world.bullet.zip [99.69 KiB]
Downloaded 55 times
Top
 Profile  
 
PostPosted: Fri Apr 05, 2013 10:28 pm 
Offline

Joined: Tue Dec 29, 2009 12:48 am
Posts: 21
Reviving this thread because i'm getting the same problem as you. I have a test case set up for debugging this at https://github.com/jazztickets/btest

Like you, i have the internal edge utility set up and it appears to be working (i.e. m_normalWorldOnB is getting corrected). However, when the friction constraints get resolved there's an impulse that gets applied that is not colinear with m_normalWorldOnB. Obviously Erwin can speak on this matter better than anyone, so i'm going to issue a bug report with all the data i've collected.

I tracked it down to be m_tmpSolverBodyPool.m_data[1].m_deltaLinearVelocity.m_floats[0] inside btSequentialImpulseConstraintSolver.cpp that influences the sphere.

The only the thing that i found that solves the internal edge problem is using a very small time step (500 to 1000 hz).

EDIT:
Video of bug: http://www.youtube.com/watch?v=71jd0g6PsdE


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group