Skip to content

Commit

Permalink
Fixed #36 - Don't norm the quaterion for calculating trajectory length
Browse files Browse the repository at this point in the history
  • Loading branch information
goldbattle committed Feb 28, 2020
1 parent 7940dd8 commit 235bb88
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ov_eval/src/calc/ResultTrajectory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ void ResultTrajectory::calculate_rpe(const std::vector<double> &segment_lengths,
std::vector<double> accum_distances(gt_poses.size());
accum_distances[0] = 0;
for (size_t i = 1; i < gt_poses.size(); i++) {
accum_distances[i] = accum_distances[i - 1] + (gt_poses[i] - gt_poses[i - 1]).norm();
accum_distances[i] = accum_distances[i - 1] + (gt_poses[i].block(0,0,3,1) - gt_poses[i - 1].block(0,0,3,1)).norm();
}

// Loop through each segment length
Expand Down
2 changes: 1 addition & 1 deletion ov_eval/src/utils/Loader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ double Loader::get_total_length(const std::vector<Eigen::Matrix<double,7,1>> &po
// Loop through every pose and append its segment
double distance = 0.0;
for (size_t i=1; i<poses.size(); i++) {
distance += (poses[i] - poses[i-1]).norm();
distance += (poses[i].block(0,0,3,1) - poses[i-1].block(0,0,3,1)).norm();
}

// return the distance
Expand Down

0 comments on commit 235bb88

Please sign in to comment.