Skip to content

Cannot use setFeature() with RGBDSensorClient in yarp-3.12.1 #3304

Description

@SimoneMic

Describe the bug
When using the interface from RGBDSensorClient, it's not possible to change the camera parameters using the function: setFeature.
The goal is to change camera gain, exposure and hue, to compensate for eventual light conditions.

The funcion setFeature initially returns true. However, if the same code is ran using the python interpreter via console, this error appears asynchronously after some seconds: [ERROR] |yarp.os.impl.DgramTwoWayStream| *** 14 datagram packet(s) dropped - checksum error ***.
While viewing the camera output with a YarpView we see no changes in the camera rgb image.

In yarp 3.10 the same code was running fine, changing the camera output at runtime.

To Reproduce
Steps to reproduce the behavior:
0) Have a realsense device on a machine with yarp-devices-realsense2, with a running device in the like of this YRI.

  1. Run this python code:
import yarp
 
props = yarp.Property()
props.put('device', 'RGBDSensorClient')
props.put('localImagePort', '/RealsenseGUI/rgbImage:i')
props.put('localDepthPort', '/RealsenseGUI/depthImage:i')
props.put('localRpcPort', '/RealsenseGUI/rpc:i')
 
props.put("remoteImagePort", "/depthCamera/rgbImage:o")
props.put("remoteDepthPort", "/depthCamera/depthImage:o")
props.put("remoteRpcPort", "/depthCamera/rpc:i")
 
driver = yarp.PolyDriver(props)
iface = driver.viewIFrameGrabberControls()
 
iface.setFeature(yarp.YARP_FEATURE_GAIN, 1.0)
 

note: both machine must have the same yarp-3.12.1

Expected behavior
In yarp-3.10 we were able to set the camera parameters properly.

Screenshots
none

Configuration (please complete the following information):

  • OS: Ubuntu 22.04
  • yarp version: 3.12.1
  • compiler: Python package installed conda

Additional context
The issue happened when upgrading from yarp 3.10 to 3.12 on ergoCubSN002 robot.
cc @andrearosasco

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions