Community Forum
ANVEL Licensing Options

Changing Surface Friction Characteristics

  • Is there an easy way to quickly change the surface friction parameters for the existing terrain object through the API?

    I'm having an issue getting the VehicleAPIController to work when I try and edit the surface type in the .env file. The vehicle has traction when I control it with the keyboard but when I try to use the API, the tires just spin in place. However, If i use a default environment like LargeParkingLot, the car drives fine through the API. I really need a quick way to modify the surface friction values and keep the API control working.

  • @rjb0026,

    Thanks for your question! If you are using the default ODE VTI, you should be able to accomplish changing the surface friction with the following External API code (in Python).

    #set ODE soil parameters
    ODEsurfaceSand = ANVEL.GetObjectDescriptorByTypeAndName("ODESurfaceProperties", "Sand (Dry)")
    ANVEL.SetProperties(ODEsurfaceSand.objectKey, {"Friction":"0.55",               #longitudinal friction
    					     "Friction2":"0.85",              #lateral friction
    					     "Rolling Resistance1":"0.01",
    					     "Rolling Resistance2":"0.01",
    					     "Spinning Resistance":"0.01",

    Hopefully this helps!

    ANVEL Support