Skip to content

Commit

Permalink
Deskew with abstract classes...bleh
Browse files Browse the repository at this point in the history
  • Loading branch information
tizianoGuadagnino committed Jan 7, 2025
1 parent b0b2ebd commit 5be82e9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cpp/kiss_icp/core/Preprocessing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ struct StubDeskewer {
StubDeskewer(const std::vector<double> &timestamps, const Sophus::SE3d &relative_motion)
: stamps_(timestamps), motion_(relative_motion.log()) {}

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

const std::vector<double> &stamps_;
const Sophus::SE3d::Tangent motion_;
Expand All @@ -51,7 +53,7 @@ struct MotionDeskewer : public StubDeskewer {
MotionDeskewer(const std::vector<double> &timestamps, const Sophus::SE3d &relative_motion)
: StubDeskewer(timestamps, relative_motion) {}

Eigen::Vector3d operator()(const Eigen::Vector3d &point, const size_t &idx) const {
Eigen::Vector3d operator()(const Eigen::Vector3d &point, const size_t &idx) const final {
const auto pose = Sophus::SE3d::exp((stamps_.at(idx) - mid_pose_timestamp) * motion_);
return pose * point;
}
Expand Down

0 comments on commit 5be82e9

Please sign in to comment.