Skip to content

Commit

Permalink
Debug string
Browse files Browse the repository at this point in the history
  • Loading branch information
tizianoGuadagnino committed Jan 7, 2025
1 parent cf325fb commit 0b34c9c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions cpp/kiss_icp/core/Preprocessing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,18 @@
#include <Eigen/Geometry>
#include <algorithm>
#include <functional>
#include <iostream>
#include <vector>

namespace {
constexpr double mid_pose_timestamp{0.5};
struct StubDeskewer {
StubDeskewer(const std::vector<double> &timestamps, const Sophus::SE3d &relative_motion)
: stamps_(timestamps), motion_(relative_motion) {}
: stamps_(&timestamps), motion_(relative_motion) {}

Eigen::Vector3d operator()(const Eigen::Vector3d &point, const size_t &) const { return point; }

const std::vector<double> &stamps_;
const std::vector<double> *stamps_;
const Sophus::SE3d motion_;
};

Expand All @@ -52,8 +53,9 @@ struct MotionDeskewer : public StubDeskewer {
: StubDeskewer(timestamps, relative_motion) {}

Eigen::Vector3d operator()(const Eigen::Vector3d &point, const size_t &idx) const {
std::cout << "I am deskwing" << std::endl;
const auto delta_pose = motion_.log();
const auto motion = Sophus::SE3d::exp((stamps_.at(idx) - mid_pose_timestamp) * delta_pose);
const auto motion = Sophus::SE3d::exp((stamps_->at(idx) - mid_pose_timestamp) * delta_pose);
return motion * point;
}
};
Expand Down

0 comments on commit 0b34c9c

Please sign in to comment.