Flush odometry's synchronizer queues on reset

This commit is contained in:
matlabbe
2016-06-10 14:17:51 -04:00
parent cc0591c60a
commit 99eb696e36
4 changed files with 63 additions and 13 deletions
+2
View File
@@ -543,6 +543,7 @@ bool OdometryROS::reset(std_srvs::Empty::Request&, std_srvs::Empty::Response&)
{
ROS_INFO("visual_odometry: reset odom!");
odometry_->reset();
this->flushCallbacks();
return true;
}
@@ -551,6 +552,7 @@ bool OdometryROS::resetToPose(rtabmap_ros::ResetPose::Request& req, rtabmap_ros:
Transform pose(req.x, req.y, req.z, req.roll, req.pitch, req.yaw);
ROS_INFO("visual_odometry: reset odom to pose %s!", pose.prettyPrint().c_str());
odometry_->reset(pose);
this->flushCallbacks();
return true;
}