Repository navigation
Add RGBD sensor interfaces and YARP network wrappers - #92
Closed
isorrentino wants to merge 4 commits into
Closed
isorrentino wants to merge 4 commits into
isorrentino wants to merge 4 commits into
Conversation
…host Add dinrail::IRGBDSensor and dinrail::ICameraControls with non-blocking getters, including getImagesStamp() to detect new images without copying them, and support for sensors that stream only depth images. Add the dr_rgbd_nws_yarp and dr_rgbd_nwc_yarp network wrappers, which use the protocol of the YARP rgbdSensor_nws_yarp so that the standard YARP clients (RGBDSensorClient, yarpview) are still compatible, the dr_rgbd_fake device and the YARP adapters of the new interfaces. Add the dr_device_yarp YARP device, which opens any dinrail device so that network wrappers can be attached to it: dinrail-aware wrappers use the native interfaces through dinrail::IWrappedDinrailDevice, and the inertial sensors are exposed to multipleanalogsensorsserver. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The files were kept with the formatting of YARP, which fails the format-check task of the CI. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The YARP_DATA_DIRS of the tests used ':' as separator, which does not work on Windows. As the other tests of the YARP devices, the plugins are now found in the installation prefix, and the dinrail devices next to the dinrail library. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
PolyDriver::close() destroys the device, so reading its gyroscopes after closing it was a use after free, which crashed the test on macOS and Windows. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
Author
|
After a face-to-face discussion with @S-Dafarra, Stefano requested not to proceed with the merge, in order not to introduce new interfaces to read the RealSense. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR description
This PR adds RGB-D camera support to dinrail. It adds two native interfaces, dinrail::IRGBDSensor and dinrail::ICameraControls, with getters that never block. It adds a YARP server and client pair that speak the same protocol as YARP's rgbdSensor_nws_yarp, a fake RGB-D device for tests, and a generic dr_device_yarp host. That host lets any dinrail device, such as the new RealSense device, be used with YARP network wrappers.
Add RGBD sensor interfaces, network wrappers and generic YARP device host
What this PR does
Core interfaces (
src/core)dinrail::IRGBDSensorgetImagesStamp()lets a caller check for new images without copying them.FailedPrecondition.dinrail::ICameraControls: camera feature controls.IRGBDSensorSimulation: lets fake devices set the images and the status.CameraTypes:Image,DepthImage,CameraIntrinsics,CameraExtrinsics.Devices
dr_rgbd_fake: a fake RGB-D sensor.YARP network wrappers (
src/yarp-devices)dr_rgbd_nws_yarp(server)<name>/rgbImage:oand<name>/depthImage:o, and serves<name>/rpc:i.rgbdSensor_nws_yarp, soRGBDSensorClientandyarpviewkeep working.getImagesStamp()and publishes only when there are new images. It only publishes on ports that have at least one connection.periodparameter only limits the delay the wrapper adds; it does not need to match the camera framerate.dr_rgbd_nwc_yarp(client)dinrail::IRGBDSensoron the client side.frame_timeoutsets theTimeoutstatus when depth images stop arriving.dr_device_yarp(generic YARP host for any dinrail device)subdeviceparameter.dinrail::IWrappedDinrailDevice. Wrappers that know about dinrail then use its native interfaces directly, without converting to YARP types.multipleanalogsensorsserver.RgbVisualParams,DepthVisualParamsandFrameGrabberControls, plus the camera vocabs.YARP interop (
src/yarp)YarpRGBDSensorAdapters), registered inYarpInteropPlugin.IWrappedDinrailDevice.Block diagram
Alternative without the IMU:
dr_rgbd_nws_yarpwith<param name="subdevice"> realsense </param>opens the dinrail device directly. Example XML configurations are in the READMEs ofdr_device_yarpanddr_rgbd_nws_yarp.Motivation and testing on the robot
The goal is to stop using the YARP
realsense2device and use the new native dinrail device gbionics/gb-dinrail-device-realsense2 instead.This PR was tested on the robot with that device. The setup was
dr_device_yarpwithsubdevice = realsense, attached to:dr_rgbd_nws_yarp, which published the color and depth images;multipleanalogsensorsserver, which published the camera IMU.On the client side, the images were received with both
dr_rgbd_nwc_yarpand the standard YARP tools (RGBDSensorClient,yarpview). This confirms that existing YARP consumers still work after the switch.