-
Notifications
You must be signed in to change notification settings - Fork 10
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
Support the RealSense D405 #39
Comments
After further investigation, I discovered that:
After this change, the output of the test executable is the same obtained using the YARP device, which seems wrong according to the output of the portmonitor. Then might it just be that the portmonitor is clipping out too near values? I also made a test with the same scene and compared with the realsense-viewerYARP device |
Indeed, it is the case: At this line https://github.com/robotology/yarp/blob/51292e3a53ebb6a1198913d41ce54d25082accb7/src/portmonitors/depthimage_to_rgb/DepthImage2.cpp#L52 |
After changing that, we now get the expected depth map in the viewer: To recap, I think we could get the D405 up and running with the YARP device by making the initialization of the RGB parameters optional, as described in #39 (comment). |
Great, feel free to open a PR, thanks! |
This morning I had a chat f2f with @Nicogene and we think we have found a good compromise without changing the format of the configuration file at all and making few changes in the code. I will open a PR next days. |
I opened a PR in #40. |
Last week @fedeceola made some tests with the He noticed that there is something wrong with the RGB/Depth alignment: We are going to further investigate this and update the PR accordingly. |
Hi @xEnVrE, this happens one of the two sensor uses a resolution that is not native. For this reason, there is the parameter |
Hi @Nicogene, the alignment has been activated using |
Maybe it is worth to try also |
Thanks for the suggestion @Nicogene. Yep, we could also try to understand which mode is used inside the I always assumed that we wanted to align against the |
I finally had time to come back to this. It seems that the test_rs_alignment.mp4In practice, it seems that the streams from the camera are already aligned. Instead, enabling the alignment from the I checked with other resolutions, e.g. Maybe the D405 does the alignment in hardware or, its nature, i.e. the fact the RGB camera is "coaxial" with the depth sensor, implies that it does not require alignment? I might consider opening an issue on the For the time being, we might support completely disabling the alignment within this device, so that the user might configure the device properly when using a |
Done in IntelRealSense/librealsense#11784 They stated that "The D405 camera model does not have a separate RGB sensor component and RGB is instead provided by the depth sensor. This means that RGB is already in alignment with the left IR sensor that depth originates from." |
You can add a warning if |
Given that |
Good idea! |
At the moment the
yarp-device-realsense2
does not support the short-range RealSense D405 camera.The main reason is that this camera only exposes a depth sensor, i.e. in the following for cycle
yarp-device-realsense2/src/devices/realsense2/realsense2Driver.cpp
Lines 599 to 612 in d4da73f
only the depth sensor pointer
m_depth_sensor
gets initialized (while for the D415, D435 and D455 also them_color_sensor
gets initialized).Despite the fact that it only has a depth sensor, in terms of the internal Intel device enumeration, Intel still provides a proper RGB stream - i.e. it is fully supported for this camera.
At the moment, the driver calls the following method eventually:
yarp-device-realsense2/src/devices/realsense2/realsense2Driver.cpp
Line 638 in d4da73f
which fails at this line
yarp-device-realsense2/src/devices/realsense2/realsense2Driver.cpp
Line 757 in d4da73f
because
yarp-device-realsense2/src/devices/realsense2/realsense2Driver.cpp
Lines 865 to 868 in d4da73f
m_color_sensor
is not initialized.Nonetheless, the code is made in a way such that, if we could make the initialization of the RGB paramters part optional, the initialization completes successfully (as there is no need for setting the resolution parameter for the RGB device, as it does not exist!).
I tried commenting the part - that we should make optional - and I got this:
While the RGB part is ok, the depth is clearly wrong as we get invalid values for small box on the table.
I know that it is wrong also because I have a tiny C++ executable that I use for testing RealSense cameras which produce this totally different result:
which makes more sense as the D405 can produce reasonable depth maps for object as near as 7 cm (although I am not sure about the color being so different!).
We should better investigate what the code does within the YARP device and understand if we are making any configuration that is maybe not compatible with the D405.
cc @Arya07 @fedeceola @randaz81 @Nicogene
The text was updated successfully, but these errors were encountered: