rqt_bag.bag_timeline module
- class rqt_bag.bag_timeline.BagTimeline(*args: Any, **kwargs: Any)
Bases:
QGraphicsScene
BagTimeline contains bag files, and all info required to display the bag data on the screen.
It also handles related events.
- add_bag(bag)
Create an indexing thread for each new topic in the bag.
Fixes the boarders and notifies the indexing thread to index the new items bags. :param bag: ros bag file, ‘’rosbag2.bag’’
- add_listener(topic, listener)
- add_view(topic, frame)
- copy_region_to_bag(filename)
- file_size()
- get_context()
Get the gui context.
- Returns:
the ROS_GUI context, ‘PluginContext’
- get_datatype(topic)
Get the datatype for a topic.
- Returns:
datatype associated with a topic, ‘’str’’
- Raises:
if there are multiple datatypes assigned to a single topic, ‘’Exception’’
- get_entries(topics, start_stamp, end_stamp)
Get a generator for bag entries.
- Parameters:
topics – list of topics to query, ‘’list(str)’’
start_stamp – stamp to start at, ‘’rclpy.time.Time’’
end_stamp – stamp to end at, ‘’rclpy.time,Time’’
- Returns:
entries the bag file, ‘’msg’’
- get_entries_with_bags(topic, start_stamp, end_stamp)
Get a generator of bag entries.
- Parameters:
topics – list of topics to query, ‘’list(str)’’
start_stamp – stamp to start at, ‘’rclpy.time.Time’’
end_stamp – stamp to end at, ‘’rclpy.time,Time’’
- Returns:
tuple of (bag, entry) for the entries in the bag file, ‘’(rosbag2.bag, msg)’’
- get_entry(t, topic)
Access a bag entry.
- Parameters:
t – time, ‘’rclpy.time.Time’’
topic – the topic to be accessed, ‘’str’’
- Returns:
tuple of (bag, entry) corresponding to time t and topic, ‘’(rosbag2.bag, msg)’’
- get_entry_after(t, topic=None)
Access a bag entry.
- Parameters:
t – time, ‘’rclpy.time.Time’’
- Returns:
tuple of (bag, entry) corresponding to time t, ‘’(rosbag2.bag, msg)’’
- get_entry_before(t)
Access a bag entry.
- Parameters:
t – time, ‘’rclpy.time.Time’’
- Returns:
tuple of (bag, entry) corresponding to time t, ‘’(rosbag2.bag, msg)’’
- get_next_message_time()
Get the time of the next message.
- Returns:
time of the next message after the current playhead position,’’rclpy.time.Time’’
- get_previous_message_time()
Get the time of the previous message.
- Returns:
time of the next message before the current playhead position,’’rclpy.time.Time’’
- handle_close()
Clean up the timeline, bag and any threads.
- has_listeners(topic)
- is_publishing(topic)
- on_idle()
- property play_all
- property play_speed
- read_message(bag, position, topic)
- record_bag(filename, all_topics=True, topics=[], regex=False, limit=0)
- remove_listener(topic, listener)
- reset_zoom()
- resume()
- set_publishing_state(start_publishing)
- start_background_task(background_task)
Verify that a background task is not currently running before starting a new one.
- Parameters:
background_task – name of the background task, ‘’str’’
- start_publishing(topic)
- step_fixed()
Move the playhead a fixed distance into the future based on the current play speed.
- step_next_message()
Move the playhead to the next message.
- stop_background_task()
- stop_publishing(topic)
- stop_recorder()
- toggle_play()
- toggle_play_all()
- toggle_recording()
- translate_timeline_left()
- translate_timeline_right()
- zoom_in()
- zoom_out()