obstacle_type.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. #pragma once
  2. #ifndef _IV_COMMON_OBSTACLE_TYPE_
  3. #define _IV_COMMON_OBSTACLE_TYPE_
  4. #include <vector>
  5. #ifndef Android
  6. #include <boost.h>
  7. #endif
  8. /**
  9. *障碍物类型
  10. */
  11. namespace iv {
  12. const int grx = 250, gry = 500, centerx = 125, centery = 250;
  13. const double gridwide = 0.2;
  14. struct ObstacleBasic
  15. {
  16. bool valid;
  17. float nomal_x;
  18. float nomal_y;
  19. float nomal_z;
  20. float speed_relative;
  21. float speed_x;
  22. float speed_y;
  23. float speed_z;
  24. float high;
  25. float low;
  26. int esr_ID;
  27. };
  28. #ifndef Android
  29. typedef boost::shared_ptr<std::vector<iv::ObstacleBasic>> ObsLiDAR;
  30. typedef boost::shared_ptr<std::vector<iv::ObstacleBasic>> ObsRadar;
  31. typedef boost::shared_ptr<std::vector<iv::ObstacleBasic>> ObsCamera;
  32. typedef boost::shared_ptr<std::vector<iv::ObstacleBasic>>ObsRadarPointer;
  33. #endif
  34. struct Obs_grid
  35. {
  36. int id;
  37. double speed_x;
  38. double speed_y;
  39. double yaw;
  40. int type;
  41. double high;
  42. double low;
  43. double obshight;
  44. int pointcount;
  45. int ob;//障碍物属性,0地面 ,1路沿,2障碍物
  46. };
  47. typedef Obs_grid LidarGrid;
  48. typedef Obs_grid* LidarGridPtr;
  49. struct array_360
  50. {
  51. float x;
  52. float y;
  53. float z;
  54. };
  55. struct detect_info
  56. {
  57. int light;
  58. };
  59. typedef detect_info CameraInfo;
  60. typedef detect_info* CameraInfoPtr;
  61. }
  62. #endif // !_IV_COMMON_OBSTACLE_TYPE_