diff --git a/ros2bag/ros2bag/verb/play.py b/ros2bag/ros2bag/verb/play.py index c2171a23b0..ca5c64e40b 100644 --- a/ros2bag/ros2bag/verb/play.py +++ b/ros2bag/ros2bag/verb/play.py @@ -27,6 +27,7 @@ from rosbag2_py import StorageOptions import yaml + def positive_float(arg: str) -> float: value = float(arg) if value <= 0: diff --git a/rosbag2_transport/src/rosbag2_transport/player.cpp b/rosbag2_transport/src/rosbag2_transport/player.cpp index 1602d46ab7..587ae238c6 100644 --- a/rosbag2_transport/src/rosbag2_transport/player.cpp +++ b/rosbag2_transport/src/rosbag2_transport/player.cpp @@ -96,9 +96,10 @@ void Player::play(const PlayOptions & options) { rclcpp::executors::SingleThreadedExecutor exec; exec.add_node(transport_node_); - auto spin_thread = std::thread([&exec]() { - exec.spin(); - }); + auto spin_thread = std::thread( + [&exec]() { + exec.spin(); + }); if (reader_->has_next()) { // Reader does not have "peek", so we must "pop" the first message to see its timestamp diff --git a/rosbag2_transport/test/rosbag2_transport/test_play_publish_clock.cpp b/rosbag2_transport/test/rosbag2_transport/test_play_publish_clock.cpp index 348373aa8b..6e07dabdeb 100644 --- a/rosbag2_transport/test/rosbag2_transport/test_play_publish_clock.cpp +++ b/rosbag2_transport/test/rosbag2_transport/test_play_publish_clock.cpp @@ -14,6 +14,10 @@ #include +#include +#include +#include + #include "rosbag2_transport/rosbag2_transport.hpp" #include "rosgraph_msgs/msg/clock.hpp" #include "test_msgs/message_fixtures.hpp"