Install python-rosbag by entering the following commands in the terminal:
sudo apt update sudo apt install python-rosbag
Description:
Python tools for recording from and playing back to Robot OS topics
This package is part of Robot OS (ROS). It provides a command-line tool for working with bags (ROS messages stores). The corresponding librosbag package provides corresponding C++ and Python APIs.
Homepage: http://wiki.ros.org/ros_comm
Version: 1.13.5+ds1-3
Section: universe/python