Apollo 11.0
自动驾驶开放平台
lossy_map_config_2d.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
23LossyMapConfig2D::LossyMapConfig2D(std::string map_version)
24 : BaseMapConfig(map_version) {
25 map_layer_alt_thres_ = 10000.0; // in meters
26 map_cache_size_ = 50; // 80
30 map_ground_height_offset_ = 1.7f; // Set the initial value here.
31}
32
33void LossyMapConfig2D::CreateXml(boost::property_tree::ptree* config) const {
35 config->put("map.map_runtime.layer_alt_thres", map_layer_alt_thres_);
36 config->put("map.map_runtime.cache_size", map_cache_size_);
37 config->put("map.map_runtime.max_intensity_value", max_intensity_value_);
38 config->put("map.map_runtime.max_intensity_var_value",
40}
41
42void LossyMapConfig2D::LoadXml(const boost::property_tree::ptree& config) {
44 map_layer_alt_thres_ = config.get<float>("map.map_runtime.layer_alt_thres");
45 map_cache_size_ = config.get<unsigned int>("map.map_runtime.cache_size");
47 config.get<float>("map.map_runtime.max_intensity_value");
49 config.get<float>("map.map_runtime.max_intensity_var_value");
50}
51
52} // namespace msf
53} // namespace localization
54} // 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.
float map_layer_alt_thres_
The threshold to split more layers in the map node.
virtual void CreateXml(boost::property_tree::ptree *config) const
Create the XML structure.
float max_intensity_value_
During the visualization (for example, call the function get_image() of map node layer),...
float max_intensity_var_value_
During the visualization (for example, call the function get_image() of map node layer),...
LossyMapConfig2D(std::string map_version="lossy_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 LoadXml(const boost::property_tree::ptree &config)
Load the map options from a XML structure.
class register implement
Definition arena_queue.h:37