From 51fe6fa021d2815b4c2e88cdcddcde4a23982dc1 Mon Sep 17 00:00:00 2001 From: Akiyoshi Ochiai Date: Fri, 9 Jun 2017 01:23:00 -0700 Subject: [PATCH] Fix missing ID handling related to starting trajectory (#369) --- cartographer_ros/cartographer_ros/node.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cartographer_ros/cartographer_ros/node.cc b/cartographer_ros/cartographer_ros/node.cc index 967c07c..d766516 100644 --- a/cartographer_ros/cartographer_ros/node.cc +++ b/cartographer_ros/cartographer_ros/node.cc @@ -427,9 +427,9 @@ bool Node::HandleStartTrajectory( return false; } - std::unordered_set expected_sensor_ids; const int trajectory_id = AddTrajectory(options, request.topics); LaunchSubscribers(options, request.topics, trajectory_id); + response.trajectory_id = trajectory_id; is_active_trajectory_[trajectory_id] = true; return true; @@ -446,6 +446,7 @@ void Node::StartTrajectoryWithDefaultTopics(const TrajectoryOptions& options) { const int trajectory_id = AddTrajectory(options, topics); LaunchSubscribers(options, topics, trajectory_id); + is_active_trajectory_[trajectory_id] = true; } bool Node::HandleFinishTrajectory(