common_interfaces icon indicating copy to clipboard operation
common_interfaces copied to clipboard

sensor_msgs/Range lacks variance field

Open ejalaa12 opened this issue 2 years ago • 2 comments

Hi, As previously asked by @okalachev in the ros1 counterpart: https://github.com/ros/common_msgs/issues/142

All the sensor related messages have variance/covariance field: FluidPressure, Illuminance, Imu, MagneticField, NavSatFix, RelativeHumidity, Temperature; while Range lacks it.

Though rangefinders' datasheets often provide such information, and it can be quite useful for the consumers of rangefinder drivers.

Is it something that you would consider for ros2 as well ?

Thank you.

ejalaa12 avatar Mar 16 '22 19:03 ejalaa12

Yes, if a PR were provided I think we would consider it.

gbiggs avatar Mar 16 '22 22:03 gbiggs

Sure, I can open it.

ejalaa12 avatar Mar 17 '22 09:03 ejalaa12

Why 0 is interpreted as variance unknown? Wouldn't it be better using NAN for that?

I mean, the variance can be equal to zero, if this is an absolute precise (ideal) data, like from a simulation.

okalachev avatar Mar 16 '23 03:03 okalachev

@okalachev That's the convention for all other messages. This is defined in ROS Rep-145 Another reason why I believe nan might not be a good idea, is that It can break computation in other nodes, if they don't safe check for nans.

ejalaa12 avatar Mar 16 '23 08:03 ejalaa12