diff --git a/schema/problem/Problem.schema b/schema/problem/Problem.schema index 71d7f9b6930adf84fe83cee67b4cb4830aeae838..aeec0a341547c0956d67fee52d277cc606e9be44 100644 --- a/schema/problem/Problem.schema +++ b/schema/problem/Problem.schema @@ -24,6 +24,6 @@ sensors: _doc: A sequence of all the sensors. processors: _type: derived[] - _base: ProcessorBaseWithSensor.schema + _base: ProcessorBase.schema _mandatory: true _doc: A sequence of all the processors. diff --git a/schema/processor/ProcessorBase.schema b/schema/processor/ProcessorBase.schema index 51f801a8dc0b48dbc2b680c0cba41edecc2158b5..e443f0c5bc981da837cf5906695a70d09b47ffdc 100644 --- a/schema/processor/ProcessorBase.schema +++ b/schema/processor/ProcessorBase.schema @@ -5,6 +5,11 @@ name: _type: string _doc: The processor's name. It has to be unique. +sensor_name: + _mandatory: true + _type: string + _doc: The name of the sensor corresponding to this processor. + time_tolerance: _mandatory: true _type: double diff --git a/schema/processor/ProcessorBaseWithSensor.schema b/schema/processor/ProcessorBaseWithSensor.schema deleted file mode 100644 index 41f0c1346a8bafb34382d29b56f2cce4ebcffa5d..0000000000000000000000000000000000000000 --- a/schema/processor/ProcessorBaseWithSensor.schema +++ /dev/null @@ -1,6 +0,0 @@ -follow: ProcessorBase.schema - -sensor_name: - _mandatory: true - _type: string - _doc: The name of the sensor corresponding to this processor. \ No newline at end of file diff --git a/src/problem/problem.cpp b/src/problem/problem.cpp index c138baaea76f448542502d0c5bce51724ac4760c..965a0aa506d3127489bb7b53cc8722f3e070bcea 100644 --- a/src/problem/problem.cpp +++ b/src/problem/problem.cpp @@ -285,11 +285,11 @@ ProcessorBasePtr Problem::installProcessor(const YAML::Node& _processor_node, st // Add the installed schema folders after optional input _schema_folders FolderRegistry::appendRegisteredFolders(_schema_folders); - // Validate against ProcessorBaseWithSensor (check if it has 'type' and 'plugin') + // Validate against ProcessorBase (check if it has 'type' and 'plugin') // NOTE: Validation with the correponding schema is done in the creator auto server = yaml_schema_cpp::YamlServer(_schema_folders); server.setYaml(_processor_node); - if (not server.applySchema("ProcessorBaseWithSensor")) + if (not server.applySchema("ProcessorBase")) { WOLF_ERROR(server.getLog()); throw std::runtime_error("Processor could not be created!"); @@ -399,7 +399,7 @@ ProcessorBasePtr Problem::installProcessor(const std::string& _params_yaml // Validate against ProcessorBase and derived type // NOTE: Validation with the correponding schema is done in the creator - if (not server.applySchema("ProcessorBaseWithSensor")) + if (not server.applySchema("ProcessorBase")) { WOLF_ERROR(server.getLog()); throw std::runtime_error("Processor could not be created."); diff --git a/test/yaml/processor_diff_drive.yaml b/test/yaml/processor_diff_drive.yaml index e4eff792b83ff56926990e9f1d6507c3ff2d2a9d..3038396158b94fbf4a0ad483e9df9f5324dac0d0 100644 --- a/test/yaml/processor_diff_drive.yaml +++ b/test/yaml/processor_diff_drive.yaml @@ -2,6 +2,7 @@ name: "a cool processor diff drive" type: ProcessorDiffDrive plugin: core +sensor_name: whatever time_tolerance: 0.5 # seconds diff --git a/test/yaml/processor_fixed_wing_model.yaml b/test/yaml/processor_fixed_wing_model.yaml index 6a5b36e86e8d2c3bc1f1584bf9f6404c69845956..4968ab03b024f22da99e0ab306bc781be25cfd87 100644 --- a/test/yaml/processor_fixed_wing_model.yaml +++ b/test/yaml/processor_fixed_wing_model.yaml @@ -1,6 +1,7 @@ name: a cool processor for a fixed wing drone type: ProcessorFixedWingModel plugin: core +sensor_name: whatever time_tolerance: 0.01 # seconds diff --git a/test/yaml/processor_landmark_external.yaml b/test/yaml/processor_landmark_external.yaml index c97236f5a495ec6cfaf8f88494bf351538045548..b70dcc32f26786e0acdb2a313b8964523100ada1 100644 --- a/test/yaml/processor_landmark_external.yaml +++ b/test/yaml/processor_landmark_external.yaml @@ -1,6 +1,7 @@ name: cool dummy processor type: ProcessorLandmarkExternal plugin: core +sensor_name: whatever keyframe_vote: voting_active: true diff --git a/test/yaml/processor_loop_closure_dummy.yaml b/test/yaml/processor_loop_closure_dummy.yaml index 97064c355d165bbed5c31bf06763c586fd816004..034c8d78e91f934174a4cf55ea8a9c871ad964bc 100644 --- a/test/yaml/processor_loop_closure_dummy.yaml +++ b/test/yaml/processor_loop_closure_dummy.yaml @@ -1,6 +1,7 @@ name: a cool processor loop closure type: ProcessorLoopClosureDummy plugin: core +sensor_name: whatever time_tolerance: 0.5 # seconds apply_loss_function: false diff --git a/test/yaml/processor_motion_provider_dummy1.yaml b/test/yaml/processor_motion_provider_dummy1.yaml index 8d1ba78b0b4d2d562dd7c39f1310d93ef82aa8da..5dd618ce376476c8335291aaefccc4471290147c 100644 --- a/test/yaml/processor_motion_provider_dummy1.yaml +++ b/test/yaml/processor_motion_provider_dummy1.yaml @@ -2,6 +2,7 @@ name: "not getter processor" type: ProcessorMotionProviderDummy plugin: core +sensor_name: whatever time_tolerance: 0.5 # seconds diff --git a/test/yaml/processor_motion_provider_dummy2.yaml b/test/yaml/processor_motion_provider_dummy2.yaml index 43605186bbe97898eeb8dac875352a672def45de..89a43d702b3fc97432ad4ec808ccfdddd713c567 100644 --- a/test/yaml/processor_motion_provider_dummy2.yaml +++ b/test/yaml/processor_motion_provider_dummy2.yaml @@ -2,6 +2,7 @@ name: "getter processor" type: ProcessorMotionProviderDummy plugin: core +sensor_name: whatever time_tolerance: 0.5 # seconds diff --git a/test/yaml/processor_motion_provider_dummy3.yaml b/test/yaml/processor_motion_provider_dummy3.yaml index 3414e1820bf47d574a1b5539588923abc9858a8f..79904604dc0eec235e5e01274fed0df7e369370a 100644 --- a/test/yaml/processor_motion_provider_dummy3.yaml +++ b/test/yaml/processor_motion_provider_dummy3.yaml @@ -2,6 +2,7 @@ name: "getter processor lower priority" type: ProcessorMotionProviderDummyPOV plugin: core +sensor_name: whatever time_tolerance: 0.5 # seconds diff --git a/test/yaml/processor_odom_2d.yaml b/test/yaml/processor_odom_2d.yaml index bdd02893d41c1978a5484fdcfe4bae95c20a8181..5d747b7bbfefffdc35deec6c9271dadefd39cc92 100644 --- a/test/yaml/processor_odom_2d.yaml +++ b/test/yaml/processor_odom_2d.yaml @@ -2,6 +2,7 @@ name: "a cool processor odom 2d" type: ProcessorOdom2d plugin: core +sensor_name: sensor_odom time_tolerance: 0.005 # seconds diff --git a/test/yaml/processor_odom_2d_inactive.yaml b/test/yaml/processor_odom_2d_inactive.yaml index 2864aef8e6db94367064766eda4b6dabb54105f2..b75bd890984ae6ff4d34a1d31ec396a4f37b0d87 100644 --- a/test/yaml/processor_odom_2d_inactive.yaml +++ b/test/yaml/processor_odom_2d_inactive.yaml @@ -2,6 +2,7 @@ name: "a cool processor odom 2d" type: ProcessorOdom2d plugin: core +sensor_name: whatever time_tolerance: 0.005 # seconds diff --git a/test/yaml/processor_odom_3d.yaml b/test/yaml/processor_odom_3d.yaml index 3653c5af7fa5d34bf2e4e57ea7e119a58bd4eda7..2dd89e99b708b8266df4088705918fa30826021e 100644 --- a/test/yaml/processor_odom_3d.yaml +++ b/test/yaml/processor_odom_3d.yaml @@ -2,6 +2,7 @@ name: a cool processor odom 3d type: ProcessorOdom3d plugin: core +sensor_name: whatever time_tolerance: 0.01 # seconds diff --git a/test/yaml/processor_odom_3d_inactive.yaml b/test/yaml/processor_odom_3d_inactive.yaml index e5c846447765f6b47e6eb211673fa2b08c2d8026..0693a23d049bd124cb601175aadbd6174657d1a7 100644 --- a/test/yaml/processor_odom_3d_inactive.yaml +++ b/test/yaml/processor_odom_3d_inactive.yaml @@ -2,6 +2,7 @@ name: a cool processor odom 3d type: ProcessorOdom3d plugin: core +sensor_name: whatever time_tolerance: 0.01 # seconds diff --git a/test/yaml/processor_pose_3d.yaml b/test/yaml/processor_pose_3d.yaml index d319bbaa372a3f345244e0490b30dac98706817b..dc98db13ed8f4e7f01601a1211ab679a4de6cdfd 100644 --- a/test/yaml/processor_pose_3d.yaml +++ b/test/yaml/processor_pose_3d.yaml @@ -2,6 +2,7 @@ name: a cool processor pose 3d type: ProcessorPose3d plugin: core +sensor_name: whatever time_tolerance: 0.01 # seconds diff --git a/test/yaml/processor_tracker_feature_dummy.yaml b/test/yaml/processor_tracker_feature_dummy.yaml index ed268cb6d048080ae30cc0b8de8bce5bf0298e73..4139a42cd48cac30a4c8fd981a09ca925cb3508f 100644 --- a/test/yaml/processor_tracker_feature_dummy.yaml +++ b/test/yaml/processor_tracker_feature_dummy.yaml @@ -1,6 +1,8 @@ name: cool dummy processor type: ProcessorTrackerFeatureDummy plugin: core +sensor_name: whatever + time_tolerance: 0.25 keyframe_vote: voting_active: true diff --git a/test/yaml/processor_tracker_landmark_dummy.yaml b/test/yaml/processor_tracker_landmark_dummy.yaml index 38af2673027e96f5418d61943d025a05caee4232..95a8ab17eb411ec11daf4453c22096f055ec2bd7 100644 --- a/test/yaml/processor_tracker_landmark_dummy.yaml +++ b/test/yaml/processor_tracker_landmark_dummy.yaml @@ -1,6 +1,8 @@ name: cool dummy processor type: ProcessorTrackerLandmarkDummy plugin: core +sensor_name: whatever + time_tolerance: 0.25 keyframe_vote: voting_active: true diff --git a/test/yaml/processor_tracker_two_processors_1.yaml b/test/yaml/processor_tracker_two_processors_1.yaml index 1b71975c9e4cec7379cc66d0c535cbc7e4a3928b..20b3c02571eefd1032d0d4e86019f4150d3927eb 100644 --- a/test/yaml/processor_tracker_two_processors_1.yaml +++ b/test/yaml/processor_tracker_two_processors_1.yaml @@ -1,6 +1,8 @@ name: processor_1 type: ProcessorTrackerFeatureDummy plugin: core +sensor_name: whatever + time_tolerance: 0.5 keyframe_vote: voting_active: true diff --git a/test/yaml/processor_tracker_two_processors_2.yaml b/test/yaml/processor_tracker_two_processors_2.yaml index ef69a2eb0323488d73d68201ad4b007bcf5c5dd9..b2ad07b9cd52362a0010b04135498f96ea21733d 100644 --- a/test/yaml/processor_tracker_two_processors_2.yaml +++ b/test/yaml/processor_tracker_two_processors_2.yaml @@ -1,6 +1,8 @@ name: processor_2 type: ProcessorTrackerFeatureDummy plugin: core +sensor_name: whatever + time_tolerance: 0.5 keyframe_vote: voting_active: true