Skip the Collator for the landmark data. (#1184)

master
Alexander Belyaev 2018-06-06 14:14:01 +02:00 committed by GitHub
parent 5bda2a567c
commit 4ef38497a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -38,6 +38,8 @@ CollatedTrajectoryBuilder::CollatedTrajectoryBuilder(
last_logging_time_(std::chrono::steady_clock::now()) {
std::unordered_set<std::string> expected_sensor_id_strings;
for (const auto& sensor_id : expected_sensor_ids) {
// Landmark data does not need to be collated.
if (sensor_id.type == SensorId::SensorType::LANDMARK) continue;
expected_sensor_id_strings.insert(sensor_id.id);
}
sensor_collator_->AddTrajectory(

View File

@ -74,7 +74,7 @@ class CollatedTrajectoryBuilder : public TrajectoryBuilderInterface {
void AddSensorData(const std::string& sensor_id,
const sensor::LandmarkData& landmark_data) override {
AddData(sensor::MakeDispatchable(sensor_id, landmark_data));
wrapped_trajectory_builder_->AddSensorData(sensor_id, landmark_data);
}
void AddLocalSlamResultData(std::unique_ptr<mapping::LocalSlamResultData>