Fix rv tuple order of messages() in docs
This commit is contained in:
parent
24cc3e0c2f
commit
77e68e8191
@ -18,10 +18,10 @@ Instances of the :py:class:`Reader <rosbags.rosbag2.Reader>` class are typically
|
|||||||
print(topic, info)
|
print(topic, info)
|
||||||
|
|
||||||
# iterate over messages
|
# iterate over messages
|
||||||
for topic, msgtype, rawdata, timestamp in reader.messages():
|
for topic, msgtype, timestamp, rawdata in reader.messages():
|
||||||
if topic == '/imu_raw/Imu':
|
if topic == '/imu_raw/Imu':
|
||||||
print(timestamp)
|
print(timestamp)
|
||||||
|
|
||||||
# messages() accepts topic filters
|
# 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)
|
print(timestamp)
|
||||||
|
|||||||
@ -60,6 +60,6 @@ Instances of the :py:class:`Reader <rosbags.rosbag2.Reader>` class are used to r
|
|||||||
print(msg.header.frame_id)
|
print(msg.header.frame_id)
|
||||||
|
|
||||||
# messages() accepts topic filters
|
# 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)
|
msg = deserialize_cdr(rawdata, msgtype)
|
||||||
print(msg.header.frame_id)
|
print(msg.header.frame_id)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user