MCPcopy Create free account
hub / github.com/KumarRobotics/sloam / initParams_

Method initParams_

sloam/src/core/sloamNode.cpp:57–128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55 }
56
57 void SLOAMNode::initParams_()
58 {
59 // PARAMETERS
60 float beam_cluster_threshold = nh_.param("beam_cluster_threshold", 0.1);
61 int min_vertex_size = nh_.param("min_vertex_size", 2);
62 float max_dist_to_centroid = nh_.param("max_dist_to_centroid", 0.2);
63 int min_landmark_size = nh_.param("min_landmark_size", 4);
64 float min_landmark_height = nh_.param("min_landmark_height", 1);
65
66 Instance::Params params;
67 params.beam_cluster_threshold = beam_cluster_threshold;
68 params.min_vertex_size = min_vertex_size;
69 params.max_dist_to_centroid = max_dist_to_centroid;
70 params.min_landmark_size = min_landmark_size;
71 params.min_landmark_height = min_landmark_height;
72
73 // Creating objects for submodules
74 std::string modelFilepath;
75 nh_.param<std::string>("seg_model_path", modelFilepath, "");
76 ROS_DEBUG_STREAM("MODEL PATH: " << modelFilepath);
77 float fov = nh_.param("seg_lidar_fov", 22.5);
78 int lidar_w = nh_.param("seg_lidar_w", 2048);
79 int lidar_h = nh_.param("seg_lidar_h", 64);
80 bool do_destagger = nh_.param("do_destagger", true);
81 auto temp_seg = boost::make_shared<seg::Segmentation>(modelFilepath, fov, -fov, lidar_w, lidar_h, 1, do_destagger);
82 segmentator_ = std::move(temp_seg);
83
84 semanticMap_ = MapManager();
85
86 graphDetector_ = Instance();
87 graphDetector_.set_params(params);
88 graphDetector_.reset_tree_id();
89
90 fmParams_.scansPerSweep = 1;
91 fmParams_.minTreeModels = nh_.param("min_tree_models", 15);
92 fmParams_.minGroundModels = nh_.param("min_ground_models", 50);
93 fmParams_.maxLidarDist = nh_.param("max_lidar_dist", 15.0);
94 fmParams_.maxGroundLidarDist = nh_.param("max_ground_dist", 30.0);
95 fmParams_.minGroundLidarDist = nh_.param("min_ground_dist", 0.0);
96
97 fmParams_.twoStepOptim = nh_.param("two_step_optim", false);
98
99 fmParams_.groundRadiiBins = nh_.param("ground_radii_bins", 5);
100 fmParams_.groundThetaBins = nh_.param("ground_theta_bins", 36);
101 fmParams_.groundMatchThresh = nh_.param("ground_match_thresh", 2.0);
102 fmParams_.groundRetainThresh = nh_.param("ground_retain_thresh", 2.0);;
103
104 fmParams_.maxTreeRadius = 0.3;
105 fmParams_.maxAxisTheta = 10;
106 fmParams_.maxFocusOutlierDistance = 0.5;
107 fmParams_.roughTreeMatchThresh = nh_.param("rough_tree_match_thresh", 3.0);
108 fmParams_.treeMatchThresh = nh_.param("tree_match_thresh", 1.0);
109
110 fmParams_.AddNewTreeThreshDist = nh_.param("add_new_tree_thresh_dist", 2.0);
111
112 fmParams_.featuresPerTree = nh_.param("features_per_tree", 2);
113 fmParams_.numGroundFeatures = nh_.param("num_ground_features", 10);
114

Callers

nothing calls this directly

Calls 4

MapManagerClass · 0.85
InstanceClass · 0.85
set_paramsMethod · 0.80
reset_tree_idMethod · 0.80

Tested by

no test coverage detected