Skip to content
Snippets Groups Projects
Commit 20a4fd17 authored by Mederic Fourmy's avatar Mederic Fourmy
Browse files

Adapted apriltag processor gtest to apriltag 3 families + minor yaml inconsistencies

parent c79bac2a
No related branches found
No related tags found
1 merge request!233WIP: Apriltag
processor type: "IMU" # This must match the KEY used in the SensorFactory. Otherwise it is an error. processor type: "IMU" # This must match the KEY used in the SensorFactory. Otherwise it is an error.
processor name: "Main imu" # This is ignored. The name provided to the SensorFactory prevails processor name: "Main imu" # This is ignored. The name provided to the SensorFactory prevails
unmeasured perturbation std: 0.00001 unmeasured perturbation std: 0.00001
time tolerance: 0.0025 # Time tolerance for joining KFs
keyframe vote: keyframe vote:
max time span: 2.0 # seconds max time span: 2.0 # seconds
max buffer length: 20000 # motion deltas max buffer length: 20000 # motion deltas
......
processor type: "IMU" # This must match the KEY used in the SensorFactory. Otherwise it is an error. processor type: "IMU" # This must match the KEY used in the SensorFactory. Otherwise it is an error.
processor name: "Main imu" # This is ignored. The name provided to the SensorFactory prevails processor name: "Main imu" # This is ignored. The name provided to the SensorFactory prevails
time tolerance: 0.0025 # Time tolerance for joining KFs
unmeasured perturbation std: 0.00001 unmeasured perturbation std: 0.00001
keyframe vote: keyframe vote:
max time span: 999999.0 # seconds max time span: 999999.0 # seconds
......
processor type: "IMU" # This must match the KEY used in the SensorFactory. Otherwise it is an error. processor type: "IMU" # This must match the KEY used in the SensorFactory. Otherwise it is an error.
processor name: "Main imu" # This is ignored. The name provided to the SensorFactory prevails processor name: "Main imu" # This is ignored. The name provided to the SensorFactory prevails
unmeasured perturbation std: 0.00001 unmeasured perturbation std: 0.00001
time tolerance: 0.0025 # Time tolerance for joining KFs
keyframe vote: keyframe vote:
max time span: 0.9999 # seconds max time span: 0.9999 # seconds
max buffer length: 10000 # motion deltas max buffer length: 10000 # motion deltas
......
processor type: "IMU" # This must match the KEY used in the SensorFactory. Otherwise it is an error. processor type: "IMU" # This must match the KEY used in the SensorFactory. Otherwise it is an error.
processor name: "Main imu" # This is ignored. The name provided to the SensorFactory prevails processor name: "Main imu" # This is ignored. The name provided to the SensorFactory prevails
unmeasured perturbation std: 0.00001 unmeasured perturbation std: 0.00001
time tolerance: 0.0025 # Time tolerance for joining KFs
keyframe vote: keyframe vote:
max time span: 5.9999 # seconds max time span: 5.9999 # seconds
max buffer length: 10000 # motion deltas max buffer length: 10000 # motion deltas
......
...@@ -126,26 +126,47 @@ TEST(ProcessorTrackerLandmarkApriltag, Constructor) ...@@ -126,26 +126,47 @@ TEST(ProcessorTrackerLandmarkApriltag, Constructor)
std::string s2; std::string s2;
ProcessorParamsTrackerLandmarkApriltagPtr params = std::make_shared<ProcessorParamsTrackerLandmarkApriltag>(); ProcessorParamsTrackerLandmarkApriltagPtr params = std::make_shared<ProcessorParamsTrackerLandmarkApriltag>();
params->tag_family_ = "tag36h11";
ProcessorTrackerLandmarkApriltagPtr p = std::make_shared<ProcessorTrackerLandmarkApriltag>(params); ProcessorTrackerLandmarkApriltagPtr p;
params->tag_family_ = "tag16h5";
p = std::make_shared<ProcessorTrackerLandmarkApriltag>(params);
ASSERT_TRUE(p->getTagFamily() == params->tag_family_); ASSERT_TRUE(p->getTagFamily() == params->tag_family_);
params->tag_family_ = "tag36h10"; params->tag_family_ = "tag25h9";
p = std::make_shared<ProcessorTrackerLandmarkApriltag>(params); p = std::make_shared<ProcessorTrackerLandmarkApriltag>(params);
ASSERT_TRUE(p->getTagFamily() == params->tag_family_); ASSERT_TRUE(p->getTagFamily() == params->tag_family_);
params->tag_family_ = "tag36artoolkit"; params->tag_family_ = "tag36h11";
p = std::make_shared<ProcessorTrackerLandmarkApriltag>(params); p = std::make_shared<ProcessorTrackerLandmarkApriltag>(params);
ASSERT_TRUE(p->getTagFamily() == "artoolkit"); // This tagfamily is stored differently by apriltag library ASSERT_TRUE(p->getTagFamily() == params->tag_family_);
params->tag_family_ = "tag25h9"; params->tag_family_ = "tagCircle21h7";
p = std::make_shared<ProcessorTrackerLandmarkApriltag>(params); p = std::make_shared<ProcessorTrackerLandmarkApriltag>(params);
ASSERT_TRUE(p->getTagFamily() == params->tag_family_); ASSERT_TRUE(p->getTagFamily() == params->tag_family_);
params->tag_family_ = "tag25h7"; params->tag_family_ = "tagStandard41h12";
p = std::make_shared<ProcessorTrackerLandmarkApriltag>(params); p = std::make_shared<ProcessorTrackerLandmarkApriltag>(params);
ASSERT_TRUE(p->getTagFamily() == params->tag_family_); ASSERT_TRUE(p->getTagFamily() == params->tag_family_);
// ! At the time of this test rewriting, Apriltag3 bugs on the creation of the
// subsequent family's detector
// NOPE
// params->tag_family_ = "tagCircle49h12";
// p = std::make_shared<ProcessorTrackerLandmarkApriltag>(params);
// ASSERT_TRUE(p->getTagFamily() == params->tag_family_);
// NOPE
// params->tag_family_ = "tagCustom48h12";
// p = std::make_shared<ProcessorTrackerLandmarkApriltag>(params);
// ASSERT_TRUE(p->getTagFamily() == params->tag_family_);
// NOPE
// params->tag_family_ = "tagStandard52h13";
// p = std::make_shared<ProcessorTrackerLandmarkApriltag>(params);
// ASSERT_TRUE(p->getTagFamily() == params->tag_family_);
params->tag_family_ = "wrong_family"; params->tag_family_ = "wrong_family";
WOLF_INFO("The following runtime error \"Unrecognized tag family name. Use e.g. \"tag36h11\".\" is expected and does not imply a failed test:"); WOLF_INFO("The following runtime error \"Unrecognized tag family name. Use e.g. \"tag36h11\".\" is expected and does not imply a failed test:");
ASSERT_DEATH( { std::make_shared<ProcessorTrackerLandmarkApriltag>(params); }, "" ); ASSERT_DEATH( { std::make_shared<ProcessorTrackerLandmarkApriltag>(params); }, "" );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment