Reputation: 67
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,
Upvotes: 3
Views: 536
Reputation: 1733
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
Upvotes: 3