choreonoid / choreonoid_ros

ROS package to use Choreonoid as a ROS node
12 stars 12 forks source link

Modified publish data type #15

Open Hiroaki-Masuzawa opened 1 year ago

Hiroaki-Masuzawa commented 1 year ago

By this PR, modify publish data. The below tables are showed current and modified publish data for each camera setting.

Current Datatype COLOR DEPTH COLOR_DEPTH POINT_CLOUD COLOR_POINT_CLOUD
Color image
Depth image          
Point cloud      
Color point cloud      
Modified Datatype COLOR DEPTH COLOR_DEPTH POINT_CLOUD COLOR_POINT_CLOUD
Color image      
Depth image      
Point cloud      
Color point cloud      

related to #11.

ssr-yuki commented 1 year ago

Thank you for contribution.

The development team will have a meeting next week and discuss this changes. We are now careful about this PR because it breaks the backward compatibility in publishing color images. Please wait for our decision.

ssr-yuki commented 1 year ago

We had a development meeting yesterday, and we concluded that the modifications should satisfy the following table:

Published data / FORMAT in Body files COLOR DEPTH COLOR_DEPTH POINT_CLOUD COLOR_POINT_CLOUD
Color image x x X X
Depth image x x
Point cloud x x
Color point cloud x x

Your changes to the DEPTH and COLOR_DEPTH formats are correct and now approved.

The difference between our conclusion and your proposal is whether or not we allow BodyROS to publish colour images with cameras whose formats are either POINT_CLOUD or COLOR_POINT_CLOUD. Although removing this publication is easy, it is not a good choice. The following reasons support our conclusions in the table above.

  1. The removal lacks backward compatibility.
  2. The removal requires us to write multiple camera descriptions for one camera in model files if we want to publish both color images and point clouds. For example, a combination of object recognition and localization requires them. (Color images are used for neural-network based recognizer, and point clouds are used to estimate positions of recognized objects.) Such multiple descriptions decrease the readability of robot descriptions. Therefore, BodyROS should have greater capability.
  3. Even if BodyROS continues to support colour image publication, computational costs can be minimised. This is because of #8 and #12.
Hiroaki-Masuzawa commented 1 year ago

Thank you for your consideration of this PR. I have revised it in accordance with your comment.

Currently, when using the COLOR_POINT_CLOUD settings, the color images that can be retrieved are non-organized images, i.e., 1xN shape images, as well as depth images. And, when using the POINT_CLOUD settings, the color images that can be retrieved are zero pixels. Is there any way to get an organized image?