Do not forget to finish trajectory if last message is not from a sensor topic (#681)
Bug introduced in #636.master
parent
8d8a86790a
commit
7fc931688c
|
@ -274,10 +274,7 @@ void RunOfflineNode(const MapBuilderFactory& map_builder_factory) {
|
|||
}
|
||||
const std::string topic =
|
||||
node.node_handle()->resolveName(msg.getTopic(), false /* resolve */);
|
||||
if (bag_sensor_topics.at(bag_index).count(topic) == 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (bag_sensor_topics.at(bag_index).count(topic) > 0) {
|
||||
if (msg.isType<sensor_msgs::LaserScan>()) {
|
||||
node.HandleLaserScanMessage(trajectory_id, topic,
|
||||
msg.instantiate<sensor_msgs::LaserScan>());
|
||||
|
@ -303,6 +300,7 @@ void RunOfflineNode(const MapBuilderFactory& map_builder_factory) {
|
|||
node.HandleNavSatFixMessage(trajectory_id, topic,
|
||||
msg.instantiate<sensor_msgs::NavSatFix>());
|
||||
}
|
||||
}
|
||||
clock.clock = msg.getTime();
|
||||
clock_publisher.publish(clock);
|
||||
|
||||
|
|
Loading…
Reference in New Issue