27 namespace perception {
34 std::vector<double>
k_matrix = {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0};
47 bool BuildIndex()
override;
50 bool QueryDepthOnGroundPlane(
int x,
int y,
double *depth)
const override;
53 bool QueryPoint3dOnGroundPlane(
int x,
int y,
58 bool QueryGroundPlaneInCameraFrame(
59 Eigen::Vector4d *plane_param)
const override;
62 bool QueryCameraToGroundHeightAndPitchAngle(
float *height,
63 float *pitch)
const override;
66 if (is_service_ready_) {
67 auto iter = name_camera_status_map_.find(sensor_name_);
68 return (iter->second).camera_ground_height;
74 if (is_service_ready_) {
75 auto iter = name_camera_status_map_.find(sensor_name_);
76 return (iter->second).pitch_angle;
85 void SetCameraHeightAndPitch(
86 const std::map<std::string, float> &name_camera_ground_height_map,
87 const std::map<std::string, float> &name_camera_pitch_angle_diff_map,
88 const float &pitch_angle_master_sensor)
override;
90 std::string Name()
const override;
93 bool HasSetIntrinsics()
const {
94 return name_camera_status_map_.find(sensor_name_) !=
95 name_camera_status_map_.end();
98 bool HasSetGroundPlane() {
99 bool has_set_ground_plane =
100 name_camera_status_map_.find(sensor_name_) !=
101 name_camera_status_map_.end() &&
102 name_camera_status_map_[sensor_name_].camera_ground_height > 0.0;
103 return has_set_ground_plane;
106 bool is_service_ready_ =
false;
107 std::string sensor_name_ =
"";
108 std::string master_sensor_name_ =
"";
109 std::map<std::string, CameraStatus> name_camera_status_map_;
110 std::shared_ptr<BaseCalibrator> calibrator_;
Definition: camera_frame.h:33
Definition: online_calibration_service.h:30
float QueryCameraToGroundHeight() const override
Definition: online_calibration_service.h:65
std::vector< double > ground_plane
Definition: online_calibration_service.h:35
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
Eigen::Vector3d Vector3d
Definition: frame_transform.h:27
float QueryPitchAngle() const override
Definition: online_calibration_service.h:73
float pitch_angle_diff
Definition: online_calibration_service.h:33
virtual ~OnlineCalibrationService()
Definition: online_calibration_service.h:42
OnlineCalibrationService()
Definition: online_calibration_service.h:40
Definition: base_calibration_service.h:40
float pitch_angle
Definition: online_calibration_service.h:32
bool Init(const char *binary_name)
std::vector< double > k_matrix
Definition: online_calibration_service.h:34
Definition: base_calibration_service.h:29
float camera_ground_height
Definition: online_calibration_service.h:31
Definition: online_calibration_service.h:38