mirror of
https://github.com/introlab/rtabmap_ros.git
synced 2026-10-04 16:57:46 +08:00
Odom: Added twist covariance (pose covariance/2)
This commit is contained in:
+2
-1
@@ -59,6 +59,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#include <octomap_msgs/conversions.h>
|
||||
#endif
|
||||
|
||||
#define BAD_COVARIANCE 9999
|
||||
|
||||
//msgs
|
||||
#include "rtabmap_ros/Info.h"
|
||||
@@ -609,7 +610,7 @@ bool CoreWrapper::commonOdomUpdate(const nav_msgs::OdometryConstPtr & odomMsg)
|
||||
if(!paused_)
|
||||
{
|
||||
Transform odom = rtabmap_ros::transformFromPoseMsg(odomMsg->pose.pose);
|
||||
if(!lastPose_.isIdentity() && (odom.isIdentity() || odomMsg->pose.covariance[0] >= 9999))
|
||||
if(!lastPose_.isIdentity() && (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]);
|
||||
rtabmap_.triggerNewMap();
|
||||
|
||||
Reference in New Issue
Block a user