Add dinrail-camera and dinrail-camera-components and camera-related interfaces and fake device #75
All Vouch review confidence checks passed
Residual risk 0.21 = Change Risk (0.40) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.40 · 303 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.342
Real PR Conversation Timeline
1 comments
"Review active on #75"
general
weight: 0.35
traversaro
This PR introduces the camera interfaces needed to migrate
yarp-device-realsense2to dinrail, together with a configurable fake camera and bidirectional YARP adapters, following #69 and #71.The interfaces use
cv::Matfor images and are provided by a separatedinrail-cameralibrary, keeping OpenCV out of corelibdinrail(mantained insrc/core). They cover framegrabber controls, raw images, RGBD acquisition and RGB/depth visual parameters, with corresponding simulation interfaces.The native
dr_camera_fakedevices supports bothframegrabber(2D camera) andrgbd(3D/Depth cameras) modes through a single device. Images and acquisition stamps can be supplied through simulation interfaces. An optionaltest_patterngenerates a diagnostic chart with the machine’s current local time:<img width="640" height="480" alt="test" src="https://github.com/user-attachments/assets/7469cd8b-678f-4b12-836f-e2c0d5671734" />
~~~cxx
dinrail::Parameters config;
config.put("device", "dr_camera_fake");
config.put("mode", "framegrabber");
config.put("test_pattern", true);
dinrail::Device device;
device.open(config);
dinrail::IRGBDSensor camera = nullptr;
device.view(camera);
cv::Mat image;
camera->getRgbImage(image);
~~~
The YARP interop plugin registers adapters in both directions. The native fake is also installed as a YARP device, exposing the usual camera interfaces:
~~~cxx
yarp::os::Property config;
config.put("device", "dr_camera_fake");
config.put("mode", "framegrabber");
config.put("test_pattern", true);
yarp::dev::PolyDriver driver(config);
yarp::dev::IFrameGrabberImage camera = nullptr;
driver.view(camera);
yarp::sig::ImageOf<yarp::sig::PixelRgb> image;
camera->getImage(image);
~~~
Image conversions preserve RGB channel order, acquisition stamps and independent output storage. They run serially without changing OpenCV’s process-wide thread configuration, and reuse buffers to avoid allocations after warmup at a fixed resolution. The adapters do not use any OpenCV or YARP_cv function in the conversion, as that would prevent avoid creating new threads or allocating dynamic memory at each conversion.
The example in
examples/yarp-run-dinrail-camera-as-yarp-camera/usesdinrail-runnerto publish images throughframeGrabber_nws_yarpand display them withyarpview, comparingdr_camera_fakewith YARP’sfakeFrameGrabber.