Remove unused code. (#384)

master
Holger Rapp 2017-07-05 12:16:29 +02:00 committed by GitHub
parent 7434e96369
commit 9b48ba5ff4
4 changed files with 0 additions and 157 deletions

View File

@ -28,7 +28,6 @@
#include "cartographer/mapping_2d/scan_matching/real_time_correlative_scan_matcher.h"
#include "cartographer/mapping_2d/submaps.h"
#include "cartographer/mapping_3d/motion_filter.h"
#include "cartographer/sensor/configuration.h"
#include "cartographer/sensor/voxel_filter.h"
#include "cartographer/transform/rigid_transform.h"

View File

@ -1,73 +0,0 @@
/*
* Copyright 2016 The Cartographer Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "cartographer/sensor/configuration.h"
#include "Eigen/Core"
#include "Eigen/Geometry"
#include "cartographer/sensor/proto/configuration.pb.h"
#include "cartographer/transform/proto/transform.pb.h"
#include "cartographer/transform/rigid_transform.h"
#include "cartographer/transform/transform.h"
#include "glog/logging.h"
namespace cartographer {
namespace sensor {
proto::Configuration::Sensor CreateSensorConfiguration(
common::LuaParameterDictionary* const parameter_dictionary) {
proto::Configuration::Sensor sensor;
sensor.set_frame_id(parameter_dictionary->GetString("frame_id"));
*sensor.mutable_transform() = transform::ToProto(transform::FromDictionary(
parameter_dictionary->GetDictionary("transform").get()));
return sensor;
}
proto::Configuration CreateConfiguration(
common::LuaParameterDictionary* const parameter_dictionary) {
proto::Configuration configuration;
for (auto& sensor_parameter_dictionary :
parameter_dictionary->GetArrayValuesAsDictionaries()) {
*configuration.add_sensor() =
CreateSensorConfiguration(sensor_parameter_dictionary.get());
}
return configuration;
}
bool IsEnabled(const string& frame_id,
const sensor::proto::Configuration& sensor_configuration) {
for (const auto& sensor : sensor_configuration.sensor()) {
if (sensor.frame_id() == frame_id) {
return true;
}
}
return false;
}
transform::Rigid3d GetTransformToTracking(
const string& frame_id,
const sensor::proto::Configuration& sensor_configuration) {
for (const auto& sensor : sensor_configuration.sensor()) {
if (sensor.frame_id() == frame_id) {
return transform::ToRigid3(sensor.transform());
}
}
LOG(FATAL) << "No configuration found for sensor with frame ID '" << frame_id
<< "'.";
}
} // namespace sensor
} // namespace cartographer

View File

@ -1,50 +0,0 @@
/*
* Copyright 2016 The Cartographer Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef CARTOGRAPHER_SENSOR_CONFIGURATION_H_
#define CARTOGRAPHER_SENSOR_CONFIGURATION_H_
#include "Eigen/Geometry"
#include "cartographer/common/lua_parameter_dictionary.h"
#include "cartographer/sensor/proto/configuration.pb.h"
#include "cartographer/transform/rigid_transform.h"
namespace cartographer {
namespace sensor {
// Creates the configuration for a singular sensor from 'parameter_dictionary'.
proto::Configuration::Sensor CreateSensorConfiguration(
common::LuaParameterDictionary* parameter_dictionary);
// Creates the mapping from frame_id to Sensors defined in
// 'parameter_dictionary'.
proto::Configuration CreateConfiguration(
common::LuaParameterDictionary* parameter_dictionary);
// Returns true if 'frame_id' is mentioned in 'sensor_configuration'.
bool IsEnabled(const string& frame_id,
const sensor::proto::Configuration& sensor_configuration);
// Returns the transform which takes data from the sensor frame to the
// tracking frame.
transform::Rigid3d GetTransformToTracking(
const string& frame_id,
const sensor::proto::Configuration& sensor_configuration);
} // namespace sensor
} // namespace cartographer
#endif // CARTOGRAPHER_SENSOR_CONFIGURATION_H_

View File

@ -1,33 +0,0 @@
// Copyright 2016 The Cartographer Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto2";
package cartographer.sensor.proto;
import "cartographer/transform/proto/transform.proto";
// NEXT_ID: 16
message Configuration {
// NEXT_ID: 4
message Sensor {
// 'frame_id' of the sensor.
optional string frame_id = 2;
// Transformation from 'frame_id' to the tracking frame.
optional transform.proto.Rigid3d transform = 3;
}
repeated Sensor sensor = 15;
}