Skip to main content

Sharp

The Sharp node reads a GP2Y infrared rangefinder and publishes distance as a standard ROS2 Range message.

Range: ~10 cm to 80 cm

Configuration​

sharp:
enabled: true
sensors: ["side_ir"]
side_ir:
port: 22
frame_id: "side_ir_link"

Parameters​

ParameterDescription
portAnalog input channel (range 22 – 25)
frame_idTF frame ID included in the message header

Topics​

Published​

TopicTypeDescriptionRate
/<name>/rangesensor_msgs/RangeDistance in metres. Out-of-range readings published as inf.20 Hz

Service​

Service name: /<name>/sharp_cmd
Type: studica_control/SetData

CommandDescription
get_distanceDistance in centimetres