Ignore pure_localization option on server (#933)

Fixes #914
master
Christoph Schütte 2018-02-28 12:47:19 +01:00 committed by Wally B. Feed
parent 363a337e67
commit c8c81dff35
2 changed files with 5 additions and 0 deletions

View File

@ -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<MapBuilderContextInterface>()
->local_trajectory_uploader()
->AddTrajectory(trajectory_id, expected_sensor_ids,

View File

@ -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(