Skip to content

Loopback of DISTANCE_SENSOR messages #2041

@schashni

Description

@schashni

Setup
I'm sending rangefinder data to the PixHawk (SITL) via MAVROS.

Configuration of the distance_sensor:

mavros/distance_sensor:
  ros__parameters:
    config: |
      altimeter_sub:
        subscriber: true
        id: 0
        orientation: PITCH_270 

What happens

  1. The PixHawk receives MAVLink messages and processes them. I can see this in the QGC.
  2. Then, the PixHawk sends them back via MAVLink.
  3. MAVROS receives these messages and prints an error:

[mavros_node-7] [ERROR] [1747261264.493635734] [mavros.distance_sensor]: DS: altimeter_sub (id 0) is subscriber, but i got sensor data for that id from FCU

  1. In the end, my task (transmitting rangefinder data to the PixHawk) is solved, but there is a constant flow of error messages in the terminal.

MAVROS version and platform
Mavros: ros2 HEAD (8cfe42e)
ROS: Humble
Ubuntu: 22.04
Autopilot type and version

[ x ] ArduPilot
[ ] PX4

Version: ArduSub V4.6.0-dev (0805156d)

Running ArduSub in SITL.

Comments
I'm new to MAVROS, so maybe I'm missing some concern.
From my point of view MAVROS should ignore these messages, since their directions are set in the configuration file. Or maybe I'm unaware of some parameter in the configuration file.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions