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.
[SOLVED] Crazyflie 2.0 restarts after sending external position packet
-
- Beginner
- Posts: 7
- Joined: Tue Oct 17, 2017 7:32 pm
[SOLVED] Crazyflie 2.0 restarts after sending external position packet
Last edited by larry12193 on Tue Dec 05, 2017 4:28 pm, edited 1 time in total.
-
- Beginner
- Posts: 9
- Joined: Fri Jun 02, 2017 12:49 pm
Re: Crazyflie 2.0 restarts after sending external position packet
can you show us the console output?
-
- Beginner
- Posts: 7
- Joined: Tue Oct 17, 2017 7:32 pm
Re: Crazyflie 2.0 restarts after sending external position packet
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
Now, when it boots up and starts sending the external position from my moccap, it does not reset and will accept xyz setpoints.
in src/modules/src/system.c
Code: Select all
158 estimator = kalmanEstimator;
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')
Re: [SOLVED] Crazyflie 2.0 restarts after sending external position packet
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?
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?
-
- Beginner
- Posts: 7
- Joined: Tue Oct 17, 2017 7:32 pm
Re: [SOLVED] Crazyflie 2.0 restarts after sending external position packet
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.