Unable to connect to Crazyflie
See original GitHub issueHi,
I believe that I am facing the same/similar issue when running either of the following commands using ROS;
cd ros_ws/src/crazyswarm/scripts
python chooser.py
or
source ros_ws/devel/setup.bash
roslaunch crazyswarm hover_swarm.launch
I have read and understood majority of this existing issue raised and have thereafter implemented the changes I deemed necessary to try and diagnose the problem better and try to get the command(s) to work. However, I have now spent much time on this and can not get it to work. I receive the following issue/error when I run either of the commands (as stated above);
timeout
or
[crazyswarm_server-2] process has died [pid 25697, exit code -6, cmd /home/huzayfaa/crazyswarm/ros_ws/devel/lib/crazyswarm/crazyswarm_server __name:=crazyswarm_server __log:=/home/huzayfaa/.ros/log/061f4cf4-39f2-11e9-ad17-e839355c91e0/crazyswarm_server-2.log].
log file: /home/huzayfaa/.ros/log/061f4cf4-39f2-11e9-ad17-e839355c91e0/crazyswarm_server-2*.log
I have made the following changes to the configuration files, as stated in the installation guide (https://crazyswarm.readthedocs.io/en/latest/usage.html) and some of the older issues that are now solved.The process I follow includes:
- Assigned CF2.0 using a USB cable and the cfclient to uri:=radio://0/100/2M/E7E7E7E701 (Using the cfclient I can then scan for the CF2.0 on that address and channel and am able to connect to it too)
- Upgraded the firmware of the CF2.0 using the cfclient and bootloader mode to release 2019.02.1
- Upgraded the firmware of the Crazyradio using option 2 (prebuilt binary) and the version of the Crazyradio is now 99.55
- Ran the ** ./pc_permissions.sh** script and this too has executed successfully
- My allCrazyflies.yaml configuration file reads
crazyflies:
- id: 1
channel: 100
initialPosition: [1.5, 1.5, 0.0]
type: default
- ** crazyflieTypes.yaml** - No changes were made to this configuration file
- The following changes were made to ** hover_swarm.launch**
firmware: "bitcraze"
estimator: 2
motion_capture_type: "none"
object_tracking_type: "motionCapture"
The cfclient works absolutely fine and I am able to connect the CF2.0 using the same channel and address whenusing the client. However, both chooser.py and hover_swarm.launch do not work and thia I understand may be due to the timeout.
I understand that this may be a connection issue and that the Crazyradio is unable to connect to the CF. However, I don’t understand what I am doing wrong or even not doing and how to go about fixing this issue. I have two crazyflies and have now tried with both.
Many thanks in advance, any help and direction would be highly appreciated.
p.s. when I run ./build.sh
it all seems to compile fine and reaches 100%, however the following warning message is also displayed four times and I believe this relates to Issue #16
CMake Warning at /opt/ros/kinetic/share/catkin/cmake/catkin_package.cmake:166 (message):
catkin_package() DEPENDS on '/usr/lib/x86_64-linux-gnu/libusb-1.0.so' but
neither '/usr/lib/x86_64-linux-gnu/libusb-1.0.so_INCLUDE_DIRS' nor
'/usr/lib/x86_64-linux-gnu/libusb-1.0.so_LIBRARIES' is defined.
_Originally posted by @Huzayfaa in https://github.com/USC-ACTLab/crazyswarm/issues/105#issuecomment-467553874_
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (4 by maintainers)
Hi,
The behavior of your Crazyradio is strange. I have seen this kind of behavior when the cfclient is used in between (which seems to alter the state somehow), and using the latest NRF firmware (which I need to debug), but not with the prebuilt firmwares that are part of the Crazyswarm.
If you use LPS, it is normal that the rviz window is empty. If you use a motion capture system, rviz will show the current position estimate by the mocap. In order to debug your crashes, I suggest that you add logging of your current state position estimate (
stateEstimate.x
,stateEstimate.y
,stateEstimate.z
) here: https://github.com/USC-ACTLab/crazyswarm/blob/master/ros_ws/src/crazyswarm/launch/hover_swarm.launch#L19. Then enable logging https://github.com/USC-ACTLab/crazyswarm/blob/master/ros_ws/src/crazyswarm/launch/hover_swarm.launch#L54, and plot the data (e.g., similar to https://github.com/USC-ACTLab/crazyswarm/blob/master/ros_ws/src/crazyswarm/launch/hover_swarm.launch#L69). Move your CF around the space manually (w/o takeoff) and make sure that the state estimate is roughly correct. If that works, try changing the controller to PID (https://github.com/USC-ACTLab/crazyswarm/blob/master/ros_ws/src/crazyswarm/launch/hover_swarm.launch#L26), the mellinger controller has very high gains which might cause issues if the state estimate is noisy.The build warning should not be an issue. In order to troubleshoot, can you try the command line tools:
It should find the Crazyflie as well. Then try:
and see if your Crazyflie reboots successfully.
Finally, did you update your NRF firmware as well? I am not sure if the firmware release you mentioned includes both STM and NRF firmwares.