ros2topic.verb.delay module

class ros2topic.verb.delay.DelayVerb

Bases: VerbExtension

Display delay of topic from timestamp in header.

add_arguments(parser, cli_name)
main(*, args)
class ros2topic.verb.delay.ROSTopicDelay(node, window_size)

Bases: object

Receives messages for a topic and computes timestamp delay.

callback_delay(msg)

Calculate delay time.

Parameters:

msg – Message instance

get_delay()

Calculate the average publishing delay.

Returns:

tuple of stat results (rate, min_delta, max_delta, standard deviation, window number) None when waiting for the first message or there is no new one

print_delay()

Print the average publishing delay to screen.

ros2topic.verb.delay.main(args)