Namfield
Namfield

Reputation: 49

Drone simulation in webots

I want to develop a drone using Webots with python or c++. I want to program the drone to take off automatically, follow a predetermined route (like moving on a sinusoidal pattern) and then return and land. Does anyone have an experience in doing this or know of any documents helpful to this that can be shared with me, please? By the way, I have started my coding, I want to set 2 propellers to rotate clockwise and the other 2 to rotate in the opposite direction when making it to take off so I have tried to set the velocity for 2 propellers with a negative value as the code is shown in the picture attached but those 2 propellers start later than the other 2 so it affects the drone's performance. Does anyone know what the problem is? Thank you so much!

Upvotes: 3

Views: 2297

Answers (1)

David Mansolino
David Mansolino

Reputation: 1733

About your propeller issue, it is probably simpler just to inverse the axis of two of the propellers.

You should probably have a look at the example of drone simulation already available in Webots: https://www.youtube.com/watch?v=-hJssj_Vcw8

You can find the documentation of this drone model at: https://www.cyberbotics.com/doc/guide/mavic-2-pro

Here is the source of the model: https://github.com/cyberbotics/webots/blob/master/projects/robots/dji/mavic/protos/Mavic2Pro.proto

And the source of the controller: https://github.com/cyberbotics/webots/blob/master/projects/robots/dji/mavic/controllers/mavic2pro/mavic2pro.c

Upvotes: 1

Related Questions