Fix documentation code samples

This commit is contained in:
Marko Durkovic 2022-01-06 12:50:40 +01:00
parent c9bd6ebbc0
commit 8bf8994fbf
2 changed files with 2 additions and 0 deletions

View File

@ -22,6 +22,7 @@ Instances of the :py:class:`Writer <rosbags.rosbag1.Writer>` class can create an
# serialize and write message
message = String('hello world')
timestamp = 42
writer.write(connection, timestamp, cdr_to_ros1(serialize_cdr(message, msgtype), msgtype))
Reading rosbag1

View File

@ -37,6 +37,7 @@ Instances of the :py:class:`Writer <rosbags.rosbag2.Writer>` class can create an
connection = writer.add_connection(topic, msgtype, 'cdr', '')
# serialize and write message
timestamp = 42
message = String('hello world')
writer.write(connection, timestamp, serialize_cdr(message, msgtype))