Page 1 of 1
Posted: Sat Jul 25, 2020 4:15 pm
I started devoloping with the cflib, but I have a doubt, what is the "guideline" to start typing code?, and, what class can I use in order to fly a swarm with Flow deck but sending individual orders to each crazyflie?
Posted: Mon Jul 27, 2020 9:47 am
Actually we started to write tutorials for the cflib. This is the first one for the parameter and logging: https://www.bitcraze.io/documentation/r ... log_param/
. But we are not at swarming yet.
You can look into the CFLIB example folder and the swarm folder. There are some examples in there that you can use like this one
But individual orders to each crazyflie might be a bit tough through this class though. You can give different parameters/settings to each crazyflie, but not on the fly give it completely different commands. You would need read their URIs in the function that is in the parallel which you can do like this:
and then write different instructions within a IF statement that checks which crazyflie is connected. Then within that IF statement you can write crazyflie specific commands.
Posted: Thu Jul 30, 2020 7:00 pm
I tried to use that code as a reference, but it doesn't work well with Flow Deck, for example if I send
sequence1 = [
(0.0, 0.0, 1.0, 3.0)
The Crazyflie takes off but then it flies randomly to any direction, I've changed the propellers, the motor mounts and the battery is well balanced.
For example if I set the same position but with motion_commander or position_hl_commander the crazyfllie flies perfect.
Is it because swarmSequence is a version of AutonomousSequence and this one is designed for LPS System?
The surface is a ceramic white floor.
Posted: Thu Jul 30, 2020 7:09 pm
Here I attached the files
Posted: Fri Jul 31, 2020 7:46 am
A Ceremic white floor sounds like something that has no texture on it, which the flowdeck will have very difficult time handling it. You can test this out on different surfaces using the assist mode described in this tutorial here
Posted: Tue Aug 04, 2020 1:43 am
What should be a good surface for the Flow Deck?
Posted: Tue Aug 04, 2020 7:02 am
Anything with good texture and vivid colors. Wood floors usually work well but the best are children play mats. You can also print some colorful posters and put them on the floor. Avoid big black areas though.
Posted: Wed Aug 05, 2020 12:28 am
Ok I will test it with the children play mats, there are fabric and plastic mats, which one would work better?, and according with the code, is anything wrong with it or the Class is not designed for flow deck?
1. https://images-na.ssl-images-amazon.com ... SS350_.jpg
2. https://sc01.alicdn.com/kf/H9ce4587573a ... 3448bJ.jpg
Posted: Wed Aug 05, 2020 6:58 am
The flow deck uses an optical flow sensor that outputs relative motion in x and y, and absolute distance in z. The Crazyflie will calculate an absolute position based on the relative motion data it gets, but it will accumulate errors over time. The coordinate system will be based on the starting position orientation of the Crazyflie, so if you want to fly multiple Crazyflies with flow decks, they will NOT share the same global coordinate system.
The scripts you have provided are using absolute set points, which should work. Another option is to use velocity set points by using the MotionCommander class. See the tutorial mentioned earlier or https://github.com/bitcraze/crazyflie-l ... er_demo.py
. You can also take a look at https://github.com/bitcraze/crazyflie-l ... nceSync.py
Posted: Wed Aug 05, 2020 2:01 pm
I understand, but when running "PruebaVueloSincronizado.py" the Crazyflie takes off, then goes to any random position and after that continues the orders in sequence = [...], thing that does not happen with "pruebaEstadoCF.py"