12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- //
- // Created by zx on 23-11-27.
- //
- #ifndef CERES_TEST_BOUNDARY_H
- #define CERES_TEST_BOUNDARY_H
- #include "proto/def.grpc.pb.h"
- #include "proto/communication.pb.h"
- #include "communication/transitData.h"
- #include "detect/detect_manager.h"
- enum BoundRet {
- BoundRetNormal = Range_status::Range_correct, //正常
- BoundRetWidth = Range_status::Range_car_width,
- BoundRetWheelBase = Range_status::Range_car_wheelbase,
- BoundRetFront = Range_status::Range_front, //前超界
- BoundRetBack = Range_status::Range_back, //后超界
- BoundRetLeft = Range_status::Range_left, //左超界
- BoundRetRight = Range_status::Range_right, //右超界
- BoundRetLeftAngle = Range_status::Range_angle_anti_clock, //左倾角过大
- BoundRetRightAngle = Range_status::Range_angle_clock, //右倾角过大
- BoundRetWheelAngle = Range_status::Range_steering_wheel_nozero //前轮角未回正
- };
- class Boundary {
- public:
- Boundary() = default;
- bool init(const std::string &file);
- bool init(JetStream::Limit limit);
- ~Boundary();
- void limit(JetStream::MeasureInfo &info);
- void transMeasureInfo(JetStream::MeasureInfo &in, measure_buffer &out);
- void transMeasureInfo(JetStream::MeasureInfo &in, TransitData::MeasureInfo &out);
- void transMeasureInfo(DetectManager::DetectResult &in, JetStream::MeasureInfo &out);
- private:
- BoundRet limit_boundary(JetStream::MeasureInfo info, JetStream::Boundary bound);
- bool read_proto_param(std::string prototxt_path, ::google::protobuf::Message &protobuf_parameter);
- JetStream::Limit limit_;
- };
- #endif //CERES_TEST_BOUNDARY_H
|