odom.h 838 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. #ifndef _ODOM_H_
  2. #define _ODOM_H_
  3. #include <deque>
  4. #include <mutex>
  5. #include <Eigen/Dense>
  6. #include "common/common.h"
  7. namespace hlzn_slam {
  8. namespace odom {
  9. class odom {
  10. public:
  11. struct odometry {
  12. common::Rigid2f odom;
  13. common::Time time;
  14. };
  15. void addOdometry(const float x, const float y, const float yaw);
  16. bool extrapolaOdom(const common::Time& start_time,
  17. const common::Time& end_time,
  18. common::Rigid2f& T);
  19. bool extrapolaOdom(const common::Rigid2f& start_odom, const common::Time& end_time,
  20. common::Rigid2f& T);
  21. private:
  22. std::deque<odometry> odometry_;
  23. std::mutex mutex;
  24. #define LOCK() std::lock_guard<std::mutex> lockGuard(mutex);
  25. };
  26. }
  27. }
  28. #endif