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.
How to control the velocity of Quadricopter?
Re: How to control the velocity of Quadricopter?
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
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