mirror of
https://github.com/introlab/rtabmap_ros.git
synced 2026-10-06 01:37:46 +08:00
Added gazebo_ground_truth.py. Odom: fixed ground truth init when imu is also used.
This commit is contained in:
+5
-1
@@ -538,7 +538,11 @@ void OdometryROS::processData(SensorData & data, const std_msgs::Header & header
|
||||
|
||||
if(!data.imageRaw().empty() || !data.laserScanRaw().isEmpty())
|
||||
{
|
||||
if(odometry_->getPose().isIdentity())
|
||||
// Use only XYZ to handle the case odometry was previously initialized with IMU,
|
||||
// we assume that the ground truth contains also a real initial orientation
|
||||
float x,y,z;
|
||||
odometry_->getPose().getTranslation(x, y, z);
|
||||
if(x==0.0f && y==0.0f && z==0.0f)
|
||||
{
|
||||
// sync with the first value of the ground truth
|
||||
if(groundTruth.isNull())
|
||||
|
||||
Reference in New Issue
Block a user