aruco_pose: make aruco_detect/length parameter dynamic

This commit is contained in:
Oleg Kalachev
2022-05-26 12:47:08 +03:00
parent 7df4cb2589
commit 07cac29937
2 changed files with 4 additions and 1 deletions

View File

@@ -10,6 +10,8 @@ gen = ParameterGenerator()
gen.add("enabled", bool_t, 0, "if detection enabled", True)
gen.add("length", double_t, 0, "markers' side length", min=0, max=10)
gen.add("adaptiveThreshConstant", double_t, 0,
"Constant for adaptive thresholding before finding contours",
p.adaptiveThreshConstant, 0, 100)

View File

@@ -385,7 +385,8 @@ private:
void paramCallback(aruco_pose::DetectorConfig &config, uint32_t level)
{
enabled_ = config.enabled;
enabled_ = config.enabled && config.length > 0;
length_ = config.length;
parameters_->adaptiveThreshConstant = config.adaptiveThreshConstant;
parameters_->adaptiveThreshWinSizeMin = config.adaptiveThreshWinSizeMin;
parameters_->adaptiveThreshWinSizeMax = config.adaptiveThreshWinSizeMax;