Page 1 of 1
[SOLVED] Crazyflie 2.0 restarts after sending external position packet
Posted: Fri Dec 01, 2017 6:36 pm
by larry12193
I am attempting to send the crazyflie external position updates from a motion capture system. Everytime I send the external position packet via the crazyflie ROS package implementation, the copter restarts (motors beep, lights flash, etc.) and then sits idle flashing the M1 LED red at ~5 rapid flashes every second. I am running with the stock crazyflie firmware.
I have tried,
- different, fully charged batteries
- 3 different radios
- 2 different crazyflies
- 300-0.1 Hz external position packet send frequency
Once one external position packet is sent, the copter resets.
Re: Crazyflie 2.0 restarts after sending external position packet
Posted: Tue Dec 05, 2017 10:58 am
by Korrelator
can you show us the console output?
Re: Crazyflie 2.0 restarts after sending external position packet
Posted: Tue Dec 05, 2017 4:28 pm
by larry12193
I solved this issue by forcing the crazyflie to use the onboard kalman filter for state estimation and performing a reset of the estimator upon first connection to the quad.
in src/modules/src/system.c
and in my python script right after creating an new an instance Crazyflie
Code: Select all
cf.param.set_value('kalman.resetEstimation', '1')
time.sleep(0.1)
cf.param.set_value('kalman.resetEstimation', '0')
time.sleep(2)
cf.param.set_value('flightmode.posSet', '1')
Now, when it boots up and starts sending the external position from my moccap, it does not reset and will accept xyz setpoints.
Re: [SOLVED] Crazyflie 2.0 restarts after sending external position packet
Posted: Wed Dec 06, 2017 9:26 am
by arnaud
Hi,
Great that you got it to work! That would have been my suggestion.
This should be documented, I am thinking of creating an autonomous flight page on the wiki. Would you have found the information there if it was posted on the wiki?
Re: [SOLVED] Crazyflie 2.0 restarts after sending external position packet
Posted: Wed Jan 03, 2018 1:35 am
by larry12193
arnaud wrote: ↑Wed Dec 06, 2017 9:26 am
Hi,
Great that you got it to work! That would have been my suggestion.
This should be documented, I am thinking of creating an autonomous flight page on the wiki. Would you have found the information there if it was posted on the wiki?
I think it would defiantly help out. It took a bit to start connecting the dots between the what the autonomous flight sequence python examples were doing and what I needed to port to ROS to get everything working.