robotology / yarp-device-realsense2

realsense2 device for YARP (https://www.yarp.it/)
Other
8 stars 10 forks source link

Add support for D405 #40

Closed xEnVrE closed 1 year ago

xEnVrE commented 1 year ago

This makes some modifications to realsense2Driver::initializeRealsenseDevice(), realsense2Driver::setDepthResolution() and realsense2Driver::setRgbResolution() so that the D405 camera is supported.

The changes to realsense2Driver::setRgbResolution() and realsense2Driver::setDepthResolution() are probably desirable independently from the D405 as these methods should only change the configuration for the part they compete to, i.e. color and depth parameters respectively.

Fixes #39

cc @randaz81 @traversaro

xEnVrE commented 1 year ago

The PR has been converted to a draft as I would like to discuss the changes with @randaz81 first.

xEnVrE commented 1 year ago

Given the tests we have done and considering https://github.com/IntelRealSense/librealsense/issues/11784, I have decided to add a specific section in the README.md explaining how to properly configure the ini file to run the D405 camera.

xEnVrE commented 1 year ago

After the code review I made f2f also with @randaz81, we decided it was better to make more explicit the section with the exceptions for the D405 at the cost to have a bit more redundant code but more readable.

I pushed the changes.

A part from this, I am going to test the device after these changes with all the cameras we have next week and then I'll mark the PR as ready.

cc @Nicogene

xEnVrE commented 1 year ago

I tested the device with this PR changes, by visualizing both RGB and depth, on yarpview on the following devices:

Hence, I am marking this PR as ready.

traversaro commented 1 year ago

Sorry @xEnVrE, I forgot this. Can you add a line to the CHANGELOG.md for this change? Thanks! So we can do a release with this change.