Apollo  6.0
Open source self driving car software
calibration.h
Go to the documentation of this file.
1 /******************************************************************************
2  * Copyright 2017 The Apollo Authors. All Rights Reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *****************************************************************************/
16 
28 #pragma once
29 
30 #include <map>
31 #include <string>
32 
33 namespace apollo {
34 namespace drivers {
35 namespace velodyne {
36 
55  float focal_slope;
56  float focal_offset;
57 
63 
64  int laser_ring;
65 };
66 
68 class Calibration {
69  public:
70  std::map<int, LaserCorrection> laser_corrections_;
73 
74  public:
75  Calibration() : initialized_(false) {}
76  explicit Calibration(const std::string& calibration_file) {
77  read(calibration_file);
78  }
79 
80  void read(const std::string& calibration_file);
81  void write(const std::string& calibration_file);
82 };
83 
84 } // namespace velodyne
85 } // namespace drivers
86 } // namespace apollo
int max_intensity
Definition: calibration.h:52
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
Calibration()
Definition: calibration.h:75
float vert_offset_correction
Definition: calibration.h:50
float cos_vert_correction
cached cosine of vert_correction
Definition: calibration.h:61
bool initialized_
Definition: calibration.h:72
correction values for a single laser
Definition: calibration.h:43
int min_intensity
Definition: calibration.h:53
float focal_slope
Definition: calibration.h:55
std::map< int, LaserCorrection > laser_corrections_
Definition: calibration.h:70
float dist_correction_x
Definition: calibration.h:48
float dist_correction
Definition: calibration.h:47
float rot_correction
Definition: calibration.h:45
float sin_vert_correction
cached sine of vert_correction
Definition: calibration.h:62
float cos_rot_correction
cached cosine of rot_correction
Definition: calibration.h:59
float focal_offset
Definition: calibration.h:56
int laser_ring
ring number for this laser
Definition: calibration.h:64
float horiz_offset_correction
Definition: calibration.h:51
float vert_correction
Definition: calibration.h:46
Calibration class storing entire configuration for the Velodyne.
Definition: calibration.h:68
float focal_distance
Definition: calibration.h:54
Calibration(const std::string &calibration_file)
Definition: calibration.h:76
int num_lasers_
Definition: calibration.h:71
float sin_rot_correction
cached sine of rot_correction
Definition: calibration.h:60
float dist_correction_y
Definition: calibration.h:49