ndt_matching.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. #ifndef NDT_MATCHING_H
  2. #define NDT_MATCHING_H
  3. #include<QDateTime>
  4. #include <QMutex>
  5. struct pose
  6. {
  7. double x;
  8. double y;
  9. double z;
  10. double roll;
  11. double pitch;
  12. double yaw;
  13. double vx;
  14. double vy;
  15. };
  16. namespace iv {
  17. struct lidar_pose
  18. {
  19. lidar_pose() {}
  20. double vel_x;
  21. double vel_y;
  22. double vel_z;
  23. double vel;
  24. double accel_x;
  25. double accel_y;
  26. double accel_z;
  27. double accel;
  28. struct pose mpose;
  29. };
  30. }
  31. namespace iv {
  32. struct imudata
  33. {
  34. qint64 imutime;
  35. double imu_linear_acceleration_x;
  36. double imu_linear_acceleration_y;
  37. double imu_linear_acceleration_z;
  38. double imu_angular_velocity_x;
  39. double imu_angular_velocity_y;
  40. double imu_angular_velocity_z;
  41. };
  42. }
  43. void ndt_match_Init_nomap();
  44. void ndt_match_Init(pcl::PointCloud<pcl::PointXYZ>::Ptr mappcd);
  45. void point_ndt(pcl::PointCloud<pcl::PointXYZ>::Ptr raw_scan);
  46. void point_ndt_test(pcl::PointCloud<pcl::PointXYZ>::Ptr raw_scan);
  47. int GetPose(int & curindex,iv::lidar_pose & xlidar_pose);
  48. void SetCurPose(double x0,double y0,double yaw0,double z0 = 0,double pitch0 = 0,double roll0 = 0);
  49. void ndt_match_SetMap(pcl::PointCloud<pcl::PointXYZ>::Ptr mappcd);
  50. void SetRunState(bool bRun);
  51. namespace iv {
  52. struct ndttracepoint
  53. {
  54. double x;
  55. double y;
  56. double z;
  57. double pitch;
  58. double roll;
  59. double yaw;
  60. };
  61. }
  62. namespace iv {
  63. struct gpspos
  64. {
  65. double lat;
  66. double lon;
  67. double height;
  68. double heading;
  69. double pitch;
  70. double roll;
  71. double ve;
  72. double vn;
  73. };
  74. }
  75. iv::gpspos PoseToGPS(iv::gpspos xori,pose xpose);
  76. pose CalcPose(iv::gpspos xori,iv::gpspos xcur);
  77. namespace iv {
  78. struct ndtmaptrace
  79. {
  80. ndtmaptrace() {}
  81. std::vector<ndttracepoint> mvector_trace;
  82. std::string mstrpcdpath;
  83. iv::gpspos mndtorigin;
  84. };
  85. }
  86. void setuseimu(bool bUse);
  87. void imu_update(qint64 current_time_imu,double imu_roll,double imu_pitch,double imu_yaw,
  88. double acceleration_x,double acceleration_y,
  89. double acceleration_z);
  90. #endif // NDT_MATCHING_H