Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The measured values after the decimal point are truncated. #79

Closed
hsgwa opened this issue Jan 20, 2021 · 0 comments · Fixed by #80
Closed

The measured values after the decimal point are truncated. #79

hsgwa opened this issue Jan 20, 2021 · 0 comments · Fixed by #80
Labels
bug Something isn't working

Comments

@hsgwa
Copy link
Contributor

hsgwa commented Jan 20, 2021

Description

"topic period" and "topic age" values after the decimal point are truncated.
For instance, topic age can be zero in the case of intra process communication.

Expected Behavior

This test package is located here

$ ros2 topic echo /topic_statistics
---
metrics_source: message_age
~snip~
statistics:
- data_type: 1 # Average
  data: 0.6033495235235232
- data_type: 3 # Maximum
  data: 1.221165
- data_type: 2 # Minimum
  data: 0.141677 # 0.141 ms
~~
metrics_source: message_period
~~
statistics:
- data_type: 1 # Average
  data: 9.999780017034087
- data_type: 3 #  Maximum
  data: 11.03389
- data_type: 2 # Minimum
  data: 9.125303
~~
---

Actual Behavior

metrics_source: message_age
~~
statistics:
- data_type: 1 # Average
  data: 0.021038292719842887
- data_type: 3 #  Maximum
  data: 6.0 # after the decimal point are truncated.
- data_type: 2 # Minimum
  data: 0.0 # 0 ms
~~
metrics_source: message_period
statistics:
- data_type: 1 # Average
  data: 9.495270116868728
- data_type: 3 #  Maximum
  data: 24.0 # after the decimal point are truncated.
- data_type: 2 # Minimum
  data: 3.0
---

To Reproduce

I've implemented test case which measures intra process communication.

$ cd ~/ros2_ws/
$ git clone https://github.com/hsgwa/intra_process_ping_latency_test.git src
$ colcon build --packages-select intra_process_ping_latency_test
$ . ~/ros2_ws/install/local_setup.bash
$ ros2 run intra_process_ping_latency_test ping_test
$ ros2 topic echo /topic_statistics # in another terminal

System

  • OS: Ubuntu 20.04.1 LTS (Focal Fossa)
  • ROS 2 Distro: Rolling
@hsgwa hsgwa added the bug Something isn't working label Jan 20, 2021
hsgwa pushed a commit to hsgwa/libstatistics_collector that referenced this issue Jan 20, 2021
emersonknapp pushed a commit that referenced this issue Jan 21, 2021
Signed-off-by: hsgwa <hasegawa@isp.co.jp>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant