mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-03 01:50:24 +08:00
OptimizerGTSAM: fixed inverted landmark link transform on slam2d with rotation used
This commit is contained in:
@@ -132,7 +132,7 @@ std::map<int, Transform> OptimizerGTSAM::optimize(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
UDEBUG("fill poses to gtsam...");
|
UDEBUG("fill poses to gtsam... rootId=%d", rootId);
|
||||||
gtsam::Values initialEstimate;
|
gtsam::Values initialEstimate;
|
||||||
std::map<int, bool> isLandmarkWithRotation;
|
std::map<int, bool> isLandmarkWithRotation;
|
||||||
for(std::map<int, Transform>::const_iterator iter = poses.begin(); iter!=poses.end(); ++iter)
|
for(std::map<int, Transform>::const_iterator iter = poses.begin(); iter!=poses.end(); ++iter)
|
||||||
@@ -276,7 +276,7 @@ std::map<int, Transform> OptimizerGTSAM::optimize(
|
|||||||
information(2,2) = iter->second.infMatrix().at<double>(5,5); // theta-theta
|
information(2,2) = iter->second.infMatrix().at<double>(5,5); // theta-theta
|
||||||
}
|
}
|
||||||
gtsam::noiseModel::Gaussian::shared_ptr model = gtsam::noiseModel::Gaussian::Information(information);
|
gtsam::noiseModel::Gaussian::shared_ptr model = gtsam::noiseModel::Gaussian::Information(information);
|
||||||
graph.add(gtsam::BetweenFactor<gtsam::Pose2>(id1, id2, gtsam::Pose2(iter->second.transform().x(), iter->second.transform().y(), iter->second.transform().theta()), model));
|
graph.add(gtsam::BetweenFactor<gtsam::Pose2>(id1, id2, gtsam::Pose2(t.x(), t.y(), t.theta()), model));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user