From 712c7e3e39a20bb44d532e29973b93be6e2c8a83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20Sch=C3=BCtte?= Date: Tue, 16 Jan 2018 12:20:15 +0100 Subject: [PATCH] Fix namespace of serialization functions. (#825) --- .../handlers/add_fixed_frame_pose_data_handler.h | 2 +- cartographer_grpc/handlers/add_imu_data_handler.h | 7 +++---- .../handlers/add_odometry_data_handler.h | 2 +- .../mapping/trajectory_builder_stub.cc | 15 ++++++++------- cartographer_grpc/sensor/serialization.cc | 4 ++-- cartographer_grpc/sensor/serialization.h | 4 ++-- 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/cartographer_grpc/handlers/add_fixed_frame_pose_data_handler.h b/cartographer_grpc/handlers/add_fixed_frame_pose_data_handler.h index 9a0db03..4973799 100644 --- a/cartographer_grpc/handlers/add_fixed_frame_pose_data_handler.h +++ b/cartographer_grpc/handlers/add_fixed_frame_pose_data_handler.h @@ -49,7 +49,7 @@ class AddFixedFramePoseDataHandler ->local_trajectory_uploader()) { auto data_request = cartographer::common::make_unique< proto::AddFixedFramePoseDataRequest>(); - mapping::CreateAddFixedFramePoseDataRequest( + sensor::CreateAddFixedFramePoseDataRequest( request.sensor_metadata().sensor_id(), request.sensor_metadata().trajectory_id(), request.fixed_frame_pose_data(), data_request.get()); diff --git a/cartographer_grpc/handlers/add_imu_data_handler.h b/cartographer_grpc/handlers/add_imu_data_handler.h index 47b2be7..fa4a15a 100644 --- a/cartographer_grpc/handlers/add_imu_data_handler.h +++ b/cartographer_grpc/handlers/add_imu_data_handler.h @@ -48,10 +48,9 @@ class AddImuDataHandler ->local_trajectory_uploader()) { auto data_request = cartographer::common::make_unique(); - mapping::CreateAddImuDataRequest( - request.sensor_metadata().sensor_id(), - request.sensor_metadata().trajectory_id(), request.imu_data(), - data_request.get()); + sensor::CreateAddImuDataRequest(request.sensor_metadata().sensor_id(), + request.sensor_metadata().trajectory_id(), + request.imu_data(), data_request.get()); GetUnsynchronizedContext() ->local_trajectory_uploader() ->EnqueueDataRequest(std::move(data_request)); diff --git a/cartographer_grpc/handlers/add_odometry_data_handler.h b/cartographer_grpc/handlers/add_odometry_data_handler.h index f5523fc..0a9f8d9 100644 --- a/cartographer_grpc/handlers/add_odometry_data_handler.h +++ b/cartographer_grpc/handlers/add_odometry_data_handler.h @@ -48,7 +48,7 @@ class AddOdometryDataHandler ->local_trajectory_uploader()) { auto data_request = cartographer::common::make_unique(); - mapping::CreateAddOdometryDataRequest( + sensor::CreateAddOdometryDataRequest( request.sensor_metadata().sensor_id(), request.sensor_metadata().trajectory_id(), request.odometry_data(), data_request.get()); diff --git a/cartographer_grpc/mapping/trajectory_builder_stub.cc b/cartographer_grpc/mapping/trajectory_builder_stub.cc index df08771..744af61 100644 --- a/cartographer_grpc/mapping/trajectory_builder_stub.cc +++ b/cartographer_grpc/mapping/trajectory_builder_stub.cc @@ -76,7 +76,7 @@ void TrajectoryBuilderStub::AddSensorData( CHECK(rangefinder_writer_.client_writer); } proto::AddRangefinderDataRequest request; - CreateAddRangeFinderDataRequest( + sensor::CreateAddRangeFinderDataRequest( sensor_id, trajectory_id_, cartographer::sensor::ToProto(timed_point_cloud_data), &request); rangefinder_writer_.client_writer->Write(request); @@ -91,8 +91,9 @@ void TrajectoryBuilderStub::AddSensorData( CHECK(imu_writer_.client_writer); } proto::AddImuDataRequest request; - CreateAddImuDataRequest(sensor_id, trajectory_id_, - cartographer::sensor::ToProto(imu_data), &request); + sensor::CreateAddImuDataRequest(sensor_id, trajectory_id_, + cartographer::sensor::ToProto(imu_data), + &request); imu_writer_.client_writer->Write(request); } @@ -105,9 +106,9 @@ void TrajectoryBuilderStub::AddSensorData( CHECK(odometry_writer_.client_writer); } proto::AddOdometryDataRequest request; - CreateAddOdometryDataRequest(sensor_id, trajectory_id_, - cartographer::sensor::ToProto(odometry_data), - &request); + sensor::CreateAddOdometryDataRequest( + sensor_id, trajectory_id_, cartographer::sensor::ToProto(odometry_data), + &request); odometry_writer_.client_writer->Write(request); } @@ -120,7 +121,7 @@ void TrajectoryBuilderStub::AddSensorData( CHECK(fixed_frame_writer_.client_writer); } proto::AddFixedFramePoseDataRequest request; - CreateAddFixedFramePoseDataRequest( + sensor::CreateAddFixedFramePoseDataRequest( sensor_id, trajectory_id_, cartographer::sensor::ToProto(fixed_frame_pose), &request); fixed_frame_writer_.client_writer->Write(request); diff --git a/cartographer_grpc/sensor/serialization.cc b/cartographer_grpc/sensor/serialization.cc index 968b522..e83106b 100644 --- a/cartographer_grpc/sensor/serialization.cc +++ b/cartographer_grpc/sensor/serialization.cc @@ -17,7 +17,7 @@ #include "serialization.h" namespace cartographer_grpc { -namespace mapping { +namespace sensor { void CreateSensorMetadata(const std::string& sensor_id, const int trajectory_id, proto::SensorMetadata* proto) { @@ -63,5 +63,5 @@ void CreateAddRangeFinderDataRequest( *proto->mutable_timed_point_cloud_data() = timed_point_cloud_data; } -} // namespace mapping +} // namespace sensor } // namespace cartographer_grpc diff --git a/cartographer_grpc/sensor/serialization.h b/cartographer_grpc/sensor/serialization.h index 7f850b1..c7d7d6d 100644 --- a/cartographer_grpc/sensor/serialization.h +++ b/cartographer_grpc/sensor/serialization.h @@ -24,7 +24,7 @@ #include "cartographer_grpc/proto/map_builder_service.pb.h" namespace cartographer_grpc { -namespace mapping { +namespace sensor { void CreateSensorMetadata(const std::string& sensor_id, int trajectory_id, proto::SensorMetadata* proto); @@ -47,7 +47,7 @@ void CreateAddRangeFinderDataRequest( timed_point_cloud_data, proto::AddRangefinderDataRequest* proto); -} // namespace mapping +} // namespace sensor } // namespace cartographer_grpc #endif // CARTOGRAPHER_GRPC_SENSOR_SERIALIZATION_H