mirror of
https://github.com/introlab/rtabmap_ros.git
synced 2026-10-05 01:07:49 +08:00
Fixed odom reset detection (new odom should not be null)
This commit is contained in:
+1
-1
@@ -610,7 +610,7 @@ bool CoreWrapper::commonOdomUpdate(const nav_msgs::OdometryConstPtr & odomMsg)
|
|||||||
if(!paused_)
|
if(!paused_)
|
||||||
{
|
{
|
||||||
Transform odom = rtabmap_ros::transformFromPoseMsg(odomMsg->pose.pose);
|
Transform odom = rtabmap_ros::transformFromPoseMsg(odomMsg->pose.pose);
|
||||||
if(!lastPose_.isIdentity() && (odom.isIdentity() || odomMsg->pose.covariance[0] >= BAD_COVARIANCE))
|
if(!lastPose_.isIdentity() && !odom.isNull() && (odom.isIdentity() || odomMsg->pose.covariance[0] >= BAD_COVARIANCE))
|
||||||
{
|
{
|
||||||
UWARN("Odometry is reset (identity pose or high variance (%f) detected). Increment map id!", odomMsg->pose.covariance[0]);
|
UWARN("Odometry is reset (identity pose or high variance (%f) detected). Increment map id!", odomMsg->pose.covariance[0]);
|
||||||
rtabmap_.triggerNewMap();
|
rtabmap_.triggerNewMap();
|
||||||
|
|||||||
Reference in New Issue
Block a user