Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deskewing...again #421

Merged
merged 3 commits into from
Jan 9, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions cpp/kiss_icp/core/Preprocessing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,6 @@
#include <functional>
#include <vector>

namespace {
constexpr double mid_pose_stamp{0.5};
} // namespace

namespace kiss_icp {

Preprocessor::Preprocessor(const double max_range,
Expand All @@ -63,7 +59,8 @@ std::vector<Eigen::Vector3d> Preprocessor::Preprocess(const std::vector<Eigen::V
if (!deskew_ || timestamps.empty()) {
return frame;
} else {
const auto motion = relative_motion.log();
const auto &omega = relative_motion.log();
const Sophus::SE3d &inverse_motion = relative_motion.inverse();
std::vector<Eigen::Vector3d> deskewed_frame(frame.size());
tbb::parallel_for(
// Index Range
Expand All @@ -73,7 +70,7 @@ std::vector<Eigen::Vector3d> Preprocessor::Preprocess(const std::vector<Eigen::V
for (size_t idx = r.begin(); idx < r.end(); ++idx) {
const auto &point = frame.at(idx);
const auto &stamp = timestamps.at(idx);
const auto pose = Sophus::SE3d::exp((stamp - mid_pose_stamp) * motion);
const auto pose = inverse_motion * Sophus::SE3d::exp(stamp * omega);
deskewed_frame.at(idx) = pose * point;
};
});
Expand Down
Loading