Page 1 of 1

how to classify the uris of crazyflies when they are doing swarm

Posted: Wed Aug 15, 2018 4:53 pm
by dyang
I am flying a few crazyflies in parallel and want to save the log for each of them. However, when i am fetching the logs, I just fetched the log data of those three together and can not classify them. Any idea to solve this problem?

Re: how to classify the uris of crazyflies when they are doing swarm

Posted: Thu Aug 16, 2018 2:30 am
by whoenig
Could you provide some more details on how you fly your CFs? Are you using ROS or the python SDK?

Re: how to classify the uris of crazyflies when they are doing swarm

Posted: Wed Sep 12, 2018 5:14 pm
by dyang
whoenig wrote: Thu Aug 16, 2018 2:30 am Could you provide some more details on how you fly your CFs? Are you using ROS or the python SDK?
Hi, I am using python to run the crazyflie. And I was using those code to get the position information of the crazyflie. And the data I got were the data from all of the crazyflies together and I could not classify them, so I just want to know how get the uri information for each data I got.

position printing.png
call back.png

Re: how to classify the uris of crazyflies when they are doing swarm

Posted: Mon Oct 08, 2018 9:42 am
by arnaud
you need to setup a different log callback for each Crazyflies or to add a parameter to the callback with the ID of the drone. One way to do that is for you to create one logger object per Crazyflie, this way the object state can contain the ID. Another way would be to have a lambda function that adds the ID to the callback call. We have used the lambda strategy in many places in the client if you need some examples.