99 this->
set_value(
static_cast<T
>(parameter.get_value()));
114 this->assert_not_empty();
115 return static_cast<U
>(this->value_);
120 this->assert_not_empty();
126 this->assert_not_empty();
132 this->value_ = value;
133 this->set_empty(
false);
149static std::shared_ptr<Parameter<T>> make_shared_parameter(
const std::string& name) {
150 return std::make_shared<Parameter<T>>(name);
161static std::shared_ptr<Parameter<T>> make_shared_parameter(
const std::string& name,
const T& param_value) {
162 return std::make_shared<Parameter<T>>(name, param_value);
172[[maybe_unused]]
static std::shared_ptr<ParameterInterface> make_shared_parameter_interface(
173 const std::string& name,
const ParameterType& type,
const StateType& parameter_state_type = StateType::NONE
176 case ParameterType::BOOL:
177 return std::make_shared<Parameter<bool>>(name);
178 case ParameterType::BOOL_ARRAY:
179 return std::make_shared<Parameter<std::vector<bool>>>(name);
180 case ParameterType::INT:
181 return std::make_shared<Parameter<int>>(name);
182 case ParameterType::INT_ARRAY:
183 return std::make_shared<Parameter<std::vector<int>>>(name);
184 case ParameterType::DOUBLE:
185 return std::make_shared<Parameter<double>>(name);
186 case ParameterType::DOUBLE_ARRAY:
187 return std::make_shared<Parameter<std::vector<double>>>(name);
188 case ParameterType::STRING:
189 return std::make_shared<Parameter<std::string>>(name);
190 case ParameterType::STRING_ARRAY:
191 return std::make_shared<Parameter<std::vector<std::string>>>(name);
192 case ParameterType::STATE: {
193 switch (parameter_state_type) {
194 case StateType::CARTESIAN_STATE:
195 return std::make_shared<Parameter<CartesianState>>(name);
196 case StateType::CARTESIAN_POSE:
197 return std::make_shared<Parameter<CartesianPose>>(name);
198 case StateType::JOINT_STATE:
199 return std::make_shared<Parameter<JointState>>(name);
200 case StateType::JOINT_POSITIONS:
201 return std::make_shared<Parameter<JointPositions>>(name);
202 case StateType::GEOMETRY_ELLIPSOID:
203 return std::make_shared<Parameter<Ellipsoid>>(name);
204 case StateType::NONE:
205 throw exceptions::InvalidParameterException(
"No StateType provided.");
207 throw exceptions::InvalidParameterException(
"This StateType is not supported for parameters.");
210 case ParameterType::VECTOR:
211 return std::make_shared<Parameter<Eigen::VectorXd>>(name);
212 case ParameterType::MATRIX:
213 return std::make_shared<Parameter<Eigen::MatrixXd>>(name);
215 throw exceptions::InvalidParameterException(
"This ParameterType is not supported for parameters.");