Hi Guys,
I just got my Crazyflie 2.0 with crazyradio and try to use it with crazyflie_ros-master package
I set udev permissions according to this link https://github.com/bitcraze/crazyflie-l ... ermissions so I can detect the crazyflie using the crazyflie_tools scan.
After that I run roslaunched crazyflie_server.launch.and then roslaunched crazyflie_add.launch.
Everything seemed to work fine but when I checked the topics using the rostopic echo command no data popped up. For instance I tried to read the battery status running rostopic echo /battery but nothing popped up on the terminal.
It seems that there is communication between the Radio and the crazyflie since the D3 light from the radio is blinking constantly.
Could you help me fix this issue?
Thanks for your help.
Regards,
Robert
Using Crazyflie with crazyflie_ros-master package
Re: Using Crazyflie with crazyflie_ros-master package
Hi Robert,
Please try one of the demos, for example
"roslaunch crazyflie_demo teleop_xbox360.launch"
This should also launch rviz and rqt_plot and show you any received data.
For the battery issue there seem to be some issues with newer firmwares (see https://github.com/whoenig/crazyflie_ros/issues/36). I didn't get a chance to look at that yet though. Most likely the variables to log just need to be renamed. I am currently working on a much more robust solution and better error handling, but this still needs more testing (see https://github.com/whoenig/crazyflie_ro ... stBatching).
Let me know if you have any further issues (either here or open an issue on github),
Wolfgang (crazyflie_ros maintainer)
Please try one of the demos, for example
"roslaunch crazyflie_demo teleop_xbox360.launch"
This should also launch rviz and rqt_plot and show you any received data.
For the battery issue there seem to be some issues with newer firmwares (see https://github.com/whoenig/crazyflie_ros/issues/36). I didn't get a chance to look at that yet though. Most likely the variables to log just need to be renamed. I am currently working on a much more robust solution and better error handling, but this still needs more testing (see https://github.com/whoenig/crazyflie_ro ... stBatching).
Let me know if you have any further issues (either here or open an issue on github),
Wolfgang (crazyflie_ros maintainer)
Re: Using Crazyflie with crazyflie_ros-master package
Hi Wolfgang,
Thanks for your reply. I will follow your recommendation.
Also, I tried to use your new version of crazyflie_ros-master , https://github.com/whoenig/crazyflie_ro ... stBatching, but when I tried to catkin_make it, I got errors due to missing files at crazyflie_cpp package, such as sendPacket.cpp, sendSetpoint.cpp and sendSetpointMulti.cpp. So I ended up commenting out the lines that called these files at the CMakeLists.txt, then I catkin_make it successfully. Moreover, I noticed you add two more cpp files, CrazyflieUSB.cpp and USBDevice.cpp. My questions are, should i use your latest version or the original called crazyflie_ros-master ? what do I gain if I use your latest version, with my changes at CMakelist.txt, with respect to the original crazyflie_ros-master?
My goal is to flight multiple crazyflies, with waypoints, using a ROS wrapper and VICON for localization. Please advise.
Many thanks,
Robert
Thanks for your reply. I will follow your recommendation.
Also, I tried to use your new version of crazyflie_ros-master , https://github.com/whoenig/crazyflie_ro ... stBatching, but when I tried to catkin_make it, I got errors due to missing files at crazyflie_cpp package, such as sendPacket.cpp, sendSetpoint.cpp and sendSetpointMulti.cpp. So I ended up commenting out the lines that called these files at the CMakeLists.txt, then I catkin_make it successfully. Moreover, I noticed you add two more cpp files, CrazyflieUSB.cpp and USBDevice.cpp. My questions are, should i use your latest version or the original called crazyflie_ros-master ? what do I gain if I use your latest version, with my changes at CMakelist.txt, with respect to the original crazyflie_ros-master?
My goal is to flight multiple crazyflies, with waypoints, using a ROS wrapper and VICON for localization. Please advise.
Many thanks,
Robert
Re: Using Crazyflie with crazyflie_ros-master package
Hi Robert,
Thank you for your feedback - I added the missing files (your fix is valid too, since those executables are not really needed).
The "new" version has the following improvements:
* Support for communication over USB. This is not really useful in your case.
* Faster communication, in particular during startup. I measured that I can connect to a CF in 0.5 seconds (this includes downloading the log and param TOC). The master branch takes 1.5 seconds.
* Improved error handling in case of time-outs (prevents "hanging" of crazyflie_master).
I will eventually merge those changes into the master branch after some more testing. It is up to you what to use - both branches support what you want to do.
Best,
Wolfgang
Thank you for your feedback - I added the missing files (your fix is valid too, since those executables are not really needed).
The "new" version has the following improvements:
* Support for communication over USB. This is not really useful in your case.
* Faster communication, in particular during startup. I measured that I can connect to a CF in 0.5 seconds (this includes downloading the log and param TOC). The master branch takes 1.5 seconds.
* Improved error handling in case of time-outs (prevents "hanging" of crazyflie_master).
I will eventually merge those changes into the master branch after some more testing. It is up to you what to use - both branches support what you want to do.
Best,
Wolfgang
Re: Using Crazyflie with crazyflie_ros-master package
Hi Wolfgang,
Thanks for your reply. I followed your recommendation and tried to run roslaunch crazyflie_demo teleop_ps3.launch
The launch file gave one error, no "control_mode" that is needed for hector_quadrotor_teleop so I added "control_mode" : Twits in the launch file and fixed the error. With this fix, I have the cmd_vel topic published by hector_quadrotor_teleop and suscribed by the crazyflie_server.cpp.
Also I checked the values published by cmd_vel topic and they are accordingly with the game pad settings. The problem is that the crazyflie doesn't respond to cmd_vell at all and it seems that there is no communication between my PC and the crazyflie.
I am using the RioRand Crazyradio 2.4Ghz nRF24LU1 and at this point, I am not sure if I need configure my radio to stablish communication with my crazyflie. I assumed that a single crazyflie could work out the box without additional configuration. Could you please advise about this issue?
Many thanks,
Robert
Thanks for your reply. I followed your recommendation and tried to run roslaunch crazyflie_demo teleop_ps3.launch
The launch file gave one error, no "control_mode" that is needed for hector_quadrotor_teleop so I added "control_mode" : Twits in the launch file and fixed the error. With this fix, I have the cmd_vel topic published by hector_quadrotor_teleop and suscribed by the crazyflie_server.cpp.
Also I checked the values published by cmd_vel topic and they are accordingly with the game pad settings. The problem is that the crazyflie doesn't respond to cmd_vell at all and it seems that there is no communication between my PC and the crazyflie.
I am using the RioRand Crazyradio 2.4Ghz nRF24LU1 and at this point, I am not sure if I need configure my radio to stablish communication with my crazyflie. I assumed that a single crazyflie could work out the box without additional configuration. Could you please advise about this issue?
Many thanks,
Robert
Re: Using Crazyflie with crazyflie_ros-master package
Hi Robert,
Did you verify that you are using the correct uri? You can use the BitCraze Python client or "rosrun crazyflie_tools scan" to find the uri of your Crazyflie. Once you have that, run the launch file by specifying your uri: "roslaunch crazyflie_demo teleop_ps3.launch uri:=<uri_of_your_cf>".
Also, make sure that your CF flies correctly using the official client.
Best,
Wolfgang
Did you verify that you are using the correct uri? You can use the BitCraze Python client or "rosrun crazyflie_tools scan" to find the uri of your Crazyflie. Once you have that, run the launch file by specifying your uri: "roslaunch crazyflie_demo teleop_ps3.launch uri:=<uri_of_your_cf>".
Also, make sure that your CF flies correctly using the official client.
Best,
Wolfgang
Re: Using Crazyflie with crazyflie_ros-master package
Hi Wolfgang,
Many thanks for your reply.
You were right; the problem was wrong uri and now I start reading the imu, batteries and other topics data from the crazyflie.
Another question please, I need two fly two(2) crazyflies using one crazyradio per each crazyflie so my understanding is that I need to change the URI. Could you please tell me where I need to go in order to change the URI for the second crazyflie? Also, what do you mean when you said ..make sure that your CF flies correctly using the official client? is the official client the latest firmware for the crazyflie?
when do you need to change the default crazyflie address, 0xE7E7E7E7E7 ? Is this the case when you need to fly multiple crazyflies with one single crazyradio?
Many thanks again for your help!
Robert
Many thanks for your reply.
You were right; the problem was wrong uri and now I start reading the imu, batteries and other topics data from the crazyflie.
Another question please, I need two fly two(2) crazyflies using one crazyradio per each crazyflie so my understanding is that I need to change the URI. Could you please tell me where I need to go in order to change the URI for the second crazyflie? Also, what do you mean when you said ..make sure that your CF flies correctly using the official client? is the official client the latest firmware for the crazyflie?
when do you need to change the default crazyflie address, 0xE7E7E7E7E7 ? Is this the case when you need to fly multiple crazyflies with one single crazyradio?
Many thanks again for your help!
Robert
Re: Using Crazyflie with crazyflie_ros-master package
Hi Robert,
If you want to fly multiple CFs at the same time, they need to have different addresses (this is the last portion of the URI). You can use the Bitcraze PC client to configure the address (see https://www.bitcraze.io/2015/04/towards-crazyswarms-2/ for an explanation).
The PC client I am referring to is available here: https://github.com/bitcraze/crazyflie-clients-python. It can be used to fly the CF manually using a joystick and to change various settings.
You can use a single Crazyradio if you use the ros package. If you use the official python SDK you will need to use a different radio per crazyflie.
Send me a PM if you need step-by-step instructions.
Best,
Wolfgang
If you want to fly multiple CFs at the same time, they need to have different addresses (this is the last portion of the URI). You can use the Bitcraze PC client to configure the address (see https://www.bitcraze.io/2015/04/towards-crazyswarms-2/ for an explanation).
The PC client I am referring to is available here: https://github.com/bitcraze/crazyflie-clients-python. It can be used to fly the CF manually using a joystick and to change various settings.
You can use a single Crazyradio if you use the ros package. If you use the official python SDK you will need to use a different radio per crazyflie.
Send me a PM if you need step-by-step instructions.
Best,
Wolfgang