stage_ros clips ranger intensity values to a maximum value of 256
sloretz opened this issue · 1 comments
sloretz commented
The maximum intensity in a sensor_msgs::LaserScan coming from stage_ros is clipped to 256. The behavior comes from line 460 in stage_ros.cpp
msg.intensities[i] = (uint8_t)sensor.intensities[i];
By casting to a uint8_t it clips the maximum return of a ranger in stage to 256
Intensities can require more than 8 bits. Stage stores intensity values as doubles internally. On the output side the sensor_msgs::LaserScan message stores intensities as 32 bit floats. In reality the Hokuyo UTM-30LX returns 18 bit intensity values.