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

Couldn't resolve requests in D435i #13596

Open
yizhixia666 opened this issue Dec 11, 2024 · 35 comments
Open

Couldn't resolve requests in D435i #13596

yizhixia666 opened this issue Dec 11, 2024 · 35 comments

Comments

@yizhixia666
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 { D435i }
Firmware Version 2.50
Operating System & Version Ubuntu20.04
Kernel Version (Linux Only) (e.g. 4.14.13)
Platform NVIDIA Jetson AGX Orin
SDK Version { 2.3.2 }
Language python
Segment Robot

Issue Description

<Describe your issue / question / feature request / etc..>
image
The realsense-viewer shows it is USB3.2, and it runs normally in it. “rs.stream.color” this line is normal, but “rs.stream.depth” is not normal. And I have tried many combinations of resolution and frame rate. Could you tell me how to work it out? Thank you very much!

@MartyG-RealSense
Copy link
Collaborator

Hi @yizhixia666 Does the error with the depth line still occur at 848x480 resolution if you set its FPS to the supported minimum of 6 instead of 60?

@yizhixia666
Copy link
Author

Hi @yizhixia666 Does the error with the depth line still occur at 848x480 resolution if you set its FPS to the supported minimum of 6 instead of 60?

Thanks for your reply! No matter what the resolution and the FPS is, the error is the same——"couldn't resolve requests". Now i can't find a correct way to run the code smoothly.

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Dec 11, 2024

What happens if you remove the word config from the brackets of the pipeline start line? The script should then ignore the config.enable_stream lines and apply the default stream configurations for depth and color that the camera is currently able to provide.

pipeline.start()

@yizhixia666
Copy link
Author

yizhixia666 commented Dec 11, 2024

After removing the word"config", the script has no error! Nothing outputs in the terminal!

@MartyG-RealSense
Copy link
Collaborator

The script code above can access the streams now, but cannot do anything useful with the streams.

There is a test script at the link below that you can use to make the program produce a visible on-screen output.

https://github.com/IntelRealSense/librealsense/blob/master/wrappers/python/readme.md#examples

@yizhixia666
Copy link
Author

yizhixia666 commented Dec 11, 2024

image
Sorry, the test script seems to produce an output above. Although I change the "is" to "==", nothing output. Is it possible to change the resolution and FPS of the stream?

@MartyG-RealSense
Copy link
Collaborator

Please try next the test script below and remove config again from the pipeline start brackets.

https://github.com/IntelRealSense/librealsense/blob/master/wrappers/python/examples/python-tutorial-1-depth.py

As the removal of 'config' from the brackets enables a script to work, this confirms that the problem is with the resolution / FPS defined in the config.enable_stream lines.

Yes you can set custom resolution and FPS with config lines. The code that you used in those lines is correct, but for some reason the camera is not supporting that configuration for the depth stream.

Does it make a difference if you unplug the micro-sized end of the USB cable from the side of the camera, turn the connector around the other way and re-insert it into the camera (USB-C cables are two-way insertion at the micro-sized end).

@yizhixia666
Copy link
Author

Thanks for your suggestion! I just tried the method you mentioned and even restarted the system. But once config is added to pipeline.line(), an error will be reported.

@MartyG-RealSense
Copy link
Collaborator

Please try inserting the block of Python code below at the line immediately before the pipeline start line to reset the camera with the hardware_reset() instruction to see whether your config lines will then work after the reset.

ctx = rs.context()
devices = ctx.query_devices()
for dev in devices:
dev.hardware_reset()

@yizhixia666
Copy link
Author

OK!I will get back for you in a few hours,thank you

@yizhixia666
Copy link
Author

Hi! It seems to be a new error like this: for dev in devices: RuntimeError: xioctl(VIDIOC_S_EXT_CTRLS) failed Last Error: Invalid argument

@MartyG-RealSense
Copy link
Collaborator

If programs run once the 'config' command is removed from the pipe start brackets then it suggests that your pyrealsense2 installation is okay and does not have an obvious fault.

It is not clear though why it is having problems with config instructions or with hardware reset.

Would it be possible for you to use the default stream configurations that are applied when config is not used? For a D435i that is 848x480 depth at 30 FPS and 1280x720 color at 30 FPS when on a USB 3 connection.

@yizhixia666
Copy link
Author

Can I understand that if I don't set config.enable_stream() and directly use pipeline.start(), it corresponds to the default stream configurations?

@MartyG-RealSense
Copy link
Collaborator

You are correct. If config instructions are not used then the default stream configurations are automatically used.

@yizhixia666
Copy link
Author

OK! I will test it in Windows 11 to see what the reason is. Thank you very much!

@yizhixia666
Copy link
Author

Hi! It is tested successfully in Win11.

@MartyG-RealSense
Copy link
Collaborator

Thanks very much for the confirmation of success in your Windows test!

