[ODE] Mass and trimesh collisions (Bug in soft contacts?)

Patrick McColgan patrick at torcinteractive.com
Tue Jan 25 15:01:01 MST 2005

Well I've kind of sorted the problem; since I began looking at ODE I had 
been using a collision callback routine I had taken from some of the 
samples so each contact was defined as:

        contact_points[i].surface.mode = dContactBounce | dContactSoftCFM;
        contact_points[i].surface.mu = dInfinity;
        contact_points[i].surface.mu2 = 0;
        contact_points[i].surface.bounce = 0.1;
        contact_points[i].surface.bounce_vel = 0.1;
        contact_points[i].surface.soft_cfm = 0.01;

I never had any great need to change it as it was always clear the 
collisions and response were working as I expected and I wasn't at the 
stage where I was looking to tweak them however in light of the issues I 
was having I thought these could be the only real damping factors 
preventing the simulation from supplying strong enough forces on the 
body so I altered my contacts to these hard types:

        contact_points[i].surface.mode = 0;
        contact_points[i].surface.mu = dInfinity;

This has corrected things, the avatar will now bounce back from every 
collision and can't be pushed through.

I'm just happy to have something that works for now and will go on to 
tweak the contacts when ready.  However it is still surely a bug that 
using softer contacts can lead to objects moving through meshes.

Patrick McColgan wrote:

> Thanks for the replies, no success yet though.
> I increased the quickstep solver iterations from the default 20 to 
> 1000 and it appeared to make no significant difference, I also reduced 
> the CFM from the already tiny default of 1e-10 to 0.0 and again saw no 
> great changes.  As I said before setting the ERP to 1.0 prevents full 
> penetrations on walls but not when the body falls, the body will hit a 
> surface falling with a greater velocity.  I don't particularily want 
> to have the ERP full anyway.
> Megan, the level is indeed a trimesh and my maximum contacts has 
> always been four.  When the body collides with walls it generates 2 
> contact points generally and when it fall on the ground it makes 4 so 
> I did increase the number and check but I don't really see it as an 
> issue just now, perhaps in the future.
> As far as I can see the simulation just can't compensate for the 
> momentum of the body, I'm not sure if I have any say in that at set up 
> but what I'm looking at now is the dependancy on mass and velocity to 
> generate contact forces.
> Any ideas and advice are appreciated.
> Gerritt Brownlee wrote:
>> Did you try lowering the CFM?  Or using more iterations per frame, 
>> which is different from step size. for example with quickstep:
>>   dWorldSetQuickStepNumIterations (world, 15);
>>   dWorldQuickStep (world,0.04);
>> >Hello
>> > >I've been working with ODE to implement a character controller, it 
>> >has progressed well however I had been using a cyclinder with a 
>> >total mass of 5 units and when I changed the total mass to a more 
>> >realistic 80 I found that the avatar (moving at around 2.5 units per 
>> >second) started to move through walls and when falling would fall 
>> >through floors. > >The collisions do register, they do apply a force 
>> in the right >direction which slows the avatar but as I have been 
>> stepping through >the program it appears that it just isn't scaling 
>> the force enough >despite apparently using the mass and inverse mass 
>> in calculations.   >Using the joint feedback function I get a force 
>> of about 528 units >twice and I think I need a force of around 12, 
>> 000. > >Has anyone else experienced this, or is this a known issue?  
>> I had a >look in the archive but there is very little on it, more 
>> seems to be >on mass ratios problem between two bodies.  Is there a 
>> limiting >parameter with regards to mass in collisions? > >Setting 
>> the ERP to one helped on walls but not floors and the >program is 
>> stepped at about 1/60 hz although I did try it at 1/100 >but it made 
>> no difference. > >Thanks 
>> >_______________________________________________ >ODE mailing list 
>> >ODE at q12.org >http://q12.org/mailman/listinfo/ode
>> ------------------------------------------------------------------------
>> _______________________________________________
>> ODE mailing list
>> ODE at q12.org
>> http://q12.org/mailman/listinfo/ode
> _______________________________________________
> ODE mailing list
> ODE at q12.org
> http://q12.org/mailman/listinfo/ode

More information about the ODE mailing list