PhysX 3.3 vehicle problem

Hi

I am using PhysX vehicle with a large triangle mesh representing my terrain.
After upgrading my code to use PhysX 3.3 I have encountered a weird problem - when i init the vehicle position (using setGlobalPose) to a point located far from the center (for example (10000,10000)) and apply acceleration, the wheels are spinning, the RPM rises but the vehicle doesn’t move.
I have checked the probable causes listed in the troubleshooting section but i haven’t found anything wrong.
I also tried taking a piece from the remote location and transforming it to (0,0) and then the vehicle drives properly

Any idea will be welcomed
Thanks in advance,
Judit

Hi,

The first step is to determine if the suspension raycasts are returning the correct results at (10000,10000). Can you please take a look at PxWheelQueryResult::isInAir ? If this has value true then the suspension raycasts are failing to hit the mesh.

If PxWheelQueryResult::isInAir is false then please look at PxWheelQueryResult::tireFriction. If this is a very small value then the car will be unable to generate any acceleration.

The structure PxWheelQueryResult stores quite a lot of useful data for diagnosing this kind of problem. It’s worthwhile checking the value of each member variable to make sure that they match expectations eg is the normal correct.

Thanks,

Gordon

Hi

I have similar problem as @judyland. What could be wrong if isInAir() returns true and raycast returns one hit? When car is in the air, isInAir() returns true and there are no hits, so raycast works ok.
I am using PhysX 3.2.1
Thanks

Hello,

I’m afraid I don’t completely understand the problem. Could you please provide more details?

Thanks,

Gordon

Hi,
I’ll try to explain it better.

First case: Car created in the air.

PxVehicleDrive4W::isInAir() returns true (ok)
PxRaycastQueryResult::nbHits returns 0 (ok)

Second case: Car hit the ground.

PxVehicleDrive4W::isInAir() returns true (fail)
PxRaycastQueryResult::nbHits returns 1 (ok - ray hit mesh)

Problem is PxVehicleDrive4W::isInAir() returns all the time true, wheels are spinning but car is not moving.

Thanks

Thanks for the info.

I’m trying to put a repro together but I still need a couple of bits of information.

What kind of shape is the landscape under the car eg a heightfield or a triangle mesh?

Are you also at a coordinate far from the origin eg (10000,10000)?

Thanks,

Gordon

Hello,

Under the car is triangle mesh, simple box with (10, 0.2, 10) size.

No, sorry i did not tell you that. Car is created in (0, 8 ,0) and box in (0,1,0).

Thanks for your patience.

This sounds like quite a different problem. The original problem was that the car could drive near the origin but not far the origin. In your case the car never seems to drive even near the origin.

One thing to check is if your car is in neutral gear. From your description it could be that your car is in neutral.

Thanks,

Gordon

Hi,
I have a similar problem but with a much smaller terrain (200x200). I simulated a tank using physx and when it drives fast (actually not that fast, just 15-20 km/h) and it performs a rotation than such that it slips sidewards it may not stop slipping → it seems as it is slipping on ice at a constant speed. It is possible to rotate but the slipping direction stays the same. Usually, trying to drive in the opposite slipping direction does not slow down the slipping. Sometimes I have managed to get it to stop but then it is only possible to drive along one axis and if you try to drive into another direction it slips sidewards as if it drives agains an obstacle but in the pvd there is also no obstacle visible.
It becomes worse when the farther the tank is away from the origin. To closer it comes to the edge of the static triangle mesh representing the ground the less speed and rotation is required to make it slipping such that is is not possible to stop it anymore.
In contrast, close to the origin, the vehicle behavior is as it should be.

I hope sb. can help me.

Thanks.

Hi,

This sounds like the friction is decreasing as you move further from the origin. Can you please take a look at the friction values experienced by the tank tires?

Thanks,

Gordon

Hi,
I checked it again, but the friction stays constant at 0.7 for both sides taken from

out_left_track_friction.Publish(result.wheelQueryResults[physx::PxVehicleDriveTankWheelOrder::eFRONT_LEFT].tireFriction);

and

out_right_track_friction.Publish(result.wheelQueryResults[physx::PxVehicleDriveTankWheelOrder::eFRONT_RIGHT].tireFriction);

Thanks.

I’m not sure yet what is going on but I’ll see if I can work out the root of the problem.

Thanks,

Gordon

If you would like I can provide my code and a short clip showing this strange behavior.

Thanks,

Thorsten

Hi Thorsten,

Thanks for your help. I tried to repro this with the data you sent me but I’m unable to repro the bug in my test suite. I sent you a pm with more details.

Thanks,

Gordon

Hi,

I think I found the problem concerning the sliding vehicle. Our framework is partially compiled without the -malign-double flag which makes it incompatible with the sdk but the compiler doesn’t mention anything when linking those object files. This led to a very short time step (1ms) among other side effects. I changed the sdk makefiles by removing the flag and now it works on a 32-Bit Ubuntu. I also tested it on a 64-Bit Ubuntu system and there it works out of the box since -malign-double is activated by default for the 64-Bit gcc compiler.

Thanks,

Thorsten

I am with the same problem that Rogus.

The vehicle stay on same position and yours wheels runs.

Problem is PxVehicleDrive4W::isInAir() returns all the time true, wheels are spinning but car is not moving.

I use a plane below vehicle and I follow the SnippetVehicle4W.

WheelQueryResults always with inAir true.

Please, how do I fix this?

I fix this! :)

The collision group of Wheels can’t collides with ground! The chassi must be collides with ground.