Page 1 of 1

PID control in crazyflie_controller_bridge.py?

Posted: Thu Jun 15, 2017 9:32 pm
by szx0112
Hi,

Currently, I put several waypoints that lets crazyflie autonomously fly by modifying the "crazyflie_controller_bridge.py" with ROS and LPS. The craft can roughly complete the job but with low accuracy. By reading the code, It seems that the PID position control is in the TODO list. Because I am not a control guy, not sure if adding it will increase the performance. Also interesting to know if it works, will you guys update it? Any other methods that can help are appreciate.


Thanks

Re: PID control in crazyflie_controller_bridge.py?

Posted: Tue Jun 20, 2017 6:30 am
by arnaud
Hi,

The position PID control is already implemented in the Crazyflie. You can find it there: https://github.com/bitcraze/crazyflie-f ... ller_pid.c.

What inaccuracy are you seeing? If you are seeing much inacuracy in Z you can try to add a big of 'ki' in pidz, for example setting this line to 0.5 or 1: https://github.com/bitcraze/crazyflie-f ... pid.c#L129. We have seen that this improves the Z accuracy (tested in ICRA, we are about to push the change).

Best,
Arnaud

Ps. What TODO list are you referring to?

Re: PID control in crazyflie_controller_bridge.py?

Posted: Tue Jun 20, 2017 10:00 pm
by szx0112
Thanks for your reply.

I see the code, I will try.

Sorry, it is not a TODO list, just the TODO in comment: https://github.com/bitcraze/lps-ros/blo ... idge.py#L5

That makes me confuse about whether it has implemented position control.

Re: PID control in crazyflie_controller_bridge.py?

Posted: Wed Jun 21, 2017 7:46 am
by arnaud
Hum... I wrote that and I am not sure what I meant...

My guess is that I wanted to make the Crazyflie PID compatible with the PID controller that was present in the Crazyflie ROS driver (there is a PID controller there as well), so it could be possible to set the PID parameter from the launch file the same way it could be done with the ROS PID controller. I have never needed this functionality though.

Re: PID control in crazyflie_controller_bridge.py?

Posted: Fri Jun 23, 2017 6:27 pm
by szx0112
Not a problem. Chaning ki indeed helps stablize the craft. Thanks.