|
def | __contains__ (self, key) |
|
def | __init__ (self, filename, mode="a", *_, **__) |
|
def | __next__ (self) |
|
def | close (self) |
|
def | closed (self) |
|
def | filename (self) |
|
def | get_end_time (self) |
|
def | get_message_class (self, typename, typehash=None) |
|
def | get_message_count (self, topic_filters=None) |
|
def | get_message_definition (self, msg_or_type) |
|
def | get_message_type_hash (self, msg_or_type) |
|
def | get_qoses (self, topic, typename) |
|
def | get_start_time (self) |
|
def | get_topic_info (self, counts=True, ensure_types=True) |
|
def | get_type_and_topic_info (self, topic_filters=None) |
|
def | mode (self) |
|
def | open (self) |
|
def | read_messages (self, topics=None, start_time=None, end_time=None, raw=False, **__) |
|
def | size (self) |
|
def | topics (self) |
|
def | write (self, topic, msg, t=None, raw=False, qoses=None, **__) |
|
def | __bool__ (self) |
|
def | __copy__ (self) |
|
def | __deepcopy__ (self, memo=None) |
|
def | __enter__ (self) |
|
def | __exit__ (self, exc_type, exc_value, traceback) |
|
def | __getitem__ (self, key) |
|
def | __iter__ (self) |
|
def | __len__ (self) |
|
def | __nonzero__ (self) |
|
def | __str__ (self) |
|
def | flush (self) |
|
def | get_topic_info (self, counts=True) |
|
def | stop_on_error (self) |
|
def | stop_on_error (self, flag) |
|
def | write (self, topic, msg, t=None, raw=False, **kwargs) |
|
|
string | CREATE_SQL |
| ROS2 bag SQLite schema. More...
|
|
bool | STREAMABLE = False |
| Whether bag supports reading or writing stream objects, overridden in subclasses. More...
|
|
| BagMessage = collections.namedtuple("BagMessage", "topic message timestamp") |
| Returned from read_messages() as (topic name, ROS message, ROS timestamp object). More...
|
|
tuple | MODES = ("r", "w", "a") |
| Supported opening modes, overridden in subclasses. More...
|
|
| next |
|
bool | STREAMABLE = True |
| Whether bag supports reading or writing stream objects, overridden in subclasses. More...
|
|
| TopicTuple |
| Returned from get_type_and_topic_info() as (typename, message count, connection count, median frequency). More...
|
|
| TypesAndTopicsTuple = collections.namedtuple("TypesAndTopicsTuple", ["msg_types", "topics"]) |
| Returned from get_type_and_topic_info() as ({typename: typehash}, {topic name: TopicTuple}). More...
|
|
ROS2 bag reader and writer (SQLite format), providing most of rosbag.Bag interface.
Definition at line 91 of file ros2.py.
def grepros.ros2.ROS2Bag.get_topic_info |
( |
|
self, |
|
|
|
counts = True , |
|
|
|
ensure_types = True |
|
) |
| |
Returns topic and message type metainfo as {(topic, typename, typehash): count}.
Can skip retrieving message counts, as this requires a full table scan.
Can skip looking up message type classes, as those might be unavailable in ROS2 environment.
@param counts whether to return actual message counts instead of None
@param ensure_types whether to look up type classes instead of returning typehash as None
Definition at line 181 of file ros2.py.
def grepros.ros2.ROS2Bag.get_type_and_topic_info |
( |
|
self, |
|
|
|
topic_filters = None |
|
) |
| |
Returns thorough metainfo on topic and message types.
@param topic_filters list of topics or a single topic to filter returned topics-dict by,
if any
@return TypesAndTopicsTuple(msg_types, topics) namedtuple,
msg_types as dict of {typename: typehash},
topics as a dict of {topic: TopicTuple() namedtuple}.
Reimplemented from grepros.api.BaseBag.
Definition at line 197 of file ros2.py.
def grepros.ros2.ROS2Bag.read_messages |
( |
|
self, |
|
|
|
topics = None , |
|
|
|
start_time = None , |
|
|
|
end_time = None , |
|
|
|
raw = False , |
|
|
** |
__ |
|
) |
| |
Yields messages from the bag, optionally filtered by topic and timestamp.
@param topics list of topics or a single topic to filter by, if any
@param start_time earliest timestamp of message to return, as ROS time or convertible
(int/float/duration/datetime/decimal)
@param end_time latest timestamp of message to return, as ROS time or convertible
(int/float/duration/datetime/decimal)
@param raw if True, then returned messages are tuples of
(typename, bytes, typehash, typeclass).
If message type unavailable, returns None for hash and class.
@return BagMessage namedtuples of
(topic, message, timestamp as rclpy.time.Time)
Reimplemented from grepros.api.BaseBag.
Definition at line 283 of file ros2.py.