Apollo 10.0
自动驾驶开放平台
lossless_map_config.cc
浏览该文件的文档.
1/******************************************************************************
2 * Copyright 2018 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
18
19namespace apollo {
20namespace localization {
21namespace msf {
22
24 : BaseMapConfig(map_version) {
25 map_layer_alt_thres_ = 10000.0; // in meters
26 map_cache_size_ = 50; // 80
27 coordinate_type_ = "UTM";
31 map_ground_height_offset_ = 1.7f; // Set the initial value here.
32}
33
34void LosslessMapConfig::CreateXml(boost::property_tree::ptree* config) const {
36 config->put("map.map_config.coordinate_type", coordinate_type_);
37 config->put("map.map_runtime.layer_alt_thres", map_layer_alt_thres_);
38 config->put("map.map_runtime.cache_size", map_cache_size_);
39 config->put("map.map_runtime.max_intensity_value", max_intensity_value_);
40 config->put("map.map_runtime.max_intensity_var_value",
42}
43
44void LosslessMapConfig::LoadXml(const boost::property_tree::ptree& config) {
46 coordinate_type_ = config.get<std::string>("map.map_config.coordinate_type");
47 map_layer_alt_thres_ = config.get<float>("map.map_runtime.layer_alt_thres");
48 map_cache_size_ = config.get<unsigned int>("map.map_runtime.cache_size");
50 config.get<float>("map.map_runtime.max_intensity_value");
52 config.get<float>("map.map_runtime.max_intensity_var_value");
53}
54
55} // namespace msf
56} // namespace localization
57} // namespace apollo
The options of the reflectance map.
bool map_is_compression_
Enable the compression.
float map_ground_height_offset_
Velodyne's height to the ground.
virtual void CreateXml(boost::property_tree::ptree *config) const
Create the XML structure.
virtual void LoadXml(const boost::property_tree::ptree &config)
Load the map options from a XML structure.
LosslessMapConfig(std::string map_version="lossless_map")
The constructor gives the default map settings.
unsigned int map_cache_size_
When load map nodes, the maximum number of map nodes will be kept in memory.
virtual void CreateXml(boost::property_tree::ptree *config) const
Create the XML structure.
float max_intensity_var_value_
During the visualization (for example, call the function get_image() of map node layer),...
float max_intensity_value_
During the visualization (for example, call the function get_image() of map node layer),...
float map_layer_alt_thres_
The threshold to split more layers in the map node.
virtual void LoadXml(const boost::property_tree::ptree &config)
Load the map options from a XML structure.
class register implement
Definition arena_queue.h:37