Communication with multiple Crazyflies

Firmware/software/electronics
whoenig
Expert
Posts: 310
Joined: Mon Oct 27, 2014 2:55 am

Re: Communication with multiple Crazyflies

Post by whoenig » Wed Apr 29, 2015 3:07 pm

Yes, both NRF51 and STM32 will need to get the latest firmware (from github) in order to use the new addressing mode.



formica
Beginner
Posts: 11
Joined: Tue Apr 28, 2015 2:30 pm

Re: Communication with multiple Crazyflies

Post by formica » Wed May 06, 2015 12:35 pm

Hi whoenig,
I'm experimenting with your code from github (crazyflie_ros package on ROS indigo and Ubuntu 14, with one crazyradio PA and two CFs).
I flashed new firmware on nrf51 and stm32 to allow the multi-addressing mode.
Using the default branch of crazyflie-clients-python from github I can see and control both the CFs.

I do not succeed to connect to the copter using ros packages crazyflie_server and crazyflie_add using
terminal1_$> roslaunch crazyflie crazyflie_server.launcg
terminal2_$> sudo -s && roslaunch crazyflie_add uri:=radio://0/80/250K/E7E7E7E701

No connection at all.
Do I have to use cflib from the default branch or the multi-radio branch (https://github.com/bitcraze/crazyflie-clients-python) ?

Tryied both, without result.

Any idea?

whoenig
Expert
Posts: 310
Joined: Mon Oct 27, 2014 2:55 am

Re: Communication with multiple Crazyflies

Post by whoenig » Wed May 06, 2015 6:01 pm

Hi formica,

You need to use my own multi_radio branch (https://github.com/whoenig/crazyflie-cl ... _multilink). The bitcraze develop branch does not support multiple radios yet, and the Bitcraze multi_radio branch wasn't updated in a long time (and still has a bunch of bugs left). I recently did a rebase on my branch, so it should be pretty much up-to-date with the develop branch (+multi_radio support).

Furthermore, I updated the ros package to contain some more multi-CF examples (teleoperation and hovering), so you might want to pull the latest changes there too.

Let me know how it goes!

formica
Beginner
Posts: 11
Joined: Tue Apr 28, 2015 2:30 pm

Re: Communication with multiple Crazyflies

Post by formica » Tue May 12, 2015 11:44 am

Thanks whoenig. I did some steps further, using your client.
I do not have a Vicon but an Optitrack system, so I'm adapting your launch file.
I'm experiencing some problems with controller.py. The error is following:

"Could not transform from /world to /Robot_1/pose"

Robot_1/pose is the Pose of the robot captured from the mocap, wrt /tf.

What's the meaning of the /world topic in your system? Is it the /tf global reference?
Should be the parent topic of everything, is it right?

Regards
Roberto

whoenig
Expert
Posts: 310
Joined: Mon Oct 27, 2014 2:55 am

Re: Communication with multiple Crazyflies

Post by whoenig » Wed May 13, 2015 6:50 am

Hi Roberto,

Yes, "/world" is the global reference frame the vicon_bridge uses. You would either need to change the code everywhere or add a static transform publisher (http://wiki.ros.org/tf#static_transform_publisher) which maps "/tf" to "/world" using no translation/rotation between them (at about 100 Hz update rate).

I can introduce the reference frame as a parameter in a future version. Once you finished the Optitrack support, can you send it to me so that I can add it to the crazyflie_demo repository? I would like to support as many motion capture systems out-of-the-box as possible.

Best,
Wolfgang

formica
Beginner
Posts: 11
Joined: Tue Apr 28, 2015 2:30 pm

Re: Communication with multiple Crazyflies

Post by formica » Fri May 15, 2015 10:01 am

Hi whoenig,

I have closed the loop, so now I can takeoff and land by rosservice.
Now it's starting the core: the control. The crazyflie it's very unstable and doesn't seems controlled in position.
The reasons could be many: wrong frequency of the pose infos by the mocap, weak calibration of the mocap, wrong PID parameters...

Do you have any best practice or suggestion for me?
Regards

Roberto

whoenig
Expert
Posts: 310
Joined: Mon Oct 27, 2014 2:55 am

Re: Communication with multiple Crazyflies

Post by whoenig » Sat May 23, 2015 3:44 am

Hi Roberto,

I did write you a pm with some suggestions. A few more things:
* The mocap frequency should not matter, as long as it is high enough (I tested 100 Hz). The control loop runs at 100Hz and always uses the latest mocap reading. It works fairly well at lower frequencies as well, but isn't as smooth. Furthermore, the control loop takes dt into account, i.e. even on a slow computer the gains should still match.
* The PID parameters were determined for a CF 2.0 with about 5g payload. If you use another payload (or CF 1.0) it might require re-tuning.

Best,

Wolfgang

quadsRfun
Beginner
Posts: 9
Joined: Tue Mar 03, 2015 3:34 am

Re: Communication with multiple Crazyflies

Post by quadsRfun » Thu Oct 01, 2015 11:10 am

whoenig wrote:Hi Roberto,

Yes, "/world" is the global reference frame the vicon_bridge uses. You would either need to change the code everywhere or add a static transform publisher (http://wiki.ros.org/tf#static_transform_publisher) which maps "/tf" to "/world" using no translation/rotation between them (at about 100 Hz update rate).

I can introduce the reference frame as a parameter in a future version. Once you finished the Optitrack support, can you send it to me so that I can add it to the crazyflie_demo repository? I would like to support as many motion capture systems out-of-the-box as possible.

Best,
Wolfgang

Hi guys,

I have the similar issue at the moment.

I am using:
1. Optitrack Flex13 via VRPN server on Windows
2. Ros environment Indigo Ubuntu 14.04 LTS

Frames:
/world - world tf frame
/crazyflie - Position of the quad from VRPN server
/crazyflie/base_link : ??
I am trying to understand the frames.

Currently I can take off but cannot hover - Similar situation where I have checked PID, Calibration of cameras etc.

Which of the two configurations should i follow?
Attachments
frames with baselink & world.pdf
Configuration 1
(18.52 KiB) Downloaded 143 times
frames with baselink & world.pdf
Configuration 2
(18.52 KiB) Downloaded 121 times

whoenig
Expert
Posts: 310
Joined: Mon Oct 27, 2014 2:55 am

Re: Communication with multiple Crazyflies

Post by whoenig » Thu Oct 01, 2015 9:13 pm

Hi,

Your VRPN server should publish to "/crazyflie". "/crazyflie/base_link" is only required for visualization in RVIZ, and you can easily add a static transformation (see https://github.com/whoenig/crazyflie_ro ... launch#L40).

You said you can take-off: Does that mean autonomously? That indicates that your optitrack works fine (otherwise it would just not take off). Are you using CF 1.0 or 2.0? Which firmware are you running?

Best,

Wolfgang

PS: You'll get faster feedback if you open an issue on github. This way I get E-Mails whenever there is another note (or a new issue).

Post Reply