bitcraze / crazyflie-lib-python

Python library to communicate with Crazyflie
Other
260 stars 892 forks source link

Add an example of fusing external position/pose information from vicon_bridge into crazyflie #151

Closed JIMMMY0 closed 3 years ago

JIMMMY0 commented 4 years ago

Assume we have obtained position or pose of the crazyflie through vicon_bridge, how to fuse these external information into crazyflie? I think this is a high-demanding function for those who use VICON system. Really appreciate if an example could be provided.

krichardsson commented 4 years ago

Hi!

I agree, this would be a nice example. Unfortunately we don't have a vicon system but we would be happy to accept a pull request if someone else wrote it.

There is a similar example for a Qualisys system that can be used as a starting point.

JIMMMY0 commented 4 years ago

Thanks for your suggestion. We used vicon_bridge to get the drone's pose and wrote a ROS node trying to fuse the pose information into drone's kalman filter by using the method Extpos.send_extpos(self, x, y, z). And then reset the kalman filter as in the qualisys example. One question is do we have to call the function wait_for_position_estimator(cf) as in qualisys example ? To put it short, assume we have already obtained the external position of cf, how to correctly fuse it into Kalman filter and reset it with initial position ? We would appreciate if a minimum example could be provided.

Another problem is if we use the crazy radio to coneect to the drone for sending external pose information, if we send control commands(such as velocity command) at the same time, it will show that the crazyradio is busy. Any suggestion on this ? I think this issues is quite related to the first problem. If we can correctly send external pose to the drone, sending control commands will not be a problem.

krichardsson commented 4 years ago

Hi, sorry for the very late reply! The call to wait_for_position_estimator(cf) is to make sure the kalman filter has converged to the correct pose. Feeding data through Extpos.send_extpos(self, x, y, z) uses a very low std and the filter should converge quickly so I guess it is not really necessary with a mocap system.

if we send control commands(such as velocity command) at the same time, it will show that the crazyradio is busy

How often do you send the pose data? Could it be that you saturate the channel? You probably don't have to send the pose data very often. At some point I remember pushing pose data at only 5 Hz, but it probably depends on your application.

abdul-mannan-khan commented 1 year ago

Hello @JIMMMY0 and @krichardsson,

I am doing exactly the same thing. Could you use Vicon with Crazyflie? Minimums example would be extremely appreciated. Thank you so much.

knmcguire commented 1 year ago

@abdul-mannan-khan we don't have a minimal example since we don't have an vicon system but I'll make a seperate issue for this.

For other support, please use our discussions