Fixed build

This commit is contained in:
matlabbe
2020-11-21 17:12:09 -05:00
parent ccbdb586da
commit ab1aa5578a
2 changed files with 4 additions and 4 deletions

View File

@@ -753,8 +753,8 @@ class RTABMAP_EXP Parameters
RTABMAP_PARAM(Marker, VarianceLinear, float, 0.001, "Linear variance to set on marker detections.");
RTABMAP_PARAM(Marker, VarianceAngular, float, 0.01, "Angular variance to set on marker detections. Set to >=9999 to use only position (xyz) constraint in graph optimization.");
RTABMAP_PARAM(Marker, CornerRefinementMethod, int, 0, "Corner refinement method (0: None, 1: Subpixel, 2:contour, 3: AprilTag2). For OpenCV <3.3.0, this is \"doCornerRefinement\" parameter: set 0 for false and 1 for true.");
RTABMAP_PARAM(Marker, MaxRange, float, -1, "Maximum range in which markers will be detected. -1 is reserved for unlimited range.")
RTABMAP_PARAM(Marker, MinRange, float, -1, "Miniminum range in which markers will be detected. -1 is reserved for unlimited range.")
RTABMAP_PARAM(Marker, MaxRange, float, 0.0, "Maximum range in which markers will be detected. <=0 for unlimited range.");
RTABMAP_PARAM(Marker, MinRange, float, 0.0, "Miniminum range in which markers will be detected. <=0 for unlimited range.");
RTABMAP_PARAM(ImuFilter, MadgwickGain, double, 0.1, "Gain of the filter. Higher values lead to faster convergence but more noise. Lower values lead to slower convergence but smoother signal, belongs in [0, 1].");
RTABMAP_PARAM(ImuFilter, MadgwickZeta, double, 0.0, "Gyro drift gain (approx. rad/s), belongs in [-1, 1].");

View File

@@ -197,8 +197,8 @@ std::map<int, Transform> MarkerDetector::detect(const cv::Mat & image, const Cam
// Limit the detection range to be between the min / max range.
// If the ranges are -1, allow any detection within that direction.
if((maxRange_ == -1 || tvecs[i].val[2] < maxRange_) &&
(minRange_ == -1 || tvecs[i].val[2] > minRange_))
if((maxRange_ <= 0 || tvecs[i].val[2] < maxRange_) &&
(minRange_ <= 0 || tvecs[i].val[2] > minRange_))
{
cv::Mat R;
cv::Rodrigues(rvecs[i], R);