From 283a137de10bfa11caa7c81d0d2bcf2b7854773d Mon Sep 17 00:00:00 2001 From: Moju Zhao Date: Sat, 17 Feb 2024 22:30:44 +0900 Subject: [PATCH] [Estimation][VIO] fix bug: initialize prev_timestamp --- aerial_robot_estimation/src/sensor/vo.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/aerial_robot_estimation/src/sensor/vo.cpp b/aerial_robot_estimation/src/sensor/vo.cpp index 77ff670ea..3e156dc37 100644 --- a/aerial_robot_estimation/src/sensor/vo.cpp +++ b/aerial_robot_estimation/src/sensor/vo.cpp @@ -80,6 +80,7 @@ namespace sensor_plugin if(time_sync_) queuse_size = 10; vo_sub_ = nh_.subscribe(topic_name, queuse_size, &VisualOdometry::voCallback, this); + /* servo control timer */ if(variable_sensor_tf_flag_) { @@ -92,6 +93,8 @@ namespace sensor_plugin servo_control_timer_ = indexed_nhp_.createTimer(ros::Duration(servo_control_rate_), &VisualOdometry::servoControl,this); // 10 Hz } + + prev_timestamp_ = 0; } void VisualOdometry::voCallback(const nav_msgs::Odometry::ConstPtr & vo_msg)