Closed valegagge closed 5 years ago
Thanks.
Several remarks/questions that come to my mind:
I would suggest to use more generic names for the cameras, like depthCamera
instead of xtion
and stereoCamera
instead of cam/cameras:o
.
Mainly since the Xtion is only used on the R1-mk1 while R1-mk2 uses a RealSense (and at some point we should probably provide two separate cer.sdf
files for the different versions of R1).
Also are you sure about the ports that are available after your changes? Tell me if I'm wrong, but I think you should have: /SIM_CER_ROBOT/rgbImage:o ==> should not exist anymore /SIM_CER_ROBOT/xtion/rgbImage:o ==> stream of xtion rgb image /SIM_CER_ROBOT/xtionrgb/cameras:o ==> another stream of xtion *rgb image (seems redundant with the previous one, see remark below?) /SIM_CER_ROBOT/cam/cameras:o/rpc ==> awful name of rpc of Leopard cameras /SIM_CER_ROBOT/xtion/rpc:i ==> rpc port of xtion /SIM_CER_ROBOT/cam/cameras:o ==> stream of stereo images (Leopart cameras?) /SIM_CER_ROBOT/xtion/depthImage:o ==> stream of xtion depth map
Actually I don't know what is the purpose of gazebo_cer_xtion_camera_rgb.ini
since the rgb of the Xtion is already modeled by the RGBDSensorWrapper in gazebo_cer_depthCamera.ini
.
I'm agree with you, the name are not appropriate completely. I prefer to use rgbd or multicamera instead of depth camera because it seems only depth stream. As suggested me @barbaalberto, we can use something similar in the real robot. Asap I'll che the names, now I'm answering by my phone.
About the ports: /rgb:o is the output of rgb stereo cameras(leopard), while /xtionrgb is the output rgb of xtion(rgbd camera).
About you RGBDSensorWrapper you ate right, but I think gazebo needs to simulate the three cameras sensors in separate way: stereo cameras, depth and rgb. Even if we are used to think rgbd like one sensor, it is composed by two distinct sensos: rgb and depth. Maybe i'wrong ...we can get more in detail...
In this commit I updated the port name taking into account names used in R1 real robot configuration files.
Recap on gazebo we have the stereo camera simulated with multicamera
and GrabberDual
wrapper that opens these output port
and a depth camera. On real robot it is configured like a unique sensor and use the wrapper RGBDSensorWrapper that opens two port /depthCamera/depthImage:o and /depthCamera/rgbImage:o to stream depth and rgb images rispectively.
In Gazebo, in the sdf file of R1, the depth camera is composed by two sensor, simulated by two plugin and two wrapper: the depth uses RGBDSensorWrapper
and libgazebo_yarp_depthCamera
plugin, while rgb needs libgazebo_yarp_camera
and grabber
wrapper. Defining two sensors for the depth camera envolves in get one redoundant port:
So /
I'm not sure this is the correct motivation, so I'd like to ask to @randaz81 end/or @traversaro more explanation.
I have limited experienced with R1, so I can not be of a big help in this case. : (
Let me add @barbalberto and @Nicogene in the loop since they developed the driver of the real sensor.
In this PR I updated the configuration files of cameras in order to fix following errors: 1) address conflict: the wrappers of the multicamera and xtion camera rgb open the port with the same name: Port /SIM_CER_ROBOT/cam/cameras:o active at tcp://10.240.11.23:10006/ 2) use older version of device grabber: updated with GrabberDual 3) the RGBDSensorWrapper opened a port rpc called SIM_CER_ROBOT/rpc: the name is not clear.
Now the following ports are available: /SIM_CER_ROBOT/rgbImage:o ==> stream of Leopard cameras /SIM_CER_ROBOT/xtion/rgbImage:o ==> stream of xtion rgb image /SIM_CER_ROBOT/xtionrgb/cameras:o ==> stream of xtion depth image /SIM_CER_ROBOT/cam/cameras:o/rpc ==> awful name of rpc of Leopard cameras /SIM_CER_ROBOT/xtion/rpc:i ==> rpc port of xtion
Moreover note that there is the following error:
This error is not correct, because the view is done on the wrapper instead of on device; so I propose to open an issue to fix it.
Thanks to @barbalberto for his help!