[ODE] Implementing genuine Coulomb friction

Thomas Harte thomasharte at lycos.co.uk
Sat Dec 21 18:57:02 2002


This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

--=_NextPart_Lycos_0065851040522129_ID
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit

As I have mentioned in the past, ODE's 'pyramid' friction approximation simply isn't good enough for my simulation. I don't know the internals of ODE, but if the efficiency gain it mentions is mostly just saving on sqrts, then my simulation which runs with at most 8 contact constraints which require a genuine 'cone' approach definitely does not need this efficiency gain - even on the (virtually steam driven) P200 I still use for development. Therefore, I would like to see the option of using a genuine friction cone incorporated into ODE.

In the meantime however, I have tried working around this by implementing my own frictional force, and leaving ODE just to worry about preventing interpentration. Unfortunately I cannot find a brilliant solution to the problem of getting a good reading for R in terms of F <= mu*R. So far, what I have done is download the latest CVS version and add a feedback buffer to each contact constraint. In this way I can reference its f1 and f2 members to get R during the last time step, and then assume that it has not changed for the current time step.

However, this is not brilliant for situations involving bodies where load changes dynamically - which is exactly the situations I am interested in. Therefore, I am wondering firstly whether anyone can think of a better way to calculate R using just the well defined ODE functions? What I want to be able to do is somehow get the total forces that will act on the body due to whatever non-contact joints it is attached to for the next time step. Does dBodyGetForce return the result allowing for joints, or are those added to the force accumulator only after a call to dWorldStep?

If not, is there some way of working more closely with the internals of ODE to achieve what I want? Something like dWorldStepAsMuchAsIsRequiredToFillFeedbacks would be useful, although I accept that doing so would be little short of a normal step for all islands with any feedback buffers attached. In which case, as I am almost certain that all my islands will have such feedback structs attached, is there any significant saving that I could get from playing with ODE internals over just doing a dWorldStep to fill the feedbacks, then manualy restoring the old state, fixing up the frictional forces and stepping 'for real'? If not, then can I really really emphasise how much I'd like to see 'true' friction implemented into ODE?

Also, if there is a way in the latter case, should I have any sort of confidence that either my working with the internals of ODE will not break when a later version comes out, or even better, that it is unlikely that a later version will break whatever I end up doing without additionally implementing a correct means to a full cone based implementation of friction?

Best possibility of all, does anyone have some plug in code that I can just pass my dContact struct to, which will calculate the 'correct' friction?

-Thomas

When words aren't enough - Vodafone live! A new world of colour, sounds, picture messages and information on your mobile. <a href="http://ad.doubleclick.net/clk;4909903;7724245;q?http://www.vodafone.co.uk/live">
Click here</a> to find out more.


--=_NextPart_Lycos_0065851040522129_ID--