mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-23 02:33:34 +08:00
add odometry reset counter (ekf2, mavlink, etc)
This commit is contained in:
@@ -1358,6 +1358,8 @@ int Simulator::publish_odometry_topic(const mavlink_message_t *odom_mavlink)
|
||||
odom.velocity_covariance[i] = odom_msg.velocity_covariance[i];
|
||||
}
|
||||
|
||||
odom.reset_counter = odom_msg.reset_counter;
|
||||
|
||||
/* Publish the odometry based on the source */
|
||||
if (odom_msg.estimator_type == MAV_ESTIMATOR_TYPE_VISION || odom_msg.estimator_type == MAV_ESTIMATOR_TYPE_VIO) {
|
||||
_visual_odometry_pub.publish(odom);
|
||||
@@ -1403,6 +1405,8 @@ int Simulator::publish_odometry_topic(const mavlink_message_t *odom_mavlink)
|
||||
/* The velocity covariance URT - unknown */
|
||||
odom.velocity_covariance[0] = NAN;
|
||||
|
||||
odom.reset_counter = ev.reset_counter;
|
||||
|
||||
/* Publish the odometry */
|
||||
_visual_odometry_pub.publish(odom);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user