rqt_bag.rosbag2 module

A rosbag abstraction with functionality required by rqt_bag.

class rqt_bag.rosbag2.Entry(topic, data, timestamp)

Bases: tuple

data

Alias for field number 1

timestamp

Alias for field number 2

topic

Alias for field number 0

class rqt_bag.rosbag2.Rosbag2(bag_path, recording=False, topics={}, serialization_format='cdr', storage_id=rosbag2_py.get_default_storage_id)

Bases: object

deserialize_entry(entry)

Deserialize a bag entry into its corresponding ROS message.

get_earliest_timestamp()

Get the timestamp of the earliest message in the bag.

get_entries_in_range(t_start, t_end, topic=None)
get_entry(timestamp, topic=None)

Get the (serialized) entry for a specific timestamp.

Returns the entry that is closest in time (<=) to the provided timestamp.

get_entry_after(timestamp, topic=None)

Get the next entry after a given timestamp.

get_latest_timestamp()

Get the timestamp of the most recent message in the bag.

get_topic_metadata(topic)

Get the full metadata for a given topic name.

get_topic_type(topic)

Get the topic type for a given topic name.

get_topics()

Get all of the topics used in this bag.

get_topics_by_type()

Return a map of topic data types to a list of topics publishing that type.

read_next()
set_latest_timestamp(t)
size()

Get the size of the rosbag.