robotology / yarp-device-realsense2

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

Change YARP_PLUMB_BOB to YARP_DISTORTION_NONE when there is no distortion #10

Closed ste93 closed 2 years ago

ste93 commented 3 years ago

As happen in ros when the device has no distortion (all d400 cameras has no distortion) the returned distortion is plumb_bob, while we can change it to YARP_DISTORTION_NONE since we have it (ros doesn't support it),

ste93 commented 3 years ago

this is related to https://github.com/robotology/yarp-device-realsense2/issues/11, after a little research I found that in realsense d400 serie the image is undistorted and the device can be calibrated (https://www.intel.com/content/dam/support/us/en/documents/emerging-technologies/intel-realsense-technology/RealSense_D400%20_Custom_Calib_Paper.pdf). The distortion model returned can be useful for a check if someone needs it and if the calibration is not perfectly correct. In our case I think is not useful since the images are already undistorted and for now we don't need to calibrate or check the calibration of any camera. So I suggest to put all the images taken from a d400 camera to undistorted (I don't know actually if the model can be queried but I suppose that it can) while the other maybe can be managed as before.

traversaro commented 3 years ago

So I suggest to put all the images taken from a d400 camera to undistorted (I don't know actually if the model can be queried but I suppose that it can) while the other maybe can be managed as before.

To check that can't we use the same trick used in https://github.com/robotology/yarp-device-realsense2/pull/9 to set the image as undistorted if the parameter are zero or use the appropriate distortion model otherwise?

ste93 commented 3 years ago

To check that can't we use the same trick used in #9 to set the image as undistorted if the parameter are zero or use the appropriate distortion model otherwise?

I don't know. I've done some tests also with the d455 on R1 and the camera returns the distortion model that is present inside it that has parameters different from 0 unfortunately. I think the best way to support all the models is to check the model itself, otherwise we can do like https://github.com/robotology/yarp-device-realsense2/pull/9 but I don't know if we support any camera different from d400 serie that is distorted (if the only other camera is t265 then it would be ok to set all to undistorted because it is not sent the distortion if I remeber well). If only d400 cameras are supported than it would be ok to do like this.

ste93 commented 3 years ago

related to https://github.com/robotology/yarp/issues/2544

traversaro commented 2 years ago

In https://github.com/robotology/yarp-device-realsense2/pull/26 @ste93 wrote:

also related to #10, maybe is better to put distortion none?

For me it does make sense to do so, if we check that the paremeter are equal to zero it make sense to specify that the image is undistorted. Any opinion on this @xEnVrE @Nicogene @prashanthr05 @HosameldinMohamed ?

xEnVrE commented 2 years ago

I agree. If the image is already undistorted, the user would probably like to know it.

ste93 commented 2 years ago

I don't know if anyone other is using this feature @S-Dafarra @Arya07 @MariaLombardi @FedericoVasile1 what do you think?

ste93 commented 2 years ago

fixed in #26