Odom: don't update previousStamp on IMU updates, updated euroc_datasets.launch with okvis example

This commit is contained in:
matlabbe
2019-03-20 22:12:30 -04:00
parent 8d84cfd1bf
commit ec02608e01
4 changed files with 17 additions and 15 deletions
+3 -8
View File
@@ -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&)
+1 -1
View File
@@ -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())
{