3

I would like to know how the vehicle's objects are modeled in WeBots and its dynamics equations. I know that two types of control can be used: using cruising speed, with targets a final velocity but with a constant acceleration (proportional to the time0to100 value in the PROTO file), and using the throttle which controls the torque of the vehicle.

Since I want to control the vehicle with a controller at high frequencies, the only option to realistically emulate a real vehicle is the torque control. But to predict the behavior of the vehicle in this case I need to know how the torque is calculated, the transmission equations and the how all of this is implemented with ODE. I read the Car and Driver library pages and both of then had some details and descriptions about how the system works, but these explanations wasn't detailed enough. I would also like to understand how the interaction between tires and asphalt is modeled.

Thanks,

Nelson
  • 57
  • 5

1 Answers1

3

Control in torque is indeed the most realistic option.

About the equations, the various engine models are described in detail here: https://www.cyberbotics.com/doc/automobile/driver-library#engine-models

In addition, the transmission and Ackermann mechanism is used to convert/transmit the torque from the motor to the two/four wheels, this is not documented, but the code is accessible here (part specific to vehicles): https://github.com/omichel/webots/blob/master/projects/default/libraries/vehicle/c/driver/src/driver.c#

In particular, the engine models + transmission is implemented here: https://github.com/omichel/webots/blob/master/projects/default/libraries/vehicle/c/driver/src/driver.c#L126

Which is then split between the 2/4wheels: https://github.com/omichel/webots/blob/master/projects/default/libraries/vehicle/c/driver/src/driver.c#L299

About interaction between tires an asphalt, this is defined as regular contact properties in Webots (which are then used to create ODE contact joints: http://ode.org/wiki/index.php?title=Manual#Contact):

https://www.cyberbotics.com/doc/reference/contactproperties

David Mansolino
  • 1,673
  • 4
  • 12
  • After looking the driver.c it can be seen that the dynamics of the vehicle (load shift for example) are not considered in the torque control. Are they considered in the rotation and translation matrices of the vehicle in the animation? I just want to have an idea of the completeness of the model used. – Nelson Feb 19 '19 at 14:58
  • 1
    The driver.c is only responsible to compute the desired torque on the wheel joints, then ODE (the physics engine used by Webots) is then responsible to compute the dynamics of the vehicle. You will find all the required information about how ODE computes the dynamic here: http://ode.org/wiki/index.php?title=Manual#Introduction – David Mansolino Feb 20 '19 at 08:09
  • Yes, I did understood that ODE is responsible to compute the dynamic solution. I'm asking about with vehicle dynamics is used, double track, single track model, which is the tire-road interface modelisation, etc. All of this is implemented in the ODE? Because intuitively the resolution of a vehicle should be outside (but I am yet looking through the library). If it is inside, sorry for the insistence. If not it is something that I should take care for my development in WeBots. – Nelson Feb 20 '19 at 11:57
  • 3
    The tire/road interface is managed by the Webots ContactProperties, so the ODE contact points. Rigidity of the joints (suspension, torques, etc.) are dealt by ODE. The control of the joints are indeed dealt "outside" in driver.c and use the Ackerman vehicle dynamics (close to the double track model), it deals each wheels independently depending on the driver library input. It's possible to edit driver.c to change this model if required. I hope this fits your expectations. – FabienRohrer Feb 21 '19 at 08:33
  • Yes, it did. It was exactly that what I wanted to know. Since each part of the vehicle dynamics is implemented in a different library sometimes it is hard to connect all the dots. Thanks. – Nelson Feb 22 '19 at 09:48