@yizhixia666
Copy link
Author

In addition, I would like to ask whether the RGB image and depth map obtained by pyrealsense2 are aligned

@yizhixia666
Copy link
Author

Hi! I just tried the default stream configuration, and the aligned_depth_frame returned by the method aligned_depth_frame = aligned_frames.get_depth_frame() is None. It seems that everything related to depth will report an error. Is this related to the ARM architecture I am using?

@MartyG-RealSense
Copy link
Collaborator

RGB is not aligned with depth by default.

There are rare occasions when alignment does not work on Jetson, though that is usually in ROS rather than the pyrealsense2 wrapper.

If you test the SDK's example Python depth-color alignment script align_depth2color.py, is it able to provide an aligned image?

https://github.com/IntelRealSense/librealsense/blob/master/wrappers/python/examples/align-depth2color.py

@yizhixia666
Copy link
Author

yizhixia666 commented Dec 14, 2024

Unfortunately, align-depth2color.py is stuck in an infinite loop because of aligned_depth_frame=None. Is it possible to solve this problem by upgrading the version of librealsense?

@MartyG-RealSense
Copy link
Collaborator

The issues that you have been experiencing do not sound as though they are related to the librealsense version that you are using.

Do you know what your camera firmware driver version is, please? If librealsense 2.50.0 is being used then the firmware version that should be used with it is 5.13.0.50.

If you have access to the realsense-viewer tool then you can find the firmware version by clicking on the 'Info' option near the top of realsense-viewer's options side-panel. Another way is to use the command rs-enumerate-devices -s

If you can use realsense-viewer then you could also try resetting your camera's calibration to its factory-new defaults using instructions at #10182 (comment)

This factory reset also repairs any corruptions in a 'calibration table' stored inside the camera hardware, which can cause the camera to not work correctly if the table has become corrupted.

@yizhixia666
Copy link
Author

Unfortunately, align-depth2color.py is stuck in an infinite loop because of aligned_depth_frame=None. Is it possible to solve this problem by upgrading the version of librealsense?

Hi! Is there any other way to solve this problem?

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Dec 16, 2024

Assuming that the problem is not with the camera or the firmware driver since is works fine on Windows, sometimes when there is an apparently unsolvable problem it gets fixed if a complete wipe of the computer and reinstallation of everything (including Ubuntu) is performed. Doing this can suddenly fix a problem by removing hidden glitches in the operating system, kernel or the librealsense / pyrealsense2 installation that were causing the problem.

@yizhixia666
Copy link
Author

Well, anyway, thank you very much for your advice.

@yizhixia666
Copy link
Author

Hello, I just installed realsense-viewer version 2.55.1. Where does the stereo module display the depth map?

@yizhixia666
Copy link
Author

image
when I run "realsense-viewer" on the ternimal, it occurs errors above, how to solve it?

@MartyG-RealSense
Copy link
Collaborator

When realsense-viewer is working correctly, the depth should be displayed in the center panel when Stereo Module is enabled.

What method did you use to install realsense-viewer, please? Usually when librealsense is compiled from source code with CMake, it is installed by adding -DBUILD_EXAMPLES=True -DBUILD_GRAPHICAL_EXAMPLES=true to the CMake build instruction.

I would not recommend building realsense-viewer separately using its GitHub source code page.

https://github.com/IntelRealSense/librealsense/tree/master/tools/realsense-viewer

@yizhixia666
Copy link
Author

yizhixia666 commented Dec 21, 2024

I installed realsense-viewer through librealsense. If it is v2.55.1, I cannot view the depth image under “available streams”, only two infrared images. If it is v2.50.0, it will report the above error. But I used v2.50.0 before, and the function was normal. Is it related to the fact that I recently installed the opencv 4.5.5 with cuda?

@MartyG-RealSense
Copy link
Collaborator

If you are using librealsense 2.50.0 then your camera firmware driver should ideally be version 5.13.0.50. Is that the firmware that you currently have installed in your camera, please?

@yizhixia666
Copy link
Author

image
I don't know where to find the firmware version, because the "rs" command in the terminal will report an error.

@MartyG-RealSense
Copy link
Collaborator

We established earlier that the camera and firmware driver works fine on your Windows 11 computer and it is Ubuntu that has the problem.

Did you perform the wipe and complete reinstallation of your Ubuntu computer that I suggested earlier at #13596 (comment) please?

@yizhixia666
Copy link
Author

We can't reinstall the system

@MartyG-RealSense
Copy link
Collaborator

If the camera works on Windows and you can enable the depth stream in it, could you try resetting the camera to its factory-new settings using the instructions at #10182 (comment) please? As the adjustments made by the reset are saved to the camera hardware, you can take the reset camera back to your Ubuntu computer to test whether it has made a difference.

@yizhixia666
Copy link
Author

Uh! I will try this method, thanks

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