In order to get rid of PositionTargetGlobal failed because no origin message:
This message comes from guided_target plugin (guided_target: accept position-target-global-int messages by snktshrma · Pull Request #1780 · mavlink/mavros · GitHub), which as far as I understood is used for getting global position messages in scaled int from GCS.
We can do one of the two approaches:
- don’t load this plugin by editing the file
/opt/ros/humble/share/mavros/launch/px4_pluginlists.yamland adding theguided_targetplugin to the list ofplugin_denylist. I tried this and it does not seem to have major side effect. This method is good for when we have installed mavros binary packages using apt. - build mavros from latest code. There the problem is fixed I think: SensorQoS necessary for gp_origin? · Issue #1911 · mavlink/mavros · GitHub (not sure of course)
Version of the file, whithout a fix, which I think is used in the binary package: mavros/mavros_extras/src/plugins/guided_target.cpp at 65ad32e7329ac9a54a1afa8691a89e2fc611ad30 · mavlink/mavros · GitHub
Version of the file with the fix in latest code: mavros/mavros_extras/src/plugins/guided_target.cpp at 227bb05c34a75188f1d6fccff6f767d0cc9129b0 · mavlink/mavros · GitHub
Probably related error message in Mavros output:
[mavros_node-1] [INFO] [1707929198.436637057] [mavros.mavros]: Plugin guided_target initialized
[mavros_node-1] [WARN] [1707929198.436743442] [mavros.global_position]: New subscription discovered on topic '/mavros/global_position/gp_origin', requesting incompatible QoS. No messages will be sent to it. Last incompatible policy: RELIABILITY_QOS_POLICY
[mavros_node-1] [WARN] [1707929198.437238814] [mavros.guided_target]: New publisher discovered on topic '/mavros/global_position/gp_origin', offering incompatible QoS. No messages will be sent to it. Last incompatible policy: RELIABILITY_QOS_POLICY
[mavros_node-1] [INFO] [1707929198.446975237] [mavros.mavros]: Plugin hil created