Skip to content

Mavros rangefinder

ROS / ros eco / packages / mavros

Plugin

mavros_extra rangefinder

mavlink mavros topic(message)
RANGEFINDER (173) rangefinder (sensor_msgs/msg/Range)

Ardupilot message

Ardupilot send mavlink message Rangefinder (173) There is a plugin in that handle this message mavros_extra.rangefinder

set message interval
ros2 service call /mavros/set_message_interval mavros_msgs/srv/MessageInterval "{message_id: 173, message_rate: 1.0}"

Simulate

Config SITL to simulate RangeFinder

1
2
3
4
5
RNGFND1_TYPE = 100        # Type = simulated sonar
RNGFND1_MIN_CM = 20     # Min distance (cm)
RNGFND1_MAX_CM = 700    # Max distance (cm)
RNGFND1_ORIENT = 25     # Orientation: downward-facing
RNGFND1_FUNCTION = 1       # Model = linear

TODO: Extend the plugin, - Add variance - read min and max from parameter - read rotation from parameter