Skip to content

Commit

Permalink
DBViewer: refactored how poses are aligned with GPS to be able to mak…
Browse files Browse the repository at this point in the history
…e KMZ files (OBJ/DAE origin matching with first KML pose)
  • Loading branch information
matlabbe committed Feb 2, 2025
1 parent fcfadfe commit ddaf2f5
Show file tree
Hide file tree
Showing 3 changed files with 186 additions and 160 deletions.
3 changes: 2 additions & 1 deletion corelib/include/rtabmap/core/Graph.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ Transform RTABMAP_CORE_EXPORT calcRMSE(
float & rotational_median,
float & rotational_std,
float & rotational_min,
float & rotational_max);
float & rotational_max,
bool align2D = false);

void RTABMAP_CORE_EXPORT computeMaxGraphErrors(
const std::map<int, Transform> & poses,
Expand Down
7 changes: 4 additions & 3 deletions corelib/src/Graph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -783,7 +783,8 @@ Transform calcRMSE (
float & rotational_median,
float & rotational_std,
float & rotational_min,
float & rotational_max)
float & rotational_max,
bool align2D)
{

translational_rmse = 0.0f;
Expand Down Expand Up @@ -815,8 +816,8 @@ Transform calcRMSE (
{
idFirst = iter->first;
}
cloud1[oi] = pcl::PointXYZ(jter->second.x(), jter->second.y(), jter->second.z());
cloud2[oi++] = pcl::PointXYZ(iter->second.x(), iter->second.y(), iter->second.z());
cloud1[oi] = pcl::PointXYZ(jter->second.x(), jter->second.y(), align2D?0:jter->second.z());
cloud2[oi++] = pcl::PointXYZ(iter->second.x(), iter->second.y(), align2D?0:iter->second.z());
}
}

Expand Down
Loading

0 comments on commit ddaf2f5

Please sign in to comment.