Contact friction issues with a rolling wheel

Hi everyone,

(Apologies for the long post - still learning to be thorough yet concise!)

I'm trying to model the behaviour of a four wheel drive, skid steering vehicle that (amongst other things) has to climb small stairs. The height of each step is about 1/5 the diameter of the wheels (modeled as cylinders) and the center of gravity of the system is such that the vehicle should be easily stable at all times when climbing the stairs, even with the necessary wheel torque.

If I drive the vehicle at the slightest angle at the stairs, everything is fine - the front wheels go up and (as long as I steer so the vehicle doesn't straighten up) the back wheels go up and it's all happy.

However, if I drive the vehicle dead straight at the stairs, the moment the rear wheels hit the first step, they lock into the step and the torque causes the vehicle to flip backwards.

This problem resembles but it is slightly different (and besides, looking at com.jmex.physics.impl.ode.OdePhysicsSpace.iterateContacts( boolean applyContacts ), the solution of setting the dContactApprox1 flag is done by default).

In my case there are two differences that I think are causing the problem. Firstly, the wheel is rolling into a step rather than a smooth slope so one pair of contacts (the wheel is a cylinder so it would have contacts at each end … I think …) is with the floor and the other pair is with the sharp edge of the box rather than a smooth surface. The second is that the wheel is being actively driven. This means that in order to roll over the step, the wheel must pivot about the contact with the sharp edge, which means that the floor contact must move backwards by the slightest amount to allow the wheel to lift off, otherwise the wheel locks. The fix above doesn't work because the driving torque means both sets of contacts have non-zero normal force. Playing with mu also doesn't make much difference (unless I lower it so low that both sets of contacts slip) - for my base case I've got rubber wheels and wooden terrain.

The front wheels were OK because there wasn't as much force pushing down on them and the rear wheels (which were still on the ground) provided enough forward motion to cause the front wheels to pivot about the contact point with the step, thus breaking contact with the ground. I'm also guessing this works at a slight angle because now instead of pairs of contact points, there is only one contact point each and the extra 'wiggle room' means that the floor contact breaks at the right time.

I've been mulling over all sorts of "hacks" that might solve this problem (they all involve something like trying to detect if the wheel has both a floor contact as well as a step contact and if so allowing the floor contact to scrub backwards for a single cycle so that the wheel has a chance of pivoting about the step contact and lifting off the floor) but I was wondering if anyone else had encountered this problem already and could perhaps suggest a more elegant fix.


  • Psinewave