-
Notifications
You must be signed in to change notification settings - Fork 2
/
options.hpp
105 lines (91 loc) · 2.92 KB
/
options.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
// Copyright (c) 2020, Samsung Research America
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License. Reserved.
//
// Modifications copyright (C) 2021 Bartosz Meglicki <meglickib@gmail.com>
#ifndef NAV2_SMAC_PLANNER__OPTIONS_HPP_
#define NAV2_SMAC_PLANNER__OPTIONS_HPP_
#include <string>
namespace nav2_smac_planner
{
/**
* @struct nav2_smac_planner::SmootherParams
* @brief Parameters for the smoother cost function
*/
struct SmootherParams
{
/**
* @brief A constructor for nav2_smac_planner::SmootherParams
*/
SmootherParams()
{
}
double smooth_weight{15000.0};
double costmap_weight{0.0};
double distance_weight{0.0};
double curvature_weight{1.5};
double max_curvature{0.0};
double costmap_factor{10.0};
double max_time;
};
/**
* @struct nav2_smac_planner::OptimizerParams
* @brief Parameters for the ceres optimizer
*/
struct OptimizerParams
{
OptimizerParams()
: debug(false),
max_iterations(50),
max_time(1e4),
param_tol(1e-8),
fn_tol(1e-6),
gradient_tol(1e-10)
{
}
/**
* @struct AdvancedParams
* @brief Advanced parameters for the ceres optimizer
*/
struct AdvancedParams
{
AdvancedParams()
: min_line_search_step_size(1e-9),
max_num_line_search_step_size_iterations(20),
line_search_sufficient_function_decrease(1e-4),
max_num_line_search_direction_restarts(20),
max_line_search_step_contraction(1e-3),
min_line_search_step_contraction(0.6),
line_search_sufficient_curvature_decrease(0.9),
max_line_search_step_expansion(10)
{
}
double min_line_search_step_size; // Ceres default: 1e-9
int max_num_line_search_step_size_iterations; // Ceres default: 20
double line_search_sufficient_function_decrease; // Ceres default: 1e-4
int max_num_line_search_direction_restarts; // Ceres default: 5
double max_line_search_step_contraction; // Ceres default: 1e-3
double min_line_search_step_contraction; // Ceres default: 0.6
double line_search_sufficient_curvature_decrease; // Ceres default: 0.9
int max_line_search_step_expansion; // Ceres default: 10
};
bool debug;
int max_iterations; // Ceres default: 50
double max_time; // Ceres default: 1e4
double param_tol; // Ceres default: 1e-8
double fn_tol; // Ceres default: 1e-6
double gradient_tol; // Ceres default: 1e-10
AdvancedParams advanced;
};
} // namespace nav2_smac_planner
#endif // NAV2_SMAC_PLANNER__OPTIONS_HPP_