external position correction without flowdeck

Post Reply
Posts: 2
Joined: Sun Jun 09, 2019 12:11 pm

external position correction without flowdeck

Post by hos »


I'm using crazyflie2.1 in a lab project. I'm using ROS but made my own wrapper because I want to have access to all the cflib functions.
I plan to do the following :
  1. get the current position estimate from CF
  2. filter it offboard with an onboard FPV
  3. send the corrected pose back to CF using send_extpos
I was planning to use SVO or ROVIO for the second step but an on-board FPV cam would have too much delay (making it also hard to sync with IMU data) and the pose estimate would probably be obsolete by the time it makes back it to CF. plan B is attaching an aruco marker to the drone and using this for pose estimation.

Currently I set stabilizer.estimator to 2, reset the kalman filter and read the logs as suggested here. kalman.statePX, kalman.statePY & kalman.statePZ seem to be the variables i'm looking for. stateEstimate.x,y,z also reset to 0 but they don't seem to be updated by moving the drone and just diverge after a while.
  • Is there a general guide for parameters/variables and what they represent? I found this on the wiki but the parameters' page doesn't exist.
  • The high level commands (send_position_setpoint, send_hover_setpoint, high level commander) need an accurate pose estimate to work correctly. after sending them with send_extpos, is there anything I'd have to do to make the kalman estimate converge to those values ?
  • I'd also appreciate any tips about what I want to do.
EDIT : I completed my setup except for the vision system. Instead I use a ROS subscriber which reads Vector3 messages and sends them to the drone using cf.loc.send_extpo. I connect to the flie, set the estimator to kalman & start sending external positions using rostopic pub. This leads to irrelevant values in kalman.statePX...PZ and nan values in kalman.varPX..PZ. Reseting the kalman filter sets everything to 0 but they do not converge to the values i'm sending. Any help is appreciated
Post Reply