arnaud wrote:Hi,
I just implemented the function to send position update to the Crazyflie:
https://github.com/bitcraze/crazyflie-l ... /issues/30. This function allows to update the internal kalman filter with the externally measured position.
The exact procedure depends of what you try to achieve. I have an idea to implement and test altitude hold:
- Measure the Z position of the Crazyflie using your image processing.
- Implement your image processing in a Crazyflie client tab using the example tab as a starting point:
https://github.com/bitcraze/crazyflie-c ... mpleTab.py. We made a video a while ago showing the process:
https://youtu.be/cutgIMfHwyQ
- Once you have Z in the client, call cf.extpos.send_extpos(0, 0, z) at the end of your image processing loop.
- Compile the crazyflie firmware with both kalman and XY decoupling:
https://github.com/bitcraze/crazyflie-f ... 4b58a5d549. That can be done by adding to tools/make/config.mk:
Code: Select all
ESTIMATOR=kalman
CFLAGS += -DKALMAN_DECOUPLE_XY
then "make clean && make && make cload"
- Fly an press the alt-hold button to enjoy your super stable alt-hold!
The step after would be to measure X Y and Z (for example with 2 cameras) and disable the XY decoupling to be able to make fully autonomous flight
.
Keep us updated and tell me if you need help. This would be very interesting to see
Hi Arnaud,
I have a rough idea about using webcam as an assistant for Crazyflie but I am not sure how to implement it.
I m going to feed the absolute position to the crazyflie by using 2 webcams e.g.x = 500, y = 300, z=400 (the webcams resolution are 1000x560).
From the firmware side, I am going to enqueue this position data for kalman filter. (500, 300, 400).
and now,
If I want the Crazyflie to be able to fly vertically without drifting, which mode should I set to for x and y (velocity or absolute?)
What should be the input values for x and y? is it still 500 and 300 for the Crazyflie to be stable?
and after that, If I want the Crazyflie to be able to hover after taking off, which mode should I set to for x, y and z? (velocity or absolute?)
What should be the input values for x, y, and z?
I am abit confused about this because there are two PID controllers, which are position control and velocity control. before the 2 attitude PID controllers.
Based on my understanding of the code, If we want to do altitude hold for it, it will bypass the position controller and do velocity controller directly. However, If we want to do position hold for it, it will do both position and velocity controller. I was thinking of one case, which if I am going to only control the x and y position by using the feeds from the webcams and control the z by using its own barometer measurements. How should I do for this case?
Thank you.