diff --git a/ros2bag/ros2bag/verb/play.py b/ros2bag/ros2bag/verb/play.py index 072a2684ca..403829b0f1 100644 --- a/ros2bag/ros2bag/verb/play.py +++ b/ros2bag/ros2bag/verb/play.py @@ -22,9 +22,9 @@ from ros2bag.verb import VerbExtension from ros2cli.node import NODE_NAME_PREFIX from rosbag2_py import get_registered_readers +from rosbag2_py import Player from rosbag2_py import PlayOptions from rosbag2_py import StorageOptions -from rosbag2_py import Transport import yaml @@ -106,5 +106,5 @@ def main(self, *, args): # noqa: D102 topic_remapping_options=topic_remapping, ) - transport = Transport() - transport.play(storage_options, play_options) + player = Player() + player.play(storage_options, play_options) diff --git a/rosbag2_py/rosbag2_py/__init__.py b/rosbag2_py/rosbag2_py/__init__.py index b6c11d8ba3..782db5c074 100644 --- a/rosbag2_py/rosbag2_py/__init__.py +++ b/rosbag2_py/rosbag2_py/__init__.py @@ -40,8 +40,8 @@ Info, ) from rosbag2_py._transport import ( + Player, PlayOptions, - Transport, ) __all__ = [ @@ -58,6 +58,6 @@ 'TopicInformation', 'BagMetadata', 'Info', + 'Player', 'PlayOptions', - 'Transport', ] diff --git a/rosbag2_py/src/rosbag2_py/_transport.cpp b/rosbag2_py/src/rosbag2_py/_transport.cpp index 1eb8895674..f74ea79565 100644 --- a/rosbag2_py/src/rosbag2_py/_transport.cpp +++ b/rosbag2_py/src/rosbag2_py/_transport.cpp @@ -36,12 +36,11 @@ using Rosbag2Transport = rosbag2_transport::Rosbag2Transport; namespace rosbag2_py { -class Transport +class Player { public: - Transport() {} - - virtual ~Transport() = default; + Player() = default; + virtual ~Player() = default; void play( const rosbag2_storage::StorageOptions & storage_options, @@ -107,8 +106,8 @@ PYBIND11_MODULE(_transport, m) { .def_readwrite("topic_remapping_options", &PlayOptions::topic_remapping_options) ; - pybind11::class_(m, "Transport") + pybind11::class_(m, "Player") .def(pybind11::init()) - .def("play", &rosbag2_py::Transport::play) + .def("play", &rosbag2_py::Player::play) ; }