Fix documentation code samples
This commit is contained in:
parent
c9bd6ebbc0
commit
8bf8994fbf
@ -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
|
||||
|
||||
@ -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))
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user