Page 1 of 1

Creating a vehicle dynamics scene using CoppeliaSim

Posted: 13 Jul 2020, 21:37
by gustavo.duarte
I'm developing a vehicle dynamics study project, where I'm implementing stability control in the vehicle, like ABS and speed control, the scenes are ready, but I need to prove in matlab everything I did in coppeliaSim.

I am not getting the desired answer in matlab.

Project:
Image1: https://imgur.com/Kqa6lit
Image2: https://imgur.com/k77SZ0v
Original Project: https://github.com/askmuhsin/Cruise-con ... -using-PID

My Project: https://imgur.com/xCbdtI8
Put all my vehicle parameters in the equations and don't be successful.
I'm using the example of arckermann's vehicle.

I believe I'm making a mistake in aerodynamic drag (resistant) force.
equation Image: https://imgur.com/5owKZi6


I would like to know, how to obtain air density and air drag coefficient in the coppeliasim scene?

Gustavo, Brazil.

Re: Creating a vehicle dynamics scene using CoppeliaSim

Posted: 17 Jul 2020, 08:57
by coppelia
Hello Gustavo,

in CoppeliaSim you don't really have simulation of air/water supported. And because of that, you can't really simulate drag as you would expect it. However you can emulate drag in various ways. The simplest is to generate an additional force that is opposite to the velocity of the object you wish to emulate drag for.
Have a look how this is implemented for simple objects that float on water.

The API functions that you will have to use are (among others): sim.getVelocity and sim.addForceAndTorque.

Cheers