Rename to local/global map frame. (#2)
Changes the confusingly named GetOdometryToMapTransform() function to GetLocalToGlobalTransform(), since it is transforming from the local SLAM map frame to the global SLAM map frame.master
parent
aa7b060ac5
commit
6e56578394
|
@ -44,8 +44,7 @@ class GlobalTrajectoryBuilderInterface {
|
||||||
// 3. UKF estimate after integrating any measurements
|
// 3. UKF estimate after integrating any measurements
|
||||||
//
|
//
|
||||||
// Finally, 'pose' is the end-user visualization of orientation and
|
// Finally, 'pose' is the end-user visualization of orientation and
|
||||||
// 'point_cloud' is the point cloud, in the odometry frame, used to make
|
// 'point_cloud' is the point cloud, in the local map frame.
|
||||||
// this estimate.
|
|
||||||
struct PoseEstimate {
|
struct PoseEstimate {
|
||||||
PoseEstimate() = default;
|
PoseEstimate() = default;
|
||||||
PoseEstimate(common::Time time,
|
PoseEstimate(common::Time time,
|
||||||
|
|
|
@ -106,9 +106,10 @@ class SparsePoseGraph {
|
||||||
virtual std::vector<transform::Rigid3d> GetSubmapTransforms(
|
virtual std::vector<transform::Rigid3d> GetSubmapTransforms(
|
||||||
const Submaps& submaps) = 0;
|
const Submaps& submaps) = 0;
|
||||||
|
|
||||||
// Returns the transform converting from odometry based transforms to the
|
// Returns the transform converting data in the local map frame (i.e. the
|
||||||
// optimized world.
|
// continuous, non-loop-closed frame) into the global map frame (i.e. the
|
||||||
virtual transform::Rigid3d GetOdometryToMapTransform(
|
// discontinuous, loop-closed frame).
|
||||||
|
virtual transform::Rigid3d GetLocalToGlobalTransform(
|
||||||
const mapping::Submaps& submaps) = 0;
|
const mapping::Submaps& submaps) = 0;
|
||||||
|
|
||||||
// Returns the current optimized trajectory.
|
// Returns the current optimized trajectory.
|
||||||
|
|
|
@ -90,7 +90,7 @@ void SparsePoseGraph::AddScan(
|
||||||
const mapping::Submaps* submaps,
|
const mapping::Submaps* submaps,
|
||||||
const mapping::Submap* const matching_submap,
|
const mapping::Submap* const matching_submap,
|
||||||
const std::vector<const mapping::Submap*>& insertion_submaps) {
|
const std::vector<const mapping::Submap*>& insertion_submaps) {
|
||||||
const transform::Rigid3d optimized_pose(GetOdometryToMapTransform(*submaps) *
|
const transform::Rigid3d optimized_pose(GetLocalToGlobalTransform(*submaps) *
|
||||||
transform::Embed3D(pose));
|
transform::Embed3D(pose));
|
||||||
|
|
||||||
common::MutexLocker locker(&mutex_);
|
common::MutexLocker locker(&mutex_);
|
||||||
|
@ -393,7 +393,7 @@ std::vector<SparsePoseGraph::Constraint3D> SparsePoseGraph::constraints_3d() {
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
transform::Rigid3d SparsePoseGraph::GetOdometryToMapTransform(
|
transform::Rigid3d SparsePoseGraph::GetLocalToGlobalTransform(
|
||||||
const mapping::Submaps& submaps) {
|
const mapping::Submaps& submaps) {
|
||||||
return GetSubmapTransforms(submaps).back() *
|
return GetSubmapTransforms(submaps).back() *
|
||||||
submaps.Get(submaps.size() - 1)->local_pose().inverse();
|
submaps.Get(submaps.size() - 1)->local_pose().inverse();
|
||||||
|
|
|
@ -86,7 +86,7 @@ class SparsePoseGraph : public mapping::SparsePoseGraph {
|
||||||
override;
|
override;
|
||||||
std::vector<transform::Rigid3d> GetSubmapTransforms(
|
std::vector<transform::Rigid3d> GetSubmapTransforms(
|
||||||
const mapping::Submaps& submaps) EXCLUDES(mutex_) override;
|
const mapping::Submaps& submaps) EXCLUDES(mutex_) override;
|
||||||
transform::Rigid3d GetOdometryToMapTransform(const mapping::Submaps& submaps)
|
transform::Rigid3d GetLocalToGlobalTransform(const mapping::Submaps& submaps)
|
||||||
EXCLUDES(mutex_) override;
|
EXCLUDES(mutex_) override;
|
||||||
std::vector<mapping::TrajectoryNode> GetTrajectoryNodes() override
|
std::vector<mapping::TrajectoryNode> GetTrajectoryNodes() override
|
||||||
EXCLUDES(mutex_);
|
EXCLUDES(mutex_);
|
||||||
|
|
|
@ -88,7 +88,7 @@ int SparsePoseGraph::AddScan(
|
||||||
const kalman_filter::PoseCovariance& covariance, const Submaps* submaps,
|
const kalman_filter::PoseCovariance& covariance, const Submaps* submaps,
|
||||||
const Submap* const matching_submap,
|
const Submap* const matching_submap,
|
||||||
const std::vector<const Submap*>& insertion_submaps) {
|
const std::vector<const Submap*>& insertion_submaps) {
|
||||||
const transform::Rigid3d optimized_pose(GetOdometryToMapTransform(*submaps) *
|
const transform::Rigid3d optimized_pose(GetLocalToGlobalTransform(*submaps) *
|
||||||
pose);
|
pose);
|
||||||
|
|
||||||
common::MutexLocker locker(&mutex_);
|
common::MutexLocker locker(&mutex_);
|
||||||
|
@ -401,7 +401,7 @@ std::vector<SparsePoseGraph::Constraint3D> SparsePoseGraph::constraints_3d() {
|
||||||
return constraints_;
|
return constraints_;
|
||||||
}
|
}
|
||||||
|
|
||||||
transform::Rigid3d SparsePoseGraph::GetOdometryToMapTransform(
|
transform::Rigid3d SparsePoseGraph::GetLocalToGlobalTransform(
|
||||||
const mapping::Submaps& submaps) {
|
const mapping::Submaps& submaps) {
|
||||||
return GetSubmapTransforms(submaps).back() *
|
return GetSubmapTransforms(submaps).back() *
|
||||||
submaps.Get(submaps.size() - 1)->local_pose().inverse();
|
submaps.Get(submaps.size() - 1)->local_pose().inverse();
|
||||||
|
|
|
@ -89,7 +89,7 @@ class SparsePoseGraph : public mapping::SparsePoseGraph {
|
||||||
override;
|
override;
|
||||||
std::vector<transform::Rigid3d> GetSubmapTransforms(
|
std::vector<transform::Rigid3d> GetSubmapTransforms(
|
||||||
const mapping::Submaps& submaps) EXCLUDES(mutex_) override;
|
const mapping::Submaps& submaps) EXCLUDES(mutex_) override;
|
||||||
transform::Rigid3d GetOdometryToMapTransform(const mapping::Submaps& submaps)
|
transform::Rigid3d GetLocalToGlobalTransform(const mapping::Submaps& submaps)
|
||||||
EXCLUDES(mutex_) override;
|
EXCLUDES(mutex_) override;
|
||||||
std::vector<mapping::TrajectoryNode> GetTrajectoryNodes() override
|
std::vector<mapping::TrajectoryNode> GetTrajectoryNodes() override
|
||||||
EXCLUDES(mutex_);
|
EXCLUDES(mutex_);
|
||||||
|
|
Loading…
Reference in New Issue