mirror of
https://github.com/introlab/rtabmap_ros.git
synced 2026-10-03 16:27:46 +08:00
OdometryROS: don't publish odom if velocity is null too when publish_null_when_lost is false
This commit is contained in:
+4
-1
@@ -527,7 +527,10 @@ void OdometryROS::processData(const SensorData & data, const ros::Time & stamp)
|
|||||||
odom.twist.covariance.at(35) = setTwist?info.reg.covariance.at<double>(5,5):BAD_COVARIANCE; // yawyaw
|
odom.twist.covariance.at(35) = setTwist?info.reg.covariance.at<double>(5,5):BAD_COVARIANCE; // yawyaw
|
||||||
|
|
||||||
//publish the message
|
//publish the message
|
||||||
odomPub_.publish(odom);
|
if(setTwist || publishNullWhenLost_)
|
||||||
|
{
|
||||||
|
odomPub_.publish(odom);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// local map / reference frame
|
// local map / reference frame
|
||||||
|
|||||||
Reference in New Issue
Block a user