Skip to content
Snippets Groups Projects
Commit 7002b56b authored by Joan Vallvé Navarro's avatar Joan Vallvé Navarro
Browse files

Fixed small things

parent b1bde4c8
No related branches found
No related tags found
No related merge requests found
Pipeline #3222 passed
...@@ -244,20 +244,19 @@ TEST(Problem, StateBlocks) ...@@ -244,20 +244,19 @@ TEST(Problem, StateBlocks)
// 2 state blocks, fixed // 2 state blocks, fixed
SensorBasePtr St = P->installSensor ("ODOM 2D", "other odometer", xs2d, ""); SensorBasePtr St = P->installSensor ("ODOM 2D", "other odometer", xs2d, "");
ASSERT_EQ(P->getStateBlockNotificationMapSize(), (SizeStd) (2 + 2)); // consume empties the notification map, so only should contain notification since last call ASSERT_EQ(P->getStateBlockNotificationMapSize(), (SizeStd) (2 + 2));
ProcessorParamsTrackerFeaturePtr params = std::make_shared<ProcessorParamsTrackerFeature>(); ProcessorParamsTrackerFeaturePtr params = std::make_shared<ProcessorParamsTrackerFeature>();
params->time_tolerance = 0.1; params->time_tolerance = 0.1;
params->max_new_features = 5; params->max_new_features = 5;
params->min_features_for_keyframe = 10; params->min_features_for_keyframe = 10;
// ProcessorBasePtr pt = std::make_shared<ProcessorTrackerFeatureDummy>(ProcessorTrackerFeatureDummy(params));
auto pt = ProcessorBase::emplace<ProcessorTrackerFeatureDummy>(St, ProcessorTrackerFeatureDummy(params)); auto pt = ProcessorBase::emplace<ProcessorTrackerFeatureDummy>(St, ProcessorTrackerFeatureDummy(params));
// St->addProcessor(pt);
ProcessorBasePtr pm = P->installProcessor("ODOM 3D", "odom integrator", "odometer", wolf_root + "/demos/processor_odom_3D.yaml"); ProcessorBasePtr pm = P->installProcessor("ODOM 3D", "odom integrator", "odometer", wolf_root + "/demos/processor_odom_3D.yaml");
// 2 state blocks, estimated // 2 state blocks, estimated
auto KF = P->emplaceFrame("PO", 3, KEY, xs3d, 0); auto KF = P->emplaceFrame("PO", 3, KEY, xs3d, 0);
ASSERT_EQ(P->getStateBlockNotificationMapSize(), (SizeStd)(2 + 2 + 2)); // consume empties the notification map, so only should contain notification since last call ASSERT_EQ(P->getStateBlockNotificationMapSize(), (SizeStd)(2 + 2 + 2));
// Notifications // Notifications
Notification notif; Notification notif;
...@@ -269,10 +268,7 @@ TEST(Problem, StateBlocks) ...@@ -269,10 +268,7 @@ TEST(Problem, StateBlocks)
// change some SB properties // change some SB properties
St->unfixExtrinsics(); St->unfixExtrinsics();
// ASSERT_EQ(P->getStateBlockNotificationMapSize(), (SizeStd)(0)); // consume empties the notification map, so only should contain notification since last call ASSERT_EQ(P->getStateBlockNotificationMapSize(), (SizeStd)(2 + 2 + 2)); // changes in state_blocks status (fix/state/localparam) does not raise a notification in problem, only ADD/REMOVE
// ASSERT_TRUE(P->consumeStateBlockNotificationMap().empty()); // changes in state_blocks status (fix/state/localparam) does not raise a notification in problem, only ADD/REMOVE
// ASSERT_EQ(P->getStateBlockPtrList().size(), (SizeStd)(2 + 2 + 2));
// ASSERT_EQ(P->getStateBlockNotificationMap().size(),(SizeStd)(2 + 2 + 2 /*+ 2*/)); // XXX: 2 more notifications on the same SB!
// P->print(4,1,1,1); // P->print(4,1,1,1);
......
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