From 5d784e8adbb5ab1f2cbb26f0b8b197734561713a Mon Sep 17 00:00:00 2001 From: Wolfgang Hess Date: Thu, 19 Oct 2017 16:58:07 +0200 Subject: [PATCH] Prepare for googlecartographer/cartographer#605. (#551) --- cartographer_ros/cartographer_ros/map_builder_bridge.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cartographer_ros/cartographer_ros/map_builder_bridge.cc b/cartographer_ros/cartographer_ros/map_builder_bridge.cc index c811692..3fc7aa5 100644 --- a/cartographer_ros/cartographer_ros/map_builder_bridge.cc +++ b/cartographer_ros/cartographer_ros/map_builder_bridge.cc @@ -171,6 +171,9 @@ MapBuilderBridge::GetTrajectoryStates() { const cartographer::mapping::TrajectoryBuilder* const trajectory_builder = map_builder_.GetTrajectoryBuilder(trajectory_id); + if (trajectory_builder == nullptr) { + continue; + } const cartographer::mapping::TrajectoryBuilder::PoseEstimate pose_estimate = trajectory_builder->pose_estimate(); if (cartographer::common::ToUniversal(pose_estimate.time) < 0) {