question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to connect to Crazyflie

See original GitHub issue

Hi,

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:

  1. 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)
  2. Upgraded the firmware of the CF2.0 using the cfclient and bootloader mode to release 2019.02.1
  3. Upgraded the firmware of the Crazyradio using option 2 (prebuilt binary) and the version of the Crazyradio is now 99.55
  4. Ran the ** ./pc_permissions.sh** script and this too has executed successfully
  5. My allCrazyflies.yaml configuration file reads
crazyflies:
  - id: 1
    channel: 100
    initialPosition: [1.5, 1.5, 0.0]
    type: default
  1. ** crazyflieTypes.yaml** - No changes were made to this configuration file
  2. 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:closed
  • Created 5 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
whoenigcommented, Mar 4, 2019

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.

1reaction
whoenigcommented, Mar 4, 2019

The build warning should not be an issue. In order to troubleshoot, can you try the command line tools:

rosrun crazyflie_tools scan --address E7E7E7E701

It should find the Crazyflie as well. Then try:

rosrun crazflie_tools reboot --uri radio://0/100/2M/E7E7E7E701

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Client cannot connect to the Crazyflie - Bitcraze Forums
Hi. My Cfclient can detect the drone but can't connect with it. I got a Crazyflie 2.1 a few days ago. I follow...
Read more >
Unable to Connect to Crazyflie - Bitcraze Forums
My Crazyflie is assembled and turns on just fine. I use a USB to USB-c dongle to plug in my Crazyradio. When I...
Read more >
Can't connect to Crazyflie - Bitcraze Forums
1. Disconnect all power · 2. Connect battery while holding power button until M2 starts to blink · 3. M3 should also start...
Read more >
Cannot connect crazyflie - Bitcraze Forums
Hi I am having a problem after running tb make menuconfig I set ssid and password save it and reflashed the Crazyflie, but...
Read more >
Cannot connect with Crazyflie - Bitcraze Forums
When I press connect or the bootloader buttons, the red light turns on, on the crazyradio. It flashes and runs through its sequence...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found