libmove3d-planners
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Friends Macros Groups Pages
chompParameters.hpp
1 /*********************************************************************
2  * Software License Agreement (BSD License)
3  *
4  * Copyright (c) 2009, Willow Garage, Inc.
5  * All rights reserved.
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions
9  * are met:
10  *
11  * * Redistributions of source code must retain the above copyright
12  * notice, this list of conditions and the following disclaimer.
13  * * Redistributions in binary form must reproduce the above
14  * copyright notice, this list of conditions and the following
15  * disclaimer in the documentation and/or other materials provided
16  * with the distribution.
17  * * Neither the name of the Willow Garage nor the names of its
18  * contributors may be used to endorse or promote products derived
19  * from this software without specific prior written permission.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
24  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
25  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
26  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
27  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
28  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
29  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
31  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32  * POSSIBILITY OF SUCH DAMAGE.
33  *********************************************************************/
34 
37 #ifndef CHOMP_PARAMETERS_H_
38 #define CHOMP_PARAMETERS_H_
39 
40 #include <string>
41 
43 {
44 public:
46  virtual ~ChompParameters();
47 
48  void init();
49  void initFromNodeHandle();
50 
51  double getPlanningTimeLimit() const;
52  void setPlanningTimeLimit(double planning_time_limit);
53  int getMaxIterations() const;
54  int getMaxIterationsAfterCollisionFree() const;
55  double getSmoothnessCostWeight() const;
56  double getObstacleCostWeight() const;
57  bool getAnimatePath() const;
58  double getLearningRate() const;
59  double getSmoothnessCostVelocity() const;
60  double getSmoothnessCostAcceleration() const;
61  double getSmoothnessCostJerk() const;
62  bool getAddRandomness() const;
63  bool getUseHamiltonianMonteCarlo() const;
64  double getHmcDiscretization() const;
65  double getHmcStochasticity() const;
66  double getHmcAnnealingFactor() const;
67  double getRidgeFactor() const;
68  bool getUsePseudoInverse() const;
69  double getPseudoInverseRidgeFactor() const;
70  bool getAnimateEndeffector() const;
71  std::string getAnimateEndeffectorSegment() const;
72 
73 private:
74  double planning_time_limit_;
75  int max_iterations_;
76  int max_iterations_after_collision_free_;
77  double smoothness_cost_weight_;
78  double obstacle_cost_weight_;
79  double learning_rate_;
80  bool animate_path_;
81  double smoothness_cost_velocity_;
82  double smoothness_cost_acceleration_;
83  double smoothness_cost_jerk_;
84  bool add_randomness_;
85  bool use_hamiltonian_monte_carlo_;
86  double hmc_stochasticity_;
87  double hmc_discretization_;
88  double hmc_annealing_factor_;
89  double ridge_factor_;
90  bool use_pseudo_inverse_;
91  double pseudo_inverse_ridge_factor_;
92  bool animate_endeffector_;
93  std::string animate_endeffector_segment_;
94 
95 };
96 
98 
99 inline double ChompParameters::getPlanningTimeLimit() const
100 {
101  return planning_time_limit_;
102 }
103 
104 inline void ChompParameters::setPlanningTimeLimit(double planning_time_limit)
105 {
106  planning_time_limit_ = planning_time_limit;
107 }
108 
109 inline int ChompParameters::getMaxIterations() const
110 {
111  return max_iterations_;
112 }
113 
114 inline int ChompParameters::getMaxIterationsAfterCollisionFree() const
115 {
116  return max_iterations_after_collision_free_;
117 }
118 
119 inline double ChompParameters::getSmoothnessCostWeight() const
120 {
121  return smoothness_cost_weight_;
122 }
123 
124 inline double ChompParameters::getObstacleCostWeight() const
125 {
126  return obstacle_cost_weight_;
127 }
128 
129 inline double ChompParameters::getLearningRate() const
130 {
131  return learning_rate_;
132 }
133 
134 inline bool ChompParameters::getAnimatePath() const
135 {
136  return animate_path_;
137 }
138 
139 inline bool ChompParameters::getAddRandomness() const
140 {
141  return add_randomness_;
142 }
143 
144 inline double ChompParameters::getSmoothnessCostVelocity() const
145 {
146  return smoothness_cost_velocity_;
147 }
148 
149 inline double ChompParameters::getSmoothnessCostAcceleration() const
150 {
151  return smoothness_cost_acceleration_;
152 }
153 
154 inline double ChompParameters::getSmoothnessCostJerk() const
155 {
156  return smoothness_cost_jerk_;
157 }
158 
159 inline double ChompParameters::getHmcDiscretization() const
160 {
161  return hmc_discretization_;
162 }
163 
164 inline double ChompParameters::getHmcStochasticity() const
165 {
166  return hmc_stochasticity_;
167 }
168 
169 inline double ChompParameters::getHmcAnnealingFactor() const
170 {
171  return hmc_annealing_factor_;
172 }
173 
174 inline bool ChompParameters::getUseHamiltonianMonteCarlo() const
175 {
176  return use_hamiltonian_monte_carlo_;
177 }
178 
179 inline double ChompParameters::getRidgeFactor() const
180 {
181  return ridge_factor_;
182 }
183 
184 inline bool ChompParameters::getUsePseudoInverse() const
185 {
186  return use_pseudo_inverse_;
187 }
188 
189 inline double ChompParameters::getPseudoInverseRidgeFactor() const
190 {
191  return pseudo_inverse_ridge_factor_;
192 }
193 
194 inline std::string ChompParameters::getAnimateEndeffectorSegment() const
195 {
196  return animate_endeffector_segment_;
197 }
198 
199 #endif /* CHOMP_PARAMETERS_H_ */
Definition: chompParameters.hpp:42
ChompParameters()
Definition: chompParameters.cpp:45