Crazyflie logged state estimates freeze, but log timestamps are updated (+Lighthouse) #237
-
Hi, I'm currently controlling two Crazyflies using a Matlab/Simulink controller. I've a Python script that uses the Swarm framework with a simple loop: receive state from the Crazyflie -> send it to Matlab/Simulink through UDP -> receive the Matlab/Simulink controller output -> send the control command to the Crazyflie using send_setpoint(roll, pitch, yawrate, thrust). As for the Matlab/Simulink, I've both controllers on the same file, the only thing that changes is the ports necessary for the UDP connection. One drone works well (drone1), the other (drone2) starts well but then 1.8s later the state estimates freezes: https://i.imgur.com/cEcIvj3.png According to the video, drone2 drifts to the left (positive y in my setup) and straight (positive x in my setup) while slowly increasing the height. This can't be seen in the flight data because the state estimate freezes at As the controller keeps working, and believes drone2 is at those positions, the left-straight drift makes sense as it's trying to go to the desired reference: The UDP network runs at 2.4GHz, I'm logging at 50ms and here's the URIs: Both Crazyflies have the most recent firmware, no parameters or flags changed, and I'm using the Lighthouse positioning system with 2 basestations. I can control each drone individually with no problem. I've observed this drifting behaviour in other flight tests when the Lighthouse loses sight of the Crazyflie. When this happens, position values tend to minus infinity, but this is the first time this happens and the log state estimate freeze occurs. I've noticed that when the Crazyflies are not fully charged this Lighthouse related drift happens a lot, I've read somewhere that It's a known bug related to the Lighthouse deck power? I find it hard to believe that the Lighthouse can't detect the Crazyflie in that location, as I've tested other trajectories and scripts with no problem (for instance, autonomous_sequence_high_level.py). So I think I have two problems: the Lighthouse-Crazyflie connections fails (happened to me in other flights, explains weird values such as negative height) and then the state estimate freezes.
I'm not using
as I've had good single Crazyflie flights without it, should I use it and can this be causing my problem? Thanks in advance! EDIT:
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Hi! Let's try to debug your problem.
|
Beta Was this translation helpful? Give feedback.
-
Switching the Lighthouse decks: the problem persists. I've noticed a slightly crooked male pin, replaced it, but changing it made no difference. I've also switched both drone's starting position, to test if that specific flight area had bad connection to the Lighthouse, and the same behaviour occured so there's definitely something wrong with Drone2. Then I've switched drone2's battery with a new one and it worked! Well that was an underwhelming debug, but thankfully an easy one to solve. Thank you so much!! |
Beta Was this translation helpful? Give feedback.
Switching the Lighthouse decks: the problem persists. I've noticed a slightly crooked male pin, replaced it, but changing it made no difference.
I've also switched both drone's starting position, to test if that specific flight area had bad connection to the Lighthouse, and the same behaviour occured so there's definitely something wrong with Drone2.
Then I've switched drone2's battery with a new one and it worked! Well that was an underwhelming debug, but thankfully an easy one to solve.
Thank you so much!!