ros2topic.verb.hz module
- class ros2topic.verb.hz.HzVerb
Bases:
VerbExtension
Print the average publishing rate to screen.
- add_arguments(parser, cli_name)
- main(*, args)
- class ros2topic.verb.hz.ROSTopicHz(node, window_size, filter_expr=None, use_wtime=False)
Bases:
object
ROSTopicHz receives messages for a topic and computes frequency.
- callback_hz(m, topic=None)
Calculate interval time.
- Parameters:
m – Message instance
topic – Topic name
- get_hz(topic=None)
Calculate the average publishing rate.
- Parameters:
topic – topic name,
list
ofstr
- 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
- get_last_printed_tn(topic=None)
- get_msg_t0(topic=None)
- get_msg_tn(topic=None)
- get_times(topic=None)
- print_hz(topics=None)
Print the average publishing rate to screen.
- set_last_printed_tn(value, topic=None)
- set_msg_t0(value, topic=None)
- set_msg_tn(value, topic=None)
- set_times(value, topic=None)
- ros2topic.verb.hz.main(args)