Page 1 of 1

Position and Velocity Control on PC

Posted: Tue Mar 24, 2020 6:08 am
by Calvin Chua
Hi all,

I wish to ask a question, I wish to develop a pid controller on controlling the position of the drone. Is it possible to develop a controller for it and not using the one on board?

Re: Position and Velocity Control on PC

Posted: Wed Mar 25, 2020 9:22 am
by kimberly
Hi,

So you want to develop a controller offboard on your own computer? Sure, that would be perfectly possible with the crazyflie python library. You can then send set-points for roll pitch yaw rate and trust (see examples/ramp.py as an example), if that was the level of control you are looking for.

There is a cascaded onboard PID controller so you can choice at which 'level' you want to build your own controller. If you want to control the rpm of the motors itself, this would be also possible but maybe considering the delay is not advisable to go that low level.

Re: Position and Velocity Control on PC

Posted: Sat Mar 28, 2020 10:19 am
by Calvin Chua
Hi Kimberley,

I wish to control the rpm of the motors but I dont see any examples on the python library. Is it possible to do that

Re: Position and Velocity Control on PC

Posted: Mon Mar 30, 2020 9:37 am
by kimberly
Then you should look at the motorPowerSet parameter. https://github.com/bitcraze/crazyflie-f ... #L114-L120.

If you set these parameters from a script (don't forget to enable it), you are able control the raw PWM values per motor. It is not RPM, but you can find the relationship here: https://wiki.bitcraze.io/misc:investigations:thrust

Re: Position and Velocity Control on PC

Posted: Wed Apr 01, 2020 4:29 am
by Calvin Chua
Hi Kimberley,

Thanks for your reply. I have designed a kinematic model that output thrust, yaw, pitch and roll. Besides, I am currently setting up simulation in Matlab. Is it possible to provide me the mechanical specifications of Crazyflie 2.1 such as moment of inertia to increase the accuracy of the simulation please? Besides, do you have any recommendation for simulator other than Matlab or CrazyS.

Re: Position and Velocity Control on PC

Posted: Wed Apr 01, 2020 7:47 am
by kimberly
Hi!

So in this paper there was a full system identification done on the crazyflie 2.0 by eth zurich, which is very similar to the 2.1 for the exception of the IMU: https://www.research-collection.ethz.ch ... 850/214143

For simulations: you can also consider using Gazebo and the hector quadrotor ros package. You can adjust the hector quadrotor measurements to match those of the crazyflie.