-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
failed to set power mode when running realsense d4xx on the jetson orin nano #13686
Comments
Hi @stevedanomodolor For the Jetson Nano board, Intel strongly recommend enabling the barrel jack power connector for extra power by following instructions at the link below. I assume that the same power recommendation is applicable to the Orin Nano model's barrel jack. https://jetsonhacks.com/2019/04/10/jetson-nano-use-more-power/ |
I am using the Jetson orin nano see https://developer.nvidia.com/embedded/learn/get-started-jetson-orin-nano-devkit, would it be enough just to get a power supply with 5v 4A?. In this case the step to enable the barrel connector isn't necessary right? |
In theory it sounds reasonable, though I do not know if it would work in practice. You could try setting your Orin Nano to MAXN power mode, where power supply is unrestricted, to see whether it enables both sensors to be enabled simultanously. https://www.jetson-ai-lab.com/initial_setup_jon.html#switch-to-maxn-mode |
I am actually on MAXN. Adding more logs for more context. This is the dmesg from when I connect the camera and when it crashes.
This is the exact location where it gives the exceptions
I dont know if this is the ideal way of using the pyrealsense2 library but i call the function often to know the state of the camera. To see if the camera is connected and when I setup the the color and depth sensor is when I start getting this runtime exceptions. Is this function meant to be called that often?
|
Calling a function frequently increases the risk of something going wrong in the program if the camera does not respond in time. A 'right' way to test the connection would be to use an instruction called set_devices_changed_callback to listen for camera connection and disconnection events. Code for doing this in pyrealsense2 is discussed at #4212 with a script provided at #4212 (comment) |
Since i dont call the context get query constantly and use the callback you mentioned, I have not gotten that error. Now I noticed that I get another error when I try to configure the visual preset on the depth sensor. I read the visual present range and set it to the maximum.
This is the the dmesg error
|
#10014 has a demonstration of configuring a visual preset on Python that you can compare to your own code.
|
It works but sometimes the setting fails. Not sure why is happens. |
Did you build librealsense from source code with the -DFORCE_RSUSB_BACKEND=true flag, please? If you did, then a RSUSB backend build of the SDK will sometimes not be ready to respond when a request is made to change a setting with SET_OPTION. #6952 is an example of this issue. If librealsense is built with the 'native' method (RSUSB = false and a patch script applied to the kernel) then the SDK responds faster and more reliably to option setting requests. |
Thank you again for the fast response. I really appreciate it. |
If you have an Orin model of Jetson with JetPack 6 then the 'native' kernel-patching method of librealsense installation will not work according to the official instructions for a native build with kernel patching on Jetson. Instead, the instructions recommend installing using the RealSense MIPI driver on an Orin with JP6, a link to which is in those instructions. |
Thank you for the response so far. Really insightfull |
I am connected to a realsense d4xx camera and i am trying to run the depth sensor and the color sensor at the same time. I noticed that after setting both camera and opening it, i get the following exception using the pyrealsense2 python library “failed to set power state”
I am using a power supply that is 5v and 2.3 A. It seems to happens only when i try to set both camera sensor, It happens always on the “device = device_list[selected_ind]” line of the following code of pyrealsense. Is this a power issue?.
i am running the latest jetpack 6.1 super on max mode and I also did the jetson_clock.
context = rs2.context()
device_list = context.query_devices()
if len(device_list) > 0:
selected_ind = 0
device = device_list[selected_ind]
usb_descriptor = device.get_info(rs2.camera_info.usb_type_descriptor)
if “3.2” in usb_descriptor:
return 2
else:
return 1
else:
return 0
The text was updated successfully, but these errors were encountered: