Skip to content
This repository was archived by the owner on May 31, 2025. It is now read-only.

Fix rostopic hz for multiple topics without no message#843

Merged
dirk-thomas merged 1 commit intoros:kinetic-develfrom
wkentaro:rostopic-hz-no-messages
Jul 23, 2016
Merged

Fix rostopic hz for multiple topics without no message#843
dirk-thomas merged 1 commit intoros:kinetic-develfrom
wkentaro:rostopic-hz-no-messages

Conversation

@wkentaro
Copy link
Copy Markdown
Contributor

To fix below error

% rostopic hz /input_0 /input_1
subscribed to [/input_0]
subscribed to [/input_1]
no new messages
no new messages
topic      rate    min_delta   max_delta    std_dev    window
==============================================================
/input_0   9.997    0.0999      0.1002      8.891e-05   7
/input_1   0.9998   0.9995      1.001       0.0005633   7

topic      rate    min_delta   max_delta    std_dev    window
==============================================================
/input_0   9.998    0.0999      0.1002      7.342e-05   17
/input_1   0.9998   0.9995      1.001       0.0004887   17

topic      rate    min_delta   max_delta    std_dev    window
==============================================================
/input_0   9.999    0.09982     0.1002      7.967e-05   21
/input_1   0.9999   0.9995      1.001       0.0004702   21

no new messages
no new messages
no new messages
Traceback (most recent call last):
File "/home/wkentaro/ros/indigo/devel/bin/rostopic", line 6, in <module>
exec(fh.read())
File "<string>", line 35, in <module>
File "<string>", line 1977, in rostopicmain
File "<string>", line 1385, in _rostopic_cmd_hz
File "<string>", line 273, in _rostopic_hz
File "<string>", line 221, in print_hz
File "<string>", line 228, in _get_ascii_table
ValueError: max() arg is an empty sequence

To fix below error

```
% rostopic hz /input_0 /input_1
subscribed to [/input_0]
subscribed to [/input_1]
no new messages
no new messages
topic      rate    min_delta   max_delta    std_dev    window
==============================================================
/input_0   9.997    0.0999      0.1002      8.891e-05   7
/input_1   0.9998   0.9995      1.001       0.0005633   7

topic      rate    min_delta   max_delta    std_dev    window
==============================================================
/input_0   9.998    0.0999      0.1002      7.342e-05   17
/input_1   0.9998   0.9995      1.001       0.0004887   17

topic      rate    min_delta   max_delta    std_dev    window
==============================================================
/input_0   9.999    0.09982     0.1002      7.967e-05   21
/input_1   0.9999   0.9995      1.001       0.0004702   21

no new messages
no new messages
no new messages
Traceback (most recent call last):
File "/home/wkentaro/ros/indigo/devel/bin/rostopic", line 6, in <module>
exec(fh.read())
File "<string>", line 35, in <module>
File "<string>", line 1977, in rostopicmain
File "<string>", line 1385, in _rostopic_cmd_hz
File "<string>", line 273, in _rostopic_hz
File "<string>", line 221, in print_hz
File "<string>", line 228, in _get_ascii_table
ValueError: max() arg is an empty sequence
```
@wkentaro wkentaro force-pushed the rostopic-hz-no-messages branch from ae5ca27 to bf96ec1 Compare July 22, 2016 21:08
@wjwwood
Copy link
Copy Markdown
Member

wjwwood commented Jul 22, 2016

makes sense to me

@dirk-thomas
Copy link
Copy Markdown
Member

Thank you for the fix.

@dirk-thomas dirk-thomas merged commit 2634749 into ros:kinetic-devel Jul 23, 2016
rsinnet pushed a commit to MisoRobotics/ros_comm that referenced this pull request Jun 19, 2017
Fix rostopic hz for multiple topics without no message
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants