16 CActionRobotMovement2D::TMotionModelOptions::TOptions_ThrunModel& thrunModel)
20 auto getParam = [&success, &sub_nh](
const std::string
param,
auto& val) {
21 success = success && sub_nh.getParam(param, val);
24 thrunModel.nParticlesCount = sub_nh.param<
int>(
"particle_count", 100);
25 getParam(
"alfa1_rot_rot", thrunModel.alfa1_rot_rot);
26 getParam(
"alfa2_rot_trans", thrunModel.alfa2_rot_trans);
27 getParam(
"alfa3_trans_trans", thrunModel.alfa3_trans_trans);
28 getParam(
"alfa4_trans_rot", thrunModel.alfa4_trans_rot);
29 getParam(
"additional_std_XY", thrunModel.additional_std_XY);
30 getParam(
"additional_std_phi", thrunModel.additional_std_phi);
35 CActionRobotMovement2D::TMotionModelOptions::TOptions_GaussianModel& gaussian_model)
39 auto getParam = [&success, &sub_nh](
const std::string param,
auto& val) {
40 success = success && sub_nh.getParam(param, val);
43 getParam(
"a1", gaussian_model.a1);
44 getParam(
"a2", gaussian_model.a2);
45 getParam(
"a3", gaussian_model.a3);
46 getParam(
"a4", gaussian_model.a4);
47 getParam(
"minStdXY", gaussian_model.minStdXY);
48 getParam(
"minStdPHI", gaussian_model.minStdPHI);
53 CActionRobotMovement2D::TMotionModelOptions& motion_model_options)
55 static const std::map<std::string, CActionRobotMovement2D::TDrawSampleMotionModel> motion_models = {
56 {
"thrun", CActionRobotMovement2D::mmThrun }, {
"gaussian", CActionRobotMovement2D::mmGaussian }
61 auto getParam = [&success, &sub_nh](
const std::string param,
auto& val) {
62 success = success && sub_nh.getParam(param, val);
65 std::string model_type;
66 getParam(
"type", model_type);
67 if (!motion_models.count(model_type))
69 ROS_ERROR_STREAM(
"Specified motion model " << model_type <<
" is not supported.");
72 motion_model_options.modelSelection = motion_models.at(model_type);
73 success = success && loadThrunModelParameters(sub_nh, motion_model_options.thrunModel);
74 success = success && loadGaussianModelParameters(sub_nh, motion_model_options.gaussianModel);
78 bool loadVisualizationOptions(
const ros::NodeHandle& nh, PFslam::Options& options)
82 success = success && sub_nh.getParam(
"width", options.PROGRESS_WINDOW_WIDTH_);
83 success = success && sub_nh.getParam(
"height", options.PROGRESS_WINDOW_HEIGHT_);
84 success = success && sub_nh.getParam(
"window_update_delay", options.SHOW_PROGRESS_IN_WINDOW_DELAY_MS_);
85 success = success && sub_nh.getParam(
"show_window", options.SHOW_PROGRESS_IN_WINDOW_);
86 success = success && sub_nh.getParam(
"camera_follow_robot", options.CAMERA_3DSCENE_FOLLOWS_ROBOT_);
95 success = success && loadVisualizationOptions(nh, options);
bool param(const std::string ¶m_name, T ¶m_val, const T &default_val)
bool loadOptions(const ros::NodeHandle &nh, PFslam::Options &options)
bool getParam(const std::string &key, std::string &s) const
std::string simplemap_path_prefix
#define ROS_ERROR_STREAM(args)
mrpt::obs::CActionRobotMovement2D::TMotionModelOptions motion_model_options_