this being my first post I would like to thank everyone for the valuable information in this forum!
That being said, I would like to first state my goals:
Setup: Crazyflie with flow deck
1. Detect the flie position using an external camera (opencv based, similar to your aruco detector) and send it to the flie.
2. Send positioning commands to the flie (x, y, z) using the python cflib and have it fly to the specified position.
Here is my current status:
For goal (1), I have written an application that detects the flie position and sends it using
Code: Select all
scf.cf.loc.send_extpos([x, y, z])
If I issue a hover setpoint with
Code: Select all
scf.cf.commander.send_hover_setpoint(vx, vy, yawrate, height)
Updating the external position while holding the flie in my hand shows that the external position is updated only once at the beginning and remains at that value (although it is being updated periodically), while the kalman estimator updates its state from the flow deck observing its movement.
For goal (2), if instead of using a hover setpoint, I send a position setpoint using
Code: Select all
scf.cf.param.set_value('flightmode.posSet', '1')
cf.commander.send_setpoint(y, x, yaw, int(z * 1000))
My concrete questions are:
a. Is it true that the external position (and the kalman estimator) only update when receiving external position information while in flight?
b. what is the correct sequence (and lib calls) to achieve goal (2), i,.e., takeoff and go to a set position
Any help will be greatly appreciated.
Thanks!
-- Sergio