From 2c8a3f65628d0362d97c29d333d5669b2c7803a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enrique=20Fern=C3=A1ndez=20Perdomo?= Date: Wed, 21 Mar 2018 18:23:36 -0400 Subject: [PATCH] Fix check for header first in rosbag play for rate control topic (#1352) * Skip empty lines * Only check 'Header ' is at the beginning This allows to support sensor_msgs/Image, which has a comment after. Also note we only need to check for the type, not the name of the field. * Break while loop after first field. --- tools/rosbag/src/player.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/rosbag/src/player.cpp b/tools/rosbag/src/player.cpp index 32570bdef1..76d6a81830 100644 --- a/tools/rosbag/src/player.cpp +++ b/tools/rosbag/src/player.cpp @@ -305,11 +305,12 @@ void Player::updateRateTopicTime(const ros::MessageEvent