Fix rv tuple order of messages() in docs

This commit is contained in:
Marko Durkovic 2021-07-03 13:52:03 +02:00
parent 24cc3e0c2f
commit 77e68e8191
2 changed files with 3 additions and 3 deletions

View File

@ -18,10 +18,10 @@ Instances of the :py:class:`Reader <rosbags.rosbag2.Reader>` class are typically
print(topic, info)
# iterate over messages
for topic, msgtype, rawdata, timestamp in reader.messages():
for topic, msgtype, timestamp, rawdata in reader.messages():
if topic == '/imu_raw/Imu':
print(timestamp)
# messages() accepts topic filters
for topic, msgtype, rawdata, timestamp in reader.messages(['/imu_raw/Imu']):
for topic, msgtype, timestamp, rawdata in reader.messages(['/imu_raw/Imu']):
print(timestamp)

View File

@ -60,6 +60,6 @@ Instances of the :py:class:`Reader <rosbags.rosbag2.Reader>` class are used to r
print(msg.header.frame_id)
# messages() accepts topic filters
for topic, msgtype, rawdata, timestamp in reader.messages(['/imu_raw/Imu']):
for topic, msgtype, timestamp, rawdata in reader.messages(['/imu_raw/Imu']):
msg = deserialize_cdr(rawdata, msgtype)
print(msg.header.frame_id)