Handle velocity fields in follow_target message

The mavlink message FOLLOW_TARGET has additional
fields that are not being parsed here. See
https://mavlink.io/en/messages/common.html#FOLLOW_TARGET
for more details.
This commit is contained in:
alessandro
2021-04-06 14:59:56 +02:00
committed by Daniel Agar
parent aa94a60043
commit b46e505b0d
+3
View File
@@ -2284,6 +2284,9 @@ MavlinkReceiver::handle_message_follow_target(mavlink_message_t *msg)
follow_target_topic.lat = follow_target_msg.lat * 1e-7;
follow_target_topic.lon = follow_target_msg.lon * 1e-7;
follow_target_topic.alt = follow_target_msg.alt;
follow_target_topic.vx = follow_target_msg.vel[0];
follow_target_topic.vy = follow_target_msg.vel[1];
follow_target_topic.vz = follow_target_msg.vel[2];
_follow_target_pub.publish(follow_target_topic);
}