-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot call IRGBDSensor::getRgbResolution() when using a gazebo_yarp_camera plugin #670
Comments
Which device are you using for opening the |
I am using RGBDSensorClient just because I was used to do that on the real robot. Version of YARP is |
Sorry, last question, which model are you using for simulation? Which gyp version? |
Probably in https://github.com/robotology/yarp/blob/65a3a508c0b5147bdf5106ac173370382486004e/src/devices/framegrabber_protocol/yarp/proto/framegrabber/RgbVisualParams_Responder.cpp#L30 ? Did you checked if gazebo prints that error? |
I checked but the error is not there. Moreover, some of the other calls are actually working, e.g., I am getting the correct answer for and I am also testing them without C++ using I can get the yarp rpc /ergocubSim/depthCamera/rpc:i
visr get w and I get Response: [visr] [w] [is] 640 However, if I try to get the resolution yarp rpc /ergocubSim/depthCamera/rpc:i
visr get res I get Response: [fail]
|
Looking at the code it seems that @randaz81 are |
Isn't that because there is an extra layer made by the |
Yes, you are right, but then under the nws the device does not implement the |
I am trying to retrieve the resolution of a camera running in simulation from a robot using the
gazebo_yarp_camera
plugin.I am connecting to the camera with a
PolyDriver
using theIRGBDSensorInterface
.While the calls
IRGBDSensor::getRgbWidth() -> int
andIRGBDSensor::getRgbHeight() -> int
return the correct values, the methodIRGBDSensor::getRgbResolution(int&, int&) -> bool
always returnfalse
.After a bit of investigation, it seems that the rpc responder responsible for that call is calling
getRgbResolution
on ayarp::dev::IRgbVisualParams
instance whose default implementation is toreturn false
- and that method is not pure virtual, hence it might be that the simulation plugin is not re-implementing that call (but I might be wrong as I am not really an expert on client/server architectures of rgb devices in YARP).What I noticed is that the
gazebo_yarp_camera
plugin, more specifically theGazeboYarpCameraDriver
class is inheriting fromyarp::dev::IFrameGrabberImage
. The latter interface has, among others, two methodsheight()
andwidth()
.I could not reconstruct the missing path from
IFrameGrabberImage
to theIRgbVisualParams
unfortunately. Is anyone willing to clarify this connection? Am I using the wrong device interfaceIRGBDSensorInterface
to connect to a simulated camera or is the plugin missing the implementation of some methods / interfaces?I am available for a PR in case someone could help understand the missing links :)
cc @traversaro
The text was updated successfully, but these errors were encountered: