How to control the velocity of Quadricopter?

Typically: "How do I... ", "How can I... " questions
Post Reply
wode
Posts: 18
Joined: 12 Oct 2019, 03:47

How to control the velocity of Quadricopter?

Post by wode »

I use many Quadricopters in my scene and try to control the velocity and position of Quadricopters. However, i find it's difficult to do this.

I only can give the velocity of the Quadricopter: (vx,vy,vz) and the position:(x,y,z). But in the script of Quadricopter, after a series of complex calculation, the velocity of 4 motor is calculated.

So how can i use my input velocity(vx,vy,vz) to control the velocity of Quadricopter and use the position(x,y,z) to control the position of Quadricopter?

Thanks a lot.

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

Re: How to control the velocity of Quadricopter?

Post by coppelia »

Hello,

that's where you need to write a controller (or a better controller than the one provided).
You actually need two controllers: one that keeps the quadcopter at a specific orientation, and one that tweaks that orientation (i.e. introduces a bias) to achieve movement (your position controller). The second controller could be a simple P controller that simply changes the orientation of the quadcopter to incline it towards the desired movement direction (proportionally to the distance to the target). The max. inclination would be limited by the maximum velocity desired.

Cheers

Post Reply