diff --git a/docs/topics/rosbag1.rst b/docs/topics/rosbag1.rst index bbae2eb4..0e9b7c94 100644 --- a/docs/topics/rosbag1.rst +++ b/docs/topics/rosbag1.rst @@ -22,6 +22,7 @@ Instances of the :py:class:`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 diff --git a/docs/topics/rosbag2.rst b/docs/topics/rosbag2.rst index 3e788bb3..1f3fbe57 100644 --- a/docs/topics/rosbag2.rst +++ b/docs/topics/rosbag2.rst @@ -37,6 +37,7 @@ Instances of the :py:class:`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))