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 »

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: 2339
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

Re: Autonomous flight wiith Flow Deck V2 only

Post by tobias »

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 »

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
Duncan
Beginner
Posts: 20
Joined: Mon Aug 27, 2018 1:13 am

Re: Autonomous flight wiith Flow Deck V2 only

Post by Duncan »

Hi Aren,

I am doing something similar and I am curious how you realize this "The output of my controller is then sent to the python software and via crtp to the crazyflie itself".

Are you using the python software to control the crazyflie and if your controller is on ROS, how do you feed the control command to the python software?

Thank you in advance and happy holidays.

Duncan
kimberly
Bitcraze
Posts: 1050
Joined: Fri Jul 06, 2018 11:13 am

Re: Autonomous flight wiith Flow Deck V2 only

Post by kimberly »

@Duncan,

It is probably best if you start your own forum thread on this. Or else people won't be able to see this and reply to it.

Happy holidays to you too:)
Post Reply