Clean up the public headers in `common`. (#1775)
In common, BlockingQueue and RateTimer are not used in any public API and are made internal. `common/utils.h` is unused code and removed. Signed-off-by: Wolfgang Hess <whess@lyft.com>master
parent
6715afe70c
commit
38dcf65d8f
|
@ -25,7 +25,7 @@
|
||||||
#include "cartographer/cloud/internal/handlers/add_trajectory_handler.h"
|
#include "cartographer/cloud/internal/handlers/add_trajectory_handler.h"
|
||||||
#include "cartographer/cloud/internal/handlers/finish_trajectory_handler.h"
|
#include "cartographer/cloud/internal/handlers/finish_trajectory_handler.h"
|
||||||
#include "cartographer/cloud/internal/sensor/serialization.h"
|
#include "cartographer/cloud/internal/sensor/serialization.h"
|
||||||
#include "cartographer/common/blocking_queue.h"
|
#include "cartographer/common/internal/blocking_queue.h"
|
||||||
#include "glog/logging.h"
|
#include "glog/logging.h"
|
||||||
#include "grpc++/grpc++.h"
|
#include "grpc++/grpc++.h"
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
|
|
||||||
#include "async_grpc/execution_context.h"
|
#include "async_grpc/execution_context.h"
|
||||||
#include "cartographer/cloud/internal/local_trajectory_uploader.h"
|
#include "cartographer/cloud/internal/local_trajectory_uploader.h"
|
||||||
#include "cartographer/common/blocking_queue.h"
|
#include "cartographer/common/internal/blocking_queue.h"
|
||||||
#include "cartographer/mapping/map_builder_interface.h"
|
#include "cartographer/mapping/map_builder_interface.h"
|
||||||
#include "cartographer/mapping/pose_graph_interface.h"
|
#include "cartographer/mapping/pose_graph_interface.h"
|
||||||
#include "cartographer/mapping/proto/serialization.pb.h"
|
#include "cartographer/mapping/proto/serialization.pb.h"
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
#include "cartographer/cloud/internal/map_builder_context_interface.h"
|
#include "cartographer/cloud/internal/map_builder_context_interface.h"
|
||||||
#include "cartographer/cloud/map_builder_server_interface.h"
|
#include "cartographer/cloud/map_builder_server_interface.h"
|
||||||
#include "cartographer/cloud/proto/map_builder_server_options.pb.h"
|
#include "cartographer/cloud/proto/map_builder_server_options.pb.h"
|
||||||
#include "cartographer/common/blocking_queue.h"
|
#include "cartographer/common/internal/blocking_queue.h"
|
||||||
#include "cartographer/common/time.h"
|
#include "cartographer/common/time.h"
|
||||||
#include "cartographer/mapping/2d/submap_2d.h"
|
#include "cartographer/mapping/2d/submap_2d.h"
|
||||||
#include "cartographer/mapping/3d/submap_3d.h"
|
#include "cartographer/mapping/3d/submap_3d.h"
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "cartographer/common/blocking_queue.h"
|
#include "cartographer/common/internal/blocking_queue.h"
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <thread>
|
#include <thread>
|
|
@ -14,7 +14,7 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "cartographer/common/rate_timer.h"
|
#include "cartographer/common/internal/rate_timer.h"
|
||||||
|
|
||||||
#include "gtest/gtest.h"
|
#include "gtest/gtest.h"
|
||||||
|
|
|
@ -1,34 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright 2018 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_COMMON_UTILS_H_
|
|
||||||
#define CARTOGRAPHER_COMMON_UTILS_H_
|
|
||||||
|
|
||||||
namespace cartographer {
|
|
||||||
namespace common {
|
|
||||||
|
|
||||||
template <typename MapType, typename KeyType = typename MapType::key_type,
|
|
||||||
typename ValueType = typename MapType::mapped_type>
|
|
||||||
ValueType* FindOrNull(MapType& map, const KeyType& key) {
|
|
||||||
auto it = map.find(key);
|
|
||||||
if (it == map.end()) return nullptr;
|
|
||||||
return &(it->second);
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace common
|
|
||||||
} // namespace cartographer
|
|
||||||
|
|
||||||
#endif // CARTOGRAPHER_COMMON_UTILS_H_
|
|
|
@ -23,8 +23,8 @@
|
||||||
#include <set>
|
#include <set>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
#include "cartographer/common/internal/rate_timer.h"
|
||||||
#include "cartographer/common/port.h"
|
#include "cartographer/common/port.h"
|
||||||
#include "cartographer/common/rate_timer.h"
|
|
||||||
#include "cartographer/mapping/local_slam_result_data.h"
|
#include "cartographer/mapping/local_slam_result_data.h"
|
||||||
#include "cartographer/mapping/submaps.h"
|
#include "cartographer/mapping/submaps.h"
|
||||||
#include "cartographer/mapping/trajectory_builder_interface.h"
|
#include "cartographer/mapping/trajectory_builder_interface.h"
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <tuple>
|
#include <tuple>
|
||||||
|
|
||||||
#include "cartographer/common/blocking_queue.h"
|
#include "cartographer/common/internal/blocking_queue.h"
|
||||||
#include "cartographer/common/port.h"
|
#include "cartographer/common/port.h"
|
||||||
#include "cartographer/common/time.h"
|
#include "cartographer/common/time.h"
|
||||||
#include "cartographer/sensor/internal/dispatchable.h"
|
#include "cartographer/sensor/internal/dispatchable.h"
|
||||||
|
|
Loading…
Reference in New Issue