ros2/common_interfaces

sensor_msgs/Range lacks variance field

ejalaa12 opened this issue · 4 comments

Hi,
As previously asked by @okalachev in the ros1 counterpart: ros/common_msgs#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.

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

Sure, I can open it.

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 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.