Interfacing ultrasonic sensor HC-SR04
I'm doing it with raspberry pi2 with ros indigo. I referred link text this one for the message type. My sensor measures upto 3metre. I would like to restrict its range to 1metre. I decided to assign 0.03metre to min range and 1metre to max range. I don't know how to assign the field of view. For range it is mentioned that the values outside the min and max range should be discarded. Does it mean if the value doesn't fit into the min and max range, i should not publish that range value? If i didn't publish the range, it assumes that the obstacle is out of range?
Just clip the range value, e.g. if range > max_range: range=max_range The field of view is a problem, see question #219218