Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

using realsense d435i with jetson nano, ubuntu 18.04 and ros melodic, any solutions?? 15/03 16:32:14,498 WARNING [546761056640] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11 #6062

Closed
kaushik98y opened this issue Mar 15, 2020 · 23 comments

Comments

@kaushik98y
Copy link

  • Before opening a new issue, we wanted to provide you with some useful suggestions (Click "Preview" above for a better view):

  • All users are welcomed to report bugs, ask questions, suggest or request enhancements and generally feel free to open new issue, even if they haven't followed any of the suggestions above :)


Required Info
Camera Model { R200 / F200 / SR300 / ZR300 / D400 }
Firmware Version (Open RealSense Viewer --> Click info)
Operating System & Version {Win (8.1/10) / Linux (Ubuntu 14/16/17) / MacOS
Kernel Version (Linux Only) (e.g. 4.14.13)
Platform PC/Raspberry Pi/ NVIDIA Jetson / etc..
SDK Version { legacy / 2.. }
Language {C/C#/labview/nodejs/opencv/pcl/python/unity }
Segment {Robot/Smartphone/VR/AR/others }

Issue Description

<Describe your issue / question / feature request / etc..>

@kaushik98y kaushik98y changed the title 15/03 16:32:14,498 WARNING [546761056640] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11 using realsense d435i with jetson nano, ubuntu 18.04 and ros melodic, any solutions?? 15/03 16:32:14,498 WARNING [546761056640] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11 Mar 15, 2020
@MartyG-RealSense
Copy link
Collaborator

Other Jetson users have recently been experiencing variations on this error in the discussion linked to below. It remains an open case at the time of writing this. It may be worth adding a comment to that discussion to highlight your own problem.

#4031

Have you tried the JetsonHacks installation guide for Nano please?

https://github.com/JetsonHacksNano/installLibrealsense

@kaushik98y
Copy link
Author

yes i have tried the jetsonhacks guide, even did the kernel patch. Could upgrading the kernel solve the issue? Currently i have 4.9.140-tegra kernel version, would kernel version 5 solve the issue as it supports librealsense2-dkms ??

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Mar 16, 2020

If you want to test for whether the issue may be kernel related, you could try the "bypass" method of installation for Librealsense that does not depend on kernel versions or patches. The method below requires SDK version 2.30.0 or newer and an internet connection.

The CMake instruction for the bypass type installation in SDK 2.30.0 and newer is:

cmake ../ -DFORCE_RSUSB_BACKEND=true -DCMAKE_BUILD_TYPE=release -DBUILD_EXAMPLES=true -DBUILD_GRAPHICAL_EXAMPLES=true

@dorodnic
Copy link
Contributor

I think @kaushik98y already using RSUSB because of messenger-libusb.cpp in the error.
It's not entirely clear from the description if the issue happens all the time, or only some times. Also, I'd recommend checking if different USB setup can give better results. We have seen issues with some kinds of USB hubs that do not reproduce when connecting directly, also there is USB-C connector I think (I may be confusing with the Xavier)
In general, @doronhi is working on stability on Jetson, and @ev-mp is looking into issues introduced by kernel 5. So I hope we will have a solution soon

@jorgemiar
Copy link

jorgemiar commented Mar 26, 2020

I'm running Realsense 2.33.1. and D435i firmware 05.12.03.00 and also see similar issues.

I get [548212306368] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: No data available, number: 61 when starting the depth stream of the D435i with a Jetson Nano in realsense viewer.

Then I sometimes get WARNING [548212306368] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11.

I also have ros-realsense 2.2.13 set up, running ros melodic and get
[548212306368] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: No data available, number: 61
and
[ WARN] [1585260191.657304589]: Hardware Notification:Motion Module failure,1.58526e+12,Error,Hardware Error
when launching the ros node.

Is there a stable release I could downgrade to which will not have these issues?

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Mar 27, 2020

@jorgemia ROS wrapper 2.2.13 was the first one to officially support Melodic. My understanding is that earlier wrapper versions could work unofficially with Melodic though. In JetsonHacks' Jetson Nano installation guide in October 2019, they used SDK 2.25.0.

https://github.com/IntelRealSense/librealsense/releases/tag/v2.25.0

They say that the ROS wrapper they used was 2.28.0, but I think they meant 2.2.8.

https://github.com/IntelRealSense/realsense-ros/releases/tag/2.2.8

In their setup, they also use L4T 32.2.1 / JetPack 4.2.2

JetsonHacks said they did not encounter problems with using Melodic with this setup, even though it wasn't officially supported by the ROS wrapper at the time.

The JetsonHacks Nano guide is here:

https://www.jetsonhacks.com/2019/10/25/realsense-ros-wrapper-jetson-nano/

@jorgemiar
Copy link

jorgemiar commented Mar 27, 2020

@MartyG-RealSense it seems that for L4T 32.3.1 (which I'm running) Jetson Hacks used realsense 2.31.1 and ros 2.2.11. I'm going to give that a try.

If I want to install a specific version using the prebuilt packages, how can I choose the version to install? (Following distribution_linux.md) Or should I install from source?

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Mar 27, 2020

If you have unusual hardware that differs from the average desktop PC, compiling from source is recommendable in order to make sure that the build matches up well to the hardware.

Having said that, I recalled that JetsonHacks released an update to their installation guide in December 2019, where they stated that starting with L4T 32.2.1 and Librealsense SDK 2.23.0 onward, installation on Jetson had become easier.

https://github.com/JetsonHacksNano/installLibrealsense

@jorgemiar
Copy link

Yes I'm aware, I have a Jetson Nano and followed his guide previously. Just want to know if there is a way to select the version to install using apt-get packages?

When I run this sudo add-apt-repository "deb http://realsense-hw-public.s3.amazonaws.com/Debian/apt-repo bionic main" -u and continue with the other steps, I believe it installs the latest realsense version available.

@MartyG-RealSense
Copy link
Collaborator

@jorgemia I feel that the key phrase here is probably "version control" to achieve what you are seeking to do with apt-get. It is not a subject I am an expert on though at present.

I did learn though that JetsonHacks has a Releases page with a list of past repositories for their Jetson Nano installation, if that is of any use.

https://github.com/JetsonHacksNano/installLibrealsense/releases

@jorgemiar
Copy link

@MartyG-RealSense Ok so I installed v2.31.0 from source using the JetsonHacks build script but I still get the following warning when running realsense-viewer stereo module:

[548212306368] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: No data available, number: 61

When turning the stereo module off, I sometimes get:
27/03 12:48:59,352 WARNING [546727518656] (messenger-libusb.cpp:96) usb_request_cancel returned error, endpoint: 130 error: Success, number: 0

As a side note, when building from source I got warnings of the following style at times:

/home/jorge/librealsense/third-party/glad/glad.c:902:23: warning: ISO C forbids conversion of object pointer to function pointer type [-Wpedantic]
  glad_glGetIntegerv = (PFNGLGETINTEGERVPROC)load("glGetIntegerv");
                       ^

I don't know if this affected the installation?

@MartyG-RealSense
Copy link
Collaborator

@doronhi the RealSense ROS wrapper developer has said the following about the control_transfer error:


The warning message "control_transfer returned error" reflects communication error with the device that is resolved by repeating the attempt. These messages are still under investigation but as long as they appear only now and then, say at the beginning of the run, they can safely be ignored for now.

I believe that if you can see the topics in RViz then as far as realsense2_camera node is concerned they are published correctly.

@tispratik
Copy link

tispratik commented Mar 30, 2020

We're seeing the same issue in a two Realsense camera setup on a regular beefy machine setup with Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz, 32 GiB RAM, Realsense SDK 2.33.1. One of the cameras keeps showing this error. Following is what i see in the debug logs.

30/03 00:00:00,932 WARNING [140510995904256] (types.cpp:49) set_xu(ctrl=1) failed! Last Error: Success
30/03 00:00:00,932 ERROR [140510995904256] (global_timestamp_reader.cpp:188) Error during time_diff_keeper polling: set_xu(ctrl=1) failed! Last Error: Success
30/03 00:00:07,946 WARNING [140510995904256] (types.cpp:49) set_xu(ctrl=1) failed! Last Error: Success
30/03 00:00:07,946 ERROR [140510995904256] (global_timestamp_reader.cpp:188) Error during time_diff_keeper polling: set_xu(ctrl=1) failed! Last Error: Success
30/03 00:00:14,959 WARNING [140510995904256] (types.cpp:49) set_xu(ctrl=1) failed! Last Error: Success
30/03 00:00:14,959 ERROR [140510995904256] (global_timestamp_reader.cpp:188) Error during time_diff_keeper polling: set_xu(ctrl=1) failed! Last Error: Success

30/03 00:05:45,220 ERROR [140511408912128] (uvc-streamer.cpp:106) uvc streamer watchdog triggered on endpoint: 132
30/03 00:05:50,609 WARNING [140511051962112] (types.cpp:49) set_xu(ctrl=1) failed! Last Error: File exists
30/03 00:05:50,609 ERROR [140511051962112] (global_timestamp_reader.cpp:188) Error during time_diff_keeper polling: set_xu(ctrl=1) failed! Last Error: File exists
30/03 00:05:51,215 ERROR [140511408912128] (uvc-streamer.cpp:106) uvc streamer watchdog triggered on endpoint: 132
30/03 00:05:56,622 WARNING [140510995904256] (types.cpp:49) set_xu(ctrl=1) failed! Last Error: Success
30/03 00:05:56,622 ERROR [140510995904256] (global_timestamp_reader.cpp:188) Error during time_diff_keeper polling: set_xu(ctrl=1) failed! Last Error: Success
30/03 00:06:02,635 WARNING [140511051962112] (types.cpp:49) set_xu(ctrl=1) failed! Last Error: File exists
30/03 00:06:02,635 ERROR [140511051962112] (global_timestamp_reader.cpp:188) Error during time_diff_keeper polling: set_xu(ctrl=1) failed! Last Error: File exists
30/03 00:06:03,205 ERROR [140511408912128] (uvc-streamer.cpp:106) uvc streamer watchdog triggered on endpoint: 132
30/03 00:06:08,649 WARNING [140510995904256] (types.cpp:49) set_xu(ctrl=1) failed! Last Error: Success
30/03 00:06:08,649 ERROR [140510995904256] (global_timestamp_reader.cpp:188) Error during time_diff_keeper polling: set_xu(ctrl=1) failed! Last Error: Success
30/03 00:06:14,662 WARNING [140511051962112] (types.cpp:49) set_xu(ctrl=1) failed! Last Error: File exists
30/03 00:06:14,662 ERROR [140511051962112] (global_timestamp_reader.cpp:188) Error during time_diff_keeper polling: set_xu(ctrl=1) failed! Last Error: File exists
30/03 00:06:15,196 ERROR [140511408912128] (uvc-streamer.cpp:106) uvc streamer watchdog triggered on endpoint: 132
30/03 00:06:20,675 WARNING [140510995904256] (types.cpp:49) set_xu(ctrl=1) failed! Last Error: Success


30/03 13:42:10,021 WARNING [139879551850240] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
30/03 13:42:11,102 WARNING [139879551850240] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
30/03 13:42:12,183 WARNING [139879551850240] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
30/03 13:42:16,325 WARNING [139879551850240] (messenger-libusb.cpp:42) control_transfer returned error, index: 300, error: Resource temporarily unavailable, number: b
30/03 13:42:19,447 WARNING [139879551850240] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
30/03 13:42:21,548 WARNING [139879551850240] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
30/03 13:42:21,608 WARNING [139879551850240] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
30/03 13:42:22,689 WARNING [139879551850240] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
30/03 13:42:23,770 WARNING [139879551850240] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
30/03 13:42:23,830 WARNING [139879551850240] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
30/03 13:42:24,911 WARNING [139879551850240] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11

@MartyG-RealSense
Copy link
Collaborator

@tispratik So the messages above are appearing continuously instead of only at the start of a run?

@tispratik
Copy link

I restarted the cameras. I still keep seeing these messages continuously. Generally what happens is, after 24+ hours of running, the second camera fails to get frames, thats when we have to restart both cameras and the same cycle repeats.

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Mar 30, 2020

@tispratik I found a case where this error is occurring: set_xu(ctrl=1) failed! Last Error: Success

#5328

The user in that case had the idea of configuring hardware_reset to reset automatically when the error "frame not received" occurred.

I was not able to find a method for preventing this error from occurring though.

@tispratik
Copy link

tispratik commented Mar 30, 2020

Thanks Marty. It's interesting. We are running the second camera which keeps getting disconnected at 1 frame every 2 seconds. Could that be a cause of the problem?

@MartyG-RealSense
Copy link
Collaborator

In general, errors are more likely to occur when using an FPS speed of less than 15 FPS. 6 FPS especially can be erratic.

@MartyG-RealSense
Copy link
Collaborator

Closed due to no further comments being received.

@Abdob
Copy link

Abdob commented Sep 23, 2020

For getting rid of the resource not available problem , it definately has to do with the usb drivers as libusb is complaining: disabling autosuspend seems to get rid of it:
echo "bash -c 'echo -1 > /sys/module/usbcore/parameters/autosuspend'" >> ~/.bashrc

@reinzor
Copy link

reinzor commented Apr 13, 2021

echo "bash -c 'echo -1 > /sys/module/usbcore/parameters/autosuspend'" >> ~/.bashrc

Did not work for us on x86

@MartyG-RealSense
Copy link
Collaborator

Hi @reinzor If you are using Jetson Nano, the link below leads to a librealsense installation guide that has worked consistently with Nano.

#6964 (comment)

@chrissunny94
Copy link

kernal upgrade seems to have fixed it for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants