common_data.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. //
  2. // Created by huli on 2020/9/8.
  3. //
  4. #ifndef NNXX_TESTS_COMMON_DATA_H
  5. #define NNXX_TESTS_COMMON_DATA_H
  6. class Common_data
  7. {
  8. public:
  9. //万集雷达扫描周期66ms, (频率15hz), 一般设置大一些
  10. #define WANJI_716_SCAN_CYCLE_MS 70
  11. //整车的测量信息
  12. struct Car_measure_information
  13. {
  14. float center_x = 0; //整车的中心点x值, 四轮的中心
  15. float center_y = 0; //整车的中心点y值, 四轮的中心
  16. float car_angle = 0; //整车的车身旋转角,
  17. float car_length = 0; //整车的长度, 用于规避碰撞
  18. float car_width = 0; //整车的宽度, 用于规避碰撞
  19. float car_height = 0; //整车的高度, 用于规避碰撞
  20. float wheel_base = 0; //整车的轮距, 前后轮的距离, 用于机器人或agv的抓车
  21. float wheel_width = 0; //整车的轮距, 左右轮的距离, 用于机器人或agv的抓车
  22. float front_theta = 0; //整车的前轮的旋转角
  23. bool correctness = false; //整车的校准标记位
  24. };
  25. //四轮的测量信息
  26. struct Car_wheel_information
  27. {
  28. float center_x = 0; //整车的中心点x值, 四轮的中心
  29. float center_y = 0; //整车的中心点y值, 四轮的中心
  30. float car_angle = 0; //整车的车身旋转角,
  31. float wheel_base = 0; //整车的轮距, 前后轮的距离, 用于机器人或agv的抓车
  32. float wheel_width = 0; //整车的轮距, 左右轮的距离, 用于机器人或agv的抓车
  33. float front_theta = 0; //整车的前轮的旋转角
  34. bool correctness = false; //整车的校准标记位
  35. };
  36. static void copy_data(Car_measure_information& car_measure_information_in, Car_wheel_information& car_wheel_information_out);
  37. static void copy_data(Car_wheel_information& car_wheel_information_in, Car_measure_information& car_measure_information_out);
  38. };
  39. #endif //NNXX_TESTS_COMMON_DATA_H