Creating a vehicle dynamics scene using CoppeliaSim

Typically: "How do I... ", "How can I... " questions
Post Reply
gustavo.duarte
Posts: 7
Joined: 27 Feb 2020, 18:46

Creating a vehicle dynamics scene using CoppeliaSim

Post 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.

coppelia
Site Admin
Posts: 10504
Joined: 14 Dec 2012, 00:25

Re: Creating a vehicle dynamics scene using CoppeliaSim

Post 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

Post Reply