ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

Rostopic delay command

asked 2021-05-03 11:28:32 -0600

n.dafinski gravatar image

Hello, I am using ROS Kinetic running on a Jetson Xavier with Ubuntu 18.04, and as a newbie to ROS I was wondering what exactly the rostopic delay command does. Is the displayed delay from reading the sensor data to the publisher publishing it or is it the time is takes for it to get from the publisher to a subscriber, or maybe something entirely different?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-05-03 12:07:45 -0600

130s gravatar image

Indeed wiki page for rostopic delay is not sufficiently describing what it does, so I added a link to this post tos show minimum more info.

AFAIS briefly the code ros_comm/tools/rostopic/src/rostopic/__init__.py (pointing to noetic_devel), it does seem to return the diff b/w the timestamp on the header of the published topic and the timestamp on the subscriber (i.e. rostopic node that calls delay verb).

On my local system I'm seeing this (topic in question is of camera_info type, so low cost, low risk of delay):

$ rostopic delay /foo/baa
subscribed to [/foo/baa]
average delay: 0.001
        min: 0.001s max: 0.001s std dev: 0.00000s window: 2
average delay: 0.001
        min: 0.000s max: 0.001s std dev: 0.00000s window: 3
average delay: 0.000
        min: 0.000s max: 0.001s std dev: 0.00000s window: 4
average delay: 0.000
        min: 0.000s max: 0.001s std dev: 0.00000s window: 5
average delay: 0.000
        min: 0.000s max: 0.001s std dev: 0.00002s window: 6

$ rostopic hz /foo/baa                                                         
subscribed to [/foo/baa]
no new messages
average rate: 1.000
        min: 1.000s max: 1.000s std dev: 0.00000s window: 2
average rate: 1.000
        min: 1.000s max: 1.000s std dev: 0.00000s window: 3
average rate: 1.000
        min: 1.000s max: 1.000s std dev: 0.00002s window: 4
average rate: 1.000
        min: 1.000s max: 1.000s std dev: 0.00002s window: 5
average rate: 1.000
        min: 1.000s max: 1.000s std dev: 0.00002s window: 6
edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2021-05-03 11:28:32 -0600

Seen: 2,327 times

Last updated: May 03 '21