`what(): LIBUSB_ERROR_TIMEOUT ` Error on Roadrunner (Only on USB)

Discussions about all things Bitcraze
Post Reply
ashwinsushil
Beginner
Posts: 2
Joined: Thu Feb 14, 2019 7:22 pm

`what(): LIBUSB_ERROR_TIMEOUT ` Error on Roadrunner (Only on USB)

Post by ashwinsushil »

Hello Everyone,

I'm trying to run this launch file,

Code: Select all

roslaunch bitcraze_lps_estimator dwm_loc_ekf_hover.launch uri:=usb://0
(With all the copter parts removed ofcourse)

But this error is being thrown every now and then,

Code: Select all

terminate called after throwing an instance of 'std::runtime_error'                                                                │                                                                                                                                   
  what():  LIBUSB_ERROR_TIMEOUT                                                                                                    │                                                                                                                                   
[crazyflie_server-6] process has died [pid 24065, exit code -6, cmd /home/unmanned/Workspace/devel/lib/crazyflie_driver/crazyflie_s│                                                                                                                                   
erver __name:=crazyflie_server __log:=/home/unmanned/.ros/log/b02b0af4-3082-11e9-8c3f-faa083e2307f/crazyflie_server-6.log].        │                                                                                                                                   
log file: /home/unmanned/.ros/log/b02b0af4-3082-11e9-8c3f-faa083e2307f/crazyflie_server-6*.log     
After couple of tries of running the same launch file, another error is being thrown,

Code: Select all

[INFO] [1550167626.114321]: Anchor 0 at [0.0, 0.0, 1.93]                                                                           │                                                                                                                                   
terminate called after throwing an instance of 'std::runtime_error'                                                                │                                                                                                                                   
  what():  LIBUSB_ERROR_TIMEOUT                                                                                                    │                                                                                                                                   
Traceback (most recent call last):                                                                                                 │                                                                                                                                   
  File "/home/unmanned/Workspace/src/lps-ros/scripts/lps_ekf_bridge.py", line 77, in <module>                                      │                                                                                                                                   
    update_params([name + 'x', name + 'y', name + 'z'])                                                                            │                                                                                                                                   
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rospy/impl/tcpros_service.py", line 435, in __call__                          │                                                                                                                                   
    return self.call(*args, **kwds)                                                                                                │                                                                                                                                   
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rospy/impl/tcpros_service.py", line 525, in call                              │                                                                                                                                   
    raise ServiceException("transport error completing service call: %s"%(str(e)))                                                 │                                                                                                                                   
rospy.service.ServiceException: transport error completing service call: unable to receive data from sender, check sender's logs fo│                                                                                                                                   
r details 
And after couple more tries, it WORKS and I'm able to get the pose on the Roadrunner! This is a USB realated issue i presume as I don't get this error when Roadrunner is connected over crazyradio Can someone please suggest some solution for this issue?

Firmware version on Roadrunner:
SYS: Build 4:1762deae7f25 (2019.02 +4) CLEAN
SYS: I am 0x3934323530374718003F0023 and I have 1024KB of flash!
CFGBLK: v1, verification [OK]
DECK_INFO: DECK_FORCE=bcDWM1000 found
DECK_INFO: compile-time forced driver bcDWM1000 added
DECK_CORE: 1 deck(s) found
DECK_CORE: Calling INIT on driver bcDWM1000 for deck 0
IMU: BMI088 Gyro I2C connection [OK].
IMU: BMI088 Accel I2C connection [OK]
ESTIMATOR: Using Kalman (2) estimator
CONTROLLER: Using PID (1) controller
EEPROM: I2C connection [OK].
DECK_CORE: Deck 0 test [OK].
SYS: Free heap: 11432 bytes
TDOA3: 2D positioning enabled at 0.300000 m height
DWM: Automatic mode: detected TDoA3


LPS node firmware: lps-node-firmware-2018.10.dfu

System details:
Ubuntu 16.04
ROS Kinetic
ROS driver for roadrunner/crazyflie from https://github.com/whoenig/crazyflie_ros

Thanks in advance,
Ash
whoenig
Expert
Posts: 395
Joined: Mon Oct 27, 2014 2:55 am

Re: `what(): LIBUSB_ERROR_TIMEOUT ` Error on Roadrunner (Only on USB)

Post by whoenig »

Feel free to open an issue in github for crazyflie_ros or crazyflie_cpp. I have seen this issue before with USB and a regular Crazyflie. Here is a change that reduces the probability of issues occurring, but does not entirely fix the problem: https://github.com/whoenig/crazyflie_cp ... dd6e48b851.
ashwinsushil
Beginner
Posts: 2
Joined: Thu Feb 14, 2019 7:22 pm

Re: `what(): LIBUSB_ERROR_TIMEOUT ` Error on Roadrunner (Only on USB)

Post by ashwinsushil »

Thank you @whoenig for the reply.
Like you mentioned it has not solved the issue and 7 out of 10 times (approx :D), I am not able to get the pose.

However, now I don't have `what(): LIBUSB_ERROR_TIMEOUT` error. Instead its the below given warning and no pose..

Code: Select all

[ WARN] [1550222925.240533190]: Link Quality low (0.000000) 


I have opened an issue on github in crazyflie_ros : https://github.com/whoenig/crazyflie_ros/issues/120

Let's move the discussion there. :)

Have a nice day.
Post Reply