mirror of
https://github.com/introlab/rtabmap_ros.git
synced 2026-10-04 00:37:46 +08:00
Odom: don't update previousStamp on IMU updates, updated euroc_datasets.launch with okvis example
This commit is contained in:
+3
-8
@@ -497,13 +497,8 @@ void OdometryROS::processData(const SensorData & data, const ros::Time & stamp)
|
||||
{
|
||||
if(previousStamp_>0.0 && previousStamp_ >= stamp.toSec())
|
||||
{
|
||||
static bool warned = false;
|
||||
if(!warned)
|
||||
{
|
||||
NODELET_WARN("Odometry: Detected not valid consecutive stamps (previous=%fs new=%fs). New stamp should be always greater than previous stamp. This new data is ignored. This message will appear only once.",
|
||||
previousStamp_, stamp.toSec());
|
||||
warned = true;
|
||||
}
|
||||
NODELET_WARN("Odometry: Detected not valid consecutive stamps (previous=%fs new=%fs). New stamp should be always greater than previous stamp. This new data is ignored. This message will appear only once.",
|
||||
previousStamp_, stamp.toSec());
|
||||
return;
|
||||
}
|
||||
else if(expectedUpdateRate_ > 0 &&
|
||||
@@ -848,8 +843,8 @@ void OdometryROS::processData(const SensorData & data, const ros::Time & stamp)
|
||||
{
|
||||
NODELET_INFO( "Odom: ratio=%f, std dev=%fm|%frad, update time=%fs", info.reg.icpInliersRatio, pose.isNull()?0.0f:std::sqrt(info.reg.covariance.at<double>(0,0)), pose.isNull()?0.0f:std::sqrt(info.reg.covariance.at<double>(5,5)), (ros::WallTime::now()-time).toSec());
|
||||
}
|
||||
previousStamp_ = stamp.toSec();
|
||||
}
|
||||
previousStamp_ = stamp.toSec();
|
||||
}
|
||||
|
||||
bool OdometryROS::reset(std_srvs::Empty::Request&, std_srvs::Empty::Response&)
|
||||
|
||||
@@ -200,8 +200,8 @@ private:
|
||||
if(!alreadyRectified)
|
||||
{
|
||||
stereoTransform = getTransform(
|
||||
cameraInfoLeft->header.frame_id,
|
||||
cameraInfoRight->header.frame_id,
|
||||
cameraInfoLeft->header.frame_id,
|
||||
cameraInfoLeft->header.stamp);
|
||||
if(stereoTransform.isNull())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user