I’m having a hard time to get DISTANCE_SENSOR messages to be used, despite spending hours on this. I simply cannot validate that ArduCopter is using it.
I’ll describe my scenario below, in the hope that someone spots the missing piece or my fault.
I configured ArduCopter (3.4.6) with: AVOID_ENABLE=2 and PRX_TYPE=2.
I’m running a companion computer (RPi). There, I run cmavnode as as mavlink hub. cmavnode has 4 endpoints:
EP1: ArduCopter on Pixhawk, connected via serial (ttyAMA0, baud=921600).
EP2: Mission Planner (1.3.48) connected via UDP.
EP3: Custom built software (I call it LOGGER) that listens to messages and prints them, connected via UDP.
EP4: Custom built software (I call it SENDER) that generates DISTANCE_SENSOR messages, connected via UDP.
At first, I start cmavnode. It promptly reports that EP1 (ArduCopter) is connected with sysId 1.
Then, I connect EP2 (MP). cmavnode reports that EP2 is connected with sysId 255.
Then, I connect EP3 (LOGGER). cmavnode stays quiet, possibly because LOGGER does not send messages. LOGGER starts reporing various messages with sysId 1, presumably from Ardupilot and some debug messages with sysId 255 (from MP).
Then, I connect EP4 (SENDER). cmavnode reports that EP4 is connected with sysId 1. SENDER starts sending DISTANCE_SENSOR messages at 10Hz with sysId=1, compId=154, min_distance=4, max_distance=400, current_distance=120 and orientation=0. LOGGER starts reporing DISTANCE_SENSOR messages with correct values.
I don’t know how to validade that ArduCopter is receiving the messages and that it is using (accepting) them. Is there a way to do this? I expected that ArduCopter would send new DISTANCE_SENSOR messages to everybody else, but it doesn’t.
I don’t know how to validade that Mission Planner is receiving the messages and that it is using (accepting) them. @ppoirier said that the “radar” window should appear, but nothing happened. Mission Planner “Tuning” feature does not have"distance variables", so I could graph them. Is there a way to do this?
LOGGER and SENDER are written in Java, using MAVLinkJava library. They don’t send heartbeat messages.
What am I missing?