diff --git a/cartographer_grpc/handlers/add_trajectory_handler.cc b/cartographer_grpc/handlers/add_trajectory_handler.cc index 927af24..a43f3bc 100644 --- a/cartographer_grpc/handlers/add_trajectory_handler.cc +++ b/cartographer_grpc/handlers/add_trajectory_handler.cc @@ -51,6 +51,10 @@ void AddTrajectoryHandler::OnRequest( trajectory_builder_options.clear_trajectory_builder_2d_options(); trajectory_builder_options.clear_trajectory_builder_3d_options(); + // Don't instantiate the 'PureLocalizationTrimmer' on the server and don't + // freeze the trajectory on the server. + trajectory_builder_options.set_pure_localization(false); + GetContext() ->local_trajectory_uploader() ->AddTrajectory(trajectory_id, expected_sensor_ids, diff --git a/cartographer_grpc/handlers/add_trajectory_handler_test.cc b/cartographer_grpc/handlers/add_trajectory_handler_test.cc index 5fd24dd..addac4e 100644 --- a/cartographer_grpc/handlers/add_trajectory_handler_test.cc +++ b/cartographer_grpc/handlers/add_trajectory_handler_test.cc @@ -122,6 +122,7 @@ TEST_F(AddTrajectoryHandlerTest, WithLocalSlamUploader) { request.trajectory_builder_options(); upstream_trajectory_builder_options.clear_trajectory_builder_2d_options(); upstream_trajectory_builder_options.clear_trajectory_builder_3d_options(); + upstream_trajectory_builder_options.set_pure_localization(false); EXPECT_CALL(*mock_local_trajectory_uploader_, AddTrajectory(Eq(13), ParseSensorIds(request), Truly(testing::BuildProtoPredicateEquals(