Autonomous flight wiith Flow Deck V2 only

Discussions about autonomous flight in general, regardless of positioning method
Post Reply
akarapet
Beginner
Posts: 2
Joined: Mon Aug 26, 2019 6:14 pm

Autonomous flight wiith Flow Deck V2 only

Post by akarapet » Thu Sep 12, 2019 11:11 am

Hi,

I am a research student working with Crazyflie 2.0 and FlowDeck V2. I am achieving smooth and stable flight when i control the quadcopter using the high level position controller, such as flowSequence.py. However, what I am aiming to achieve is to do my own position control with crazyflie's full state as my input and motor and attitude rates as my output.

I have the structure in place, by getting data from the quadcopter using the method in basiclog.c and then sending the data via ROS to my cpp controller. The output of my controller is then sent to the python software and via crtp to the crazyflie itself. I am getting the flowdeck information through the "stateEstimate.x", ..., "stateEstimate.vx", ... and "stateEstimate.roll", ... . I have noticed that upon startup the values of x and y start at some random coordinates, like (0.4, 0.2) and then diverge to 0 slowly . I understand that this may be due to how the EKF works on the firmware, but I would like to know if there is any way I can fix the coordinates when the crazyflie is static, because it is causing the controller to output wrong controls.

The idea is to achieve autonomous flight with positioning information coming only from the onboard sensor, for which the flowdeck is ideal.

Thanks in advance,
Aren



tobias
Bitcraze
Posts: 1891
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

Re: Autonomous flight wiith Flow Deck V2 only

Post by tobias » Mon Sep 16, 2019 11:43 am

Do you maybe have an old firmware. At some point the initial position was not zero and I cant remember why but that was changed. The initial position is set here. Are you sending a reset of the kalman filter at some point? If not, it is probably a good idea.

akarapet
Beginner
Posts: 2
Joined: Mon Aug 26, 2019 6:14 pm

Re: Autonomous flight wiith Flow Deck V2 only

Post by akarapet » Mon Sep 16, 2019 3:16 pm

Hi Tobias,

Thank you very much for your reply. I checked, I have the latest firmware with the initial positions being set to 0 in the kalman_core.c file, however, I was not resetting the kalman filter at all, hence all the problems. After resetting it, it works perfectly.

Thanks for your help.

Aren

Post Reply