From aaf6bff6f73751951f495bc23094ac7df0b11c36 Mon Sep 17 00:00:00 2001 From: Michael Grupp Date: Mon, 14 Jan 2019 11:58:14 +0100 Subject: [PATCH 1/3] Don't run final optimization in visualize_pbstream.launch Replaces the offline node with the normal node. The problem is that the offline node immediately runs a final optimization with `visualize_pbstream.lua`, which is most likely not the configuration that was used to generate the pbstream. This can lead to effects like distortions in the map e.g. due to different weights, even though the actual saved state is fine. --- cartographer_ros/launch/visualize_pbstream.launch | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/cartographer_ros/launch/visualize_pbstream.launch b/cartographer_ros/launch/visualize_pbstream.launch index 764f5ff8c..0bed5f9e6 100644 --- a/cartographer_ros/launch/visualize_pbstream.launch +++ b/cartographer_ros/launch/visualize_pbstream.launch @@ -17,11 +17,10 @@ - From 5535a1ede9561974d381f3de323658af44577e12 Mon Sep 17 00:00:00 2001 From: Michael Grupp Date: Mon, 14 Jan 2019 13:58:35 +0100 Subject: [PATCH 2/3] Drop all /echoes or /imu messages. --- cartographer_ros/configuration_files/visualize_pbstream.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cartographer_ros/configuration_files/visualize_pbstream.lua b/cartographer_ros/configuration_files/visualize_pbstream.lua index e941ab126..b51b4d8c4 100644 --- a/cartographer_ros/configuration_files/visualize_pbstream.lua +++ b/cartographer_ros/configuration_files/visualize_pbstream.lua @@ -18,4 +18,8 @@ POSE_GRAPH.constraint_builder.sampling_ratio = 0 POSE_GRAPH.global_sampling_ratio = 0 POSE_GRAPH.optimize_every_n_nodes = 0 +-- In case there are active publishers, drop all sensor data for visualization. +options.imu_sampling_ratio = 0 +options.rangefinder_sampling_ratio = 0 + return options From d07d56ad8908416ee2323b88c876f9ea22b3c422 Mon Sep 17 00:00:00 2001 From: Michael Grupp Date: Mon, 14 Jan 2019 16:54:42 +0100 Subject: [PATCH 3/3] Use -start_trajectory_with_default_topics=false --- cartographer_ros/configuration_files/visualize_pbstream.lua | 4 ---- cartographer_ros/launch/visualize_pbstream.launch | 3 ++- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/cartographer_ros/configuration_files/visualize_pbstream.lua b/cartographer_ros/configuration_files/visualize_pbstream.lua index b51b4d8c4..e941ab126 100644 --- a/cartographer_ros/configuration_files/visualize_pbstream.lua +++ b/cartographer_ros/configuration_files/visualize_pbstream.lua @@ -18,8 +18,4 @@ POSE_GRAPH.constraint_builder.sampling_ratio = 0 POSE_GRAPH.global_sampling_ratio = 0 POSE_GRAPH.optimize_every_n_nodes = 0 --- In case there are active publishers, drop all sensor data for visualization. -options.imu_sampling_ratio = 0 -options.rangefinder_sampling_ratio = 0 - return options diff --git a/cartographer_ros/launch/visualize_pbstream.launch b/cartographer_ros/launch/visualize_pbstream.launch index 0bed5f9e6..cf5b7e034 100644 --- a/cartographer_ros/launch/visualize_pbstream.launch +++ b/cartographer_ros/launch/visualize_pbstream.launch @@ -22,7 +22,8 @@ -configuration_directory $(find cartographer_ros)/configuration_files -configuration_basename visualize_pbstream.lua -load_state_filename $(arg pbstream_filename) - -load_frozen_state=false" + -load_frozen_state=false + -start_trajectory_with_default_topics=false" output="screen">