@@ -147,7 +147,7 @@ received.
147
147
``` python
148
148
def some_msg_callback (self , msg : Msg):
149
149
time = Time.from_msg(msg.header.stamp)
150
- rr.set_time(" ros_time" , np.datetime64(time.nanoseconds, " ns" ))
150
+ rr.set_time(" ros_time" , timestamp = np.datetime64(time.nanoseconds, " ns" ))
151
151
```
152
152
153
153
This timestamp will apply to all subsequent log calls on in this callback (on this thread) until the time is updated
@@ -224,7 +224,7 @@ this as a cue to look up the corresponding transform and log it.
224
224
def odom_callback (self , odom : Odometry) -> None :
225
225
""" Update transforms when odom is updated."""
226
226
time = Time.from_msg(odom.header.stamp)
227
- rr.set_time(" ros_time" , np.datetime64(time.nanoseconds, " ns" ))
227
+ rr.set_time(" ros_time" , timestamp = np.datetime64(time.nanoseconds, " ns" ))
228
228
229
229
# Capture time-series data for the linear and angular velocities
230
230
rr.log(" odometry/vel" , rr.Scalar(odom.twist.twist.linear.x))
@@ -250,7 +250,7 @@ def __init__(self) -> None:
250
250
def cam_info_callback (self , info : CameraInfo) -> None :
251
251
""" Log a `CameraInfo` with `log_pinhole`."""
252
252
time = Time.from_msg(info.header.stamp)
253
- rr.set_time(" ros_time" , np.datetime64(time.nanoseconds, " ns" ))
253
+ rr.set_time(" ros_time" , timestamp = np.datetime64(time.nanoseconds, " ns" ))
254
254
255
255
self .model.fromCameraInfo(info)
256
256
@@ -276,7 +276,7 @@ def __init__(self) -> None:
276
276
def image_callback (self , img : Image) -> None :
277
277
""" Log an `Image` with `log_image` using `cv_bridge`."""
278
278
time = Time.from_msg(img.header.stamp)
279
- rr.set_time(" ros_time" , np.datetime64(time.nanoseconds, " ns" ))
279
+ rr.set_time(" ros_time" , timestamp = np.datetime64(time.nanoseconds, " ns" ))
280
280
281
281
rr.log(" map/robot/camera/img" , rr.Image(self .cv_bridge.imgmsg_to_cv2(img)))
282
282
self .log_tf_as_transform3d(" map/robot/camera" , time)
@@ -301,7 +301,7 @@ After extracting the positions and colors as Numpy arrays, the entire cloud can
301
301
def points_callback (self , points : PointCloud2) -> None :
302
302
""" Log a `PointCloud2` with `log_points`."""
303
303
time = Time.from_msg(points.header.stamp)
304
- rr.set_time(" ros_time" , np.datetime64(time.nanoseconds, " ns" ))
304
+ rr.set_time(" ros_time" , timestamp = np.datetime64(time.nanoseconds, " ns" ))
305
305
306
306
pts = point_cloud2.read_points(points, field_names = [" x" , " y" , " z" ],
307
307
skip_nans = True )
@@ -353,7 +353,7 @@ def __init__(self) -> None:
353
353
def scan_callback (self , scan : LaserScan) -> None :
354
354
""" Log a LaserScan after transforming it to line-segments."""
355
355
time = Time.from_msg(scan.header.stamp)
356
- rr.set_time(" ros_time" , np.datetime64(time.nanoseconds, " ns" ))
356
+ rr.set_time(" ros_time" , timestamp = np.datetime64(time.nanoseconds, " ns" ))
357
357
358
358
# Project the laser scan to a collection of points
359
359
points = self .laser_proj.projectLaser(scan)
0 commit comments