How to modify the quadricopter model to simulate your drone?

Typically: "How do I... ", "How can I... " questions
Post Reply
sohambhave1998
Posts: 2
Joined: 15 Feb 2020, 17:40

How to modify the quadricopter model to simulate your drone?

Post by sohambhave1998 »

I am trying to build an autonomous quadcopter. I want to simulate it in V-REP to tune its flight controller. I see that there is already a model called "Quadricopter" in the model library. But its physical parameters(geometry,dimensions,mass etc) seem to be very different from the one I am working on.
1) Can the quadricopter model be modified/tweaked to simulate my drone? If so what all parameters/properties will I need to change? Will simply rescaling the model and changing the mass work?
2) Do I need to make any changes to the scripts?
3) Or will it be better to build my drone from scratch using basic components such as the propellers? Again what all properties/parameters of the propellers do I have to change from the default ones?
4) If I choose to do the above is there any specific documentation related to these individual components such as propellers which will help me?
Thank you in advance!

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

Re: How to modify the quadricopter model to simulate your drone?

Post by coppelia »

Hello,

I'd recommend building your quadcopter from scratch, that will be much cleaner and probably also easier. There is actually not much to it, and propellers are just nice visually: they should not be simulated by the physics engine, since those engines anyway cannot cope with wind effects, and the very high rotation speeds. So the basic approach is to use a shape as the quadcopter body. Then apply thrust forces at the location of the propellers. Additionally, you can apply a drag force to the body, and so it in the end it is just about appropriately calculating those 5 forces in each simulation step, from control inputs such as a body position and orientation.

Cheers

sohambhave1998
Posts: 2
Joined: 15 Feb 2020, 17:40

Re: How to modify the quadricopter model to simulate your drone?

Post by sohambhave1998 »

Thank you for the reply! So as far I understand the propellers don't have much to do with how the quadrotor will move and are mostly for the visual aspect. Does that mean that the properties of the propellers like the length will not matter? Also where can I find the details of those 5 forces I will need to apply?

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

Re: How to modify the quadricopter model to simulate your drone?

Post by coppelia »

Yes, correct, the size of the propellers won't matter, since you can't really accurately simulate interaction with air with the 4 physics engines that are supported. You'll have to mimic the behaviour with appropriate forces: the propeller thrust is one force (or 4 for the 4 propellers). The drag is another force that is inversely proportional to the body velocity, and that depends on the drag coefficient of the quadcopter.

You'll basically compute those 5 forces and update them in each simulation step. Very similar actually as was done with the demo model models/robots/mobile/ACM-R5.ttm: in that model, the water interaction (when the model falls off the floor) is emulated via a drag force that is inversely proportional to the radial velocity of a snake segment. Each segment computes and applies its own radial drag force.

Cheers

Post Reply