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

No device connected with .py file but Run in realsense-viewer #13666

Open
amaraashishmahatokushwaha opened this issue Jan 8, 2025 · 3 comments

Comments

@amaraashishmahatokushwaha

No device connected while running .py file


Required Info
Camera Model D455f
Firmware Version 5.16.0.1
Operating System & Version UBUNTU 22.04
Kernel Version (Linux Only) 5.15.136-tegra
Platform Jetson ORIN NANO
SDK Version 2.55.1

Issue Description

I installed sdk using libuvc_installation.sh . So it installed sdk version 2.22.1 ( i know while opening realsense-viewer) .
"""""""""""""I will list the problems""""""
1)Realsense-viewer works, but third option: motion module is not working
2) I installed pyrealsense2 using pip and when i run .py file such as to show depth images and all , in that it shows:
orin@orin-desktop:~/Downloads$ python3 main_collision.py
Traceback (most recent call last):
File "/home/orin/Downloads/main_collision.py", line 102, in
main()
File "/home/orin/Downloads/main_collision.py", line 97, in main
node = CollisionAvoidanceNode()
File "/home/orin/Downloads/main_collision.py", line 21, in init
self.pipeline.start(self.config)

RuntimeError: No device connected

I have gone through the issues and read all the solutions available such as using installation process steps using libuvc, insert cable fast in jetson( so that jetson detects as USB 3.2). But nothing works and solved my problem.

I tried to install realsense-ros from source from official documentation and when i run this launch file it shows:
orin@orin-desktop:~/ros2_ws$ ros2 launch realsense2_camera rs_launch.py
[INFO] [launch]: All log files can be found below /home/orin/.ros/log/2025-01-08-15-36-44-194901-orin-desktop-54617
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [realsense2_camera_node-1]: process started with pid [54618]
[realsense2_camera_node-1] [INFO] [1736330804.529719337] [camera.camera]: RealSense ROS v4.55.1
[realsense2_camera_node-1] [INFO] [1736330804.529903730] [camera.camera]: Built with LibRealSense v2.55.1
[realsense2_camera_node-1] [INFO] [1736330804.529941556] [camera.camera]: Running with LibRealSense v2.55.1
[realsense2_camera_node-1] [INFO] [1736330805.110539990] [camera.camera]: Device with serial number 311322301523 was found.
[realsense2_camera_node-1]
[realsense2_camera_node-1] [INFO] [1736330805.110748575] [camera.camera]: Device with physical ID 2-1.3-4 was found.
[realsense2_camera_node-1] [INFO] [1736330805.110776289] [camera.camera]: Device with name Intel RealSense D455F was found.
[realsense2_camera_node-1] [INFO] [1736330805.111187956] [camera.camera]: Device with port number 2-1.3 was found.
[realsense2_camera_node-1] [INFO] [1736330805.111220725] [camera.camera]: Device USB type: 3.2
[realsense2_camera_node-1] [INFO] [1736330805.111400606] [camera.camera]: getParameters...
[realsense2_camera_node-1] [INFO] [1736330805.111840594] [camera.camera]: JSON file is not provided
[realsense2_camera_node-1] [INFO] [1736330805.111880340] [camera.camera]: Device Name: Intel RealSense D455F
[realsense2_camera_node-1] [INFO] [1736330805.111904149] [camera.camera]: Device Serial No: 311322301523
[realsense2_camera_node-1] [INFO] [1736330805.111920086] [camera.camera]: Device physical port: 2-1.3-4
[realsense2_camera_node-1] [INFO] [1736330805.111933911] [camera.camera]: Device FW version: 5.16.0.1
[realsense2_camera_node-1] [INFO] [1736330805.111949112] [camera.camera]: Device Product ID: 0x0B5C
[realsense2_camera_node-1] [INFO] [1736330805.111962776] [camera.camera]: Sync Mode: Off
[realsense2_camera_node-1] [INFO] [1736330809.753840573] [camera.camera]: Set ROS param depth_module.depth_profile to default: 848x480x30
[realsense2_camera_node-1] [INFO] [1736330809.755065974] [camera.camera]: Set ROS param depth_module.infra_profile to default: 848x480x30
[realsense2_camera_node-1] [INFO] [1736330810.736623679] [camera.camera]: Set ROS param rgb_camera.color_profile to default: 1280x720x30
[realsense2_camera_node-1] [INFO] [1736330810.738904073] [camera.camera]: Set ROS param gyro_fps to default: 200
[realsense2_camera_node-1] [INFO] [1736330810.739067857] [camera.camera]: Set ROS param accel_fps to default: 100
[realsense2_camera_node-1] [INFO] [1736330810.744685046] [camera.camera]: Stopping Sensor: Depth Module
[realsense2_camera_node-1] [INFO] [1736330810.744887263] [camera.camera]: Stopping Sensor: RGB Camera
[realsense2_camera_node-1] [INFO] [1736330810.861979334] [camera.camera]: Starting Sensor: Depth Module
[realsense2_camera_node-1] [INFO] [1736330810.941118088] [camera.camera]: Open profile: stream_type: Depth(0), Format: Z16, Width: 848, Height: 480, FPS: 30
[realsense2_camera_node-1] 08/01 15:36:50,943 WARNING [281473178069216] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
[realsense2_camera_node-1] 08/01 15:36:50,955 WARNING [281473178069216] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
[realsense2_camera_node-1] 08/01 15:36:50,968 WARNING [281473178069216] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
[realsense2_camera_node-1] 08/01 15:36:50,979 WARNING [281473178069216] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
[realsense2_camera_node-1] 08/01 15:36:50,991 WARNING [281473178069216] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
[realsense2_camera_node-1] 08/01 15:36:51,003 WARNING [281473178069216] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
[realsense2_camera_node-1] 08/01 15:36:51,014 WARNING [281473178069216] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
[realsense2_camera_node-1] 08/01 15:36:51,026 WARNING [281473178069216] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
[realsense2_camera_node-1] 08/01 15:36:51,037 WARNING [281473178069216] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
[realsense2_camera_node-1] 08/01 15:36:51,048 WARNING [281473178069216] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
[realsense2_camera_node-1] [INFO] [1736330811.061088626] [camera.camera]: Starting Sensor: RGB Camera
[realsense2_camera_node-1] [INFO] [1736330811.101815639] [camera.camera]: Open profile: stream_type: Color(0), Format: RGB8, Width: 1280, Height: 720, FPS: 30
[realsense2_camera_node-1] [INFO] [1736330811.103957946] [camera.camera]: RealSense Node Is Up!
[realsense2_camera_node-1] 08/01 15:36:51,262 WARNING [281473178069216] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
[realsense2_camera_node-1] 08/01 15:36:51,273 WARNING [281473178069216] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
[realsense2_camera_node-1] 08/01 15:36:51,284 WARNING [281473178069216] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
[realsense2_camera_node-1] 08/01 15:36:51,397 WARNING [281473178069216] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
[realsense2_camera_node-1] 08/01 15:36:51,408 WARNING [281473178069216] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
[realsense2_camera_node-1] 08/01 15:36:51,419 WARNING [281473178069216] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
[realsense2_camera_node-1] 08/01 15:36:51,430 WARNING [281473178069216] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
[realsense2_camera_node-1] 08/01 15:36:51,543 WARNING [281473178069216] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
[realsense2_camera_node-1] 08/01 15:36:51,555 WARNING [281473178069216] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
[realsense2_camera_node-1] 08/01 15:36:51,566 WARNING [281473178069216] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
[realsense2_camera_node-1] 08/01 15:36:51,578 WARNING [281473178069216] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
[realsense2_camera_node-1] 08/01 15:36:51,589 WARNING [281473178069216] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
[realsense2_camera_node-1] 08/01 15:36:51,601 WARNING [281473178069216] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
[realsense2_camera_node-1] 08/01 15:36:51,612 WARNING [281473178069216] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
[realsense2_camera_node-1] 08/01 15:36:51,623 WARNING [281473178069216] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
[realsense2_camera_node-1] 08/01 15:36:51,634 WARNING [281473178069216] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
[realsense2_camera_node-1] 08/01 15:36:51,645 WARNING [281473178069216] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
[realsense2_camera_node-1] [WARN] [1736330811.864446984] [camera.camera]: XXX Hardware Notification:Motion Module force pause,1.73633e+12,Error,Hardware Error
[realsense2_camera_node-1] [WARN] [1736330811.864785367] [camera.camera]: Hardware Notification:Motion Module force pause,1.73633e+12,Error,Hardware Error

it shows long list of continuously Resources temporary unavailable, number 11.
and when i run with initial_reset:=true it shows:orin@orin-desktop:~/ros2_ws$ ros2 launch realsense2_camera rs_launch.py enable_sync:=true initial_reset:=true
[INFO] [launch]: All log files can be found below /home/orin/.ros/log/2025-01-08-15-43-02-966080-orin-desktop-63654
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [realsense2_camera_node-1]: process started with pid [63655]
[realsense2_camera_node-1] [INFO] [1736331183.303509028] [camera.camera]: RealSense ROS v4.55.1
[realsense2_camera_node-1] [INFO] [1736331183.303724300] [camera.camera]: Built with LibRealSense v2.55.1
[realsense2_camera_node-1] [INFO] [1736331183.303774797] [camera.camera]: Running with LibRealSense v2.55.1
[realsense2_camera_node-1] [INFO] [1736331183.871636191] [camera.camera]: Device with serial number 311322301523 was found.
[realsense2_camera_node-1]
[realsense2_camera_node-1] [INFO] [1736331183.871833094] [camera.camera]: Device with physical ID 2-1.3-4 was found.
[realsense2_camera_node-1] [INFO] [1736331183.871864423] [camera.camera]: Device with name Intel RealSense D455F was found.
[realsense2_camera_node-1] [INFO] [1736331183.872278677] [camera.camera]: Device with port number 2-1.3 was found.
[realsense2_camera_node-1] [INFO] [1736331183.872322071] [camera.camera]: Device USB type: 3.2
[realsense2_camera_node-1] [INFO] [1736331183.872348343] [camera.camera]: Resetting device...
[realsense2_camera_node-1] [INFO] [1736331190.585639020] [camera.camera]: Device with serial number 311322301523 was found.
[realsense2_camera_node-1]
[realsense2_camera_node-1] [INFO] [1736331190.585856723] [camera.camera]: Device with physical ID 2-1.3-4 was found.
[realsense2_camera_node-1] [INFO] [1736331190.585893204] [camera.camera]: Device with name Intel RealSense D455F was found.
[realsense2_camera_node-1] [INFO] [1736331190.586542218] [camera.camera]: Device with port number 2-1.3 was found.
[realsense2_camera_node-1] [INFO] [1736331190.586596108] [camera.camera]: Device USB type: 3.2
[realsense2_camera_node-1] [INFO] [1736331190.586812627] [camera.camera]: getParameters...
[realsense2_camera_node-1] [INFO] [1736331190.587517803] [camera.camera]: JSON file is not provided
[realsense2_camera_node-1] [INFO] [1736331190.587583438] [camera.camera]: Device Name: Intel RealSense D455F
[realsense2_camera_node-1] [INFO] [1736331190.587614639] [camera.camera]: Device Serial No: 311322301523
[realsense2_camera_node-1] [INFO] [1736331190.587641103] [camera.camera]: Device physical port: 2-1.3-4
[realsense2_camera_node-1] [INFO] [1736331190.587662832] [camera.camera]: Device FW version: 5.16.0.1
[realsense2_camera_node-1] [INFO] [1736331190.587684881] [camera.camera]: Device Product ID: 0x0B5C
[realsense2_camera_node-1] [INFO] [1736331190.587706962] [camera.camera]: Sync Mode: On
[realsense2_camera_node-1] [INFO] [1736331196.667130044] [camera.camera]: Set ROS param depth_module.depth_profile to default: 848x480x30
[realsense2_camera_node-1] [INFO] [1736331196.668412423] [camera.camera]: Set ROS param depth_module.infra_profile to default: 848x480x30
[realsense2_camera_node-1] [INFO] [1736331197.695812816] [camera.camera]: Set ROS param rgb_camera.color_profile to default: 1280x720x30
[realsense2_camera_node-1] [INFO] [1736331197.698458089] [camera.camera]: Set ROS param gyro_fps to default: 200
[realsense2_camera_node-1] [INFO] [1736331197.699306405] [camera.camera]: Set ROS param accel_fps to default: 100
[realsense2_camera_node-1] [INFO] [1736331197.706603835] [camera.camera]: Stopping Sensor: Depth Module
[realsense2_camera_node-1] [INFO] [1736331197.707866277] [camera.camera]: Stopping Sensor: RGB Camera
[realsense2_camera_node-1] [INFO] [1736331197.815615278] [camera.camera]: Starting Sensor: Depth Module
[realsense2_camera_node-1] [INFO] [1736331197.963839816] [camera.camera]: Open profile: stream_type: Depth(0), Format: Z16, Width: 848, Height: 480, FPS: 30
[realsense2_camera_node-1] 08/01 15:43:17,966 WARNING [281472292350176] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
[realsense2_camera_node-1] 08/01 15:43:17,978 WARNING [281472292350176] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
[realsense2_camera_node-1] 08/01 15:43:17,993 WARNING [281472292350176] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
[realsense2_camera_node-1] 08/01 15:43:18,005 WARNING [281472292350176] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
[realsense2_camera_node-1] 08/01 15:43:18,018 WARNING [281472292350176] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
[realsense2_camera_node-1] 08/01 15:43:18,030 WARNING [281472292350176] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
[realsense2_camera_node-1] 08/01 15:43:18,041 WARNING [281472292350176] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
[realsense2_camera_node-1] 08/01 15:43:18,052 WARNING [281472292350176] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
[realsense2_camera_node-1] 08/01 15:43:18,063 WARNING [281472292350176] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
[realsense2_camera_node-1] [INFO] [1736331198.076980996] [camera.camera]: Starting Sensor: RGB Camera
[realsense2_camera_node-1] [INFO] [1736331198.108841811] [camera.camera]: Open profile: stream_type: Color(0), Format: RGB8, Width: 1280, Height: 720, FPS: 30
[realsense2_camera_node-1] [INFO] [1736331198.111330535] [camera.camera]: RealSense Node Is Up!
[realsense2_camera_node-1] 08/01 15:43:18,585 WARNING [281472292350176] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
[realsense2_camera_node-1] 08/01 15:43:18,596 WARNING [281472292350176] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
[realsense2_camera_node-1] 08/01 15:43:18,607 WARNING [281472292350176] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
[realsense2_camera_node-1] 08/01 15:43:18,619 WARNING [281472292350176] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
[realsense2_camera_node-1] 08/01 15:43:18,632 WARNING [281472292350176] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
[realsense2_camera_node-1] 08/01 15:43:18,643 WARNING [281472292350176] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
[realsense2_camera_node-1] 08/01 15:43:18,655 WARNING [281472292350176] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
[realsense2_camera_node-1] 08/01 15:43:18,666 WARNING [281472292350176] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
[realsense2_camera_node-1] 08/01 15:43:18,677 WARNING [281472292350176] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
[realsense2_camera_node-1] 08/01 15:43:18,688 WARNING [281472292350176] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
[realsense2_camera_node-1] 08/01 15:43:18,699 WARNING [281472292350176] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
[realsense2_camera_node-1] 08/01 15:43:18,711 WARNING [281472292350176] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
[realsense2_camera_node-1] 08/01 15:43:18,722 WARNING [281472292350176] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
[realsense2_camera_node-1] 08/01 15:43:18,937 WARNING [281472292350176] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
[realsense2_camera_node-1] 08/01 15:43:18,948 WARNING [281472292350176] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
[realsense2_camera_node-1] 08/01 15:43:18,959 WARNING [281472292350176] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
5.16.0.1

even i am not able to read imu data and all. My main problem is to run .py file .

@MartyG-RealSense Thankyou for help in advance.

@MartyG-RealSense
Copy link
Collaborator

Hi @amaraashishmahatokushwaha Is the JetPack version that you are using with your Jetson and Ubuntu 22.04 JetPack 6 please? If it is then the IMU data may not be provided or the camera may not detect at all. This is because JP6 removed a function called hiddraw that RealSense cameras equipped with an IMU depend upon (as IMU-equipped RealSense cameras are known as HID devices).

Building the librealsense SDK from source code with the libuvc backend can provide IMU data in some cases but not always, as you found yourself when you performed a libuvc installation.

Another fix is to downgrade the JetPack version from JP6 to 5.13, though I understand that this may not be possible for Ubuntu 22.04 users.

A third method for adding IMU support on JP6 and a USB cable connection is to install the ** RealSense MIPI driver** at the link below, though it is a complicated procedure.

https://github.com/IntelRealSense/realsense_mipi_platform_driver

Sometimes ROS topics will publish normally in RViz despite control_transfer returned warnings generating continuously in the log. Is the IMU data viewable in RViz, please? I note that you have the Motion Module Force Pause error in your log though, in which the streaming of the IMU data fails and cannot be recovered during that particular launch session.


In regard to installing pyrealsense2 with the pip install pyrealsense2 method, this usually does not work with Jetson boards and it is recommended that the pyrealsense2 wrapper is compiled from source code on Jetson instead.

Does your Python script run if you launch it in sudo admin powers mode with sudo python3 main_collision.py

@amaraashishmahatokushwaha
Copy link
Author

Hi @MartyG-RealSense ,
Thank you for your faster response and well detailed explanation. Can you attached the link for installing pyrealsense2 wrapper for ubuntu22.04 for jetson Oirn nano. And while running using sudo python3 main_collision.py it shows error like there is no rclpy found or installed and i have tried installing rclpy in root but i didn't achieve. so using this sudo seems doesn't works. and my last question is would you recommend to install MIPI driver using third method you suggest?
Thank you again.

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Jan 9, 2025

The buildLibealsense.sh build script provided at the JetsonHacks website may work well for you, as it builds the librealsense SDK with CUDA support on Jetson and compiles the pyrelsense2 wrapper at the same time.

https://github.com/JetsonHacksNano/installLibrealsense/tree/master

If you are able to install the MIPI driver then it is the optimal solution for providing IMU support on JetPack 6. Due to the complexity of the installation procedure though, if you require advice about it then I recommend posting a question at the official support page for the driver.

https://github.com/IntelRealSense/realsense_mipi_platform_driver/issues

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

No branches or pull requests

2 participants