Code Monkey home page Code Monkey logo

tilde's Introduction

TILDE - Tilde Is Latency Data Embedding

README(ja)

Contents

src/ about
tilde TILDE main code
tilde_sample samples including talker, relay, listener and so on.
tilde_msg TILDE internal msg
tilde_vis TILDE results visualization

Build

. /path/to/ros2_galactic/install/setup.bash
vcs import src < build_depends.repos
colcon build --symlink-install --cmake-args --cmake-args -DCMAKE_BUILD_TYPE=Release

tilde's People

Contributors

y-okumura-isp avatar takam5f2 avatar nabetetsu avatar hsgwa avatar pre-commit-ci[bot] avatar tilde-actions-bot[bot] avatar

Stargazers

 avatar Toni Ogunmade avatar  avatar takeshi-iwanari avatar  avatar  avatar

Watchers

Arata Fujimura avatar Shinpei Kato avatar Yoshiyuki Ohta avatar Makoto Kurihara avatar Yasuyuki Takahashi avatar Dai Utsui avatar Akihito Ohsato avatar Yusuke FUJII avatar Takuya Azumi avatar Yuki Iida avatar Manato Hirabayashi avatar Jixin Han avatar yabuta avatar Eiji Sekiya avatar  avatar RyuYamamoto avatar kuwabara avatar Daichi Murakami avatar Yoshifumi Hayashi avatar Takenobu Tani avatar Fumiya Watanabe avatar Takanori Ishibashi avatar  avatar AkiTakeuchi avatar Go Sakayori avatar K.Hoshi avatar Yamato Ando avatar Y.Ishiguro avatar  avatar Tsuyoshi Hatta avatar Naophis avatar Junya Sasaki avatar Alexander Carballo avatar Hayato Mizushima avatar Yoshi TAKASHIMA avatar Takahiro Ishikawa avatar Shohei Sakai avatar Keisuke Shima avatar Tadasuke KURAMOCHI avatar  avatar  avatar  avatar

tilde's Issues

Purge temporary value to get time stamp from message

We define get_timestamp(rclcpp::Time *t, M * m) in tilde_publisher.hpp.

But This API is very confusing because:

  • return m->header.stamp if m has header.stamp field,
  • otherwise return t

This API has two objectives:

(1) check the existence of the header.stamp field
(2) get header.stamp if exists

How about splitting these?

PubInfo header_stamp is filled even when the main message has no header stamp

version: 3260cb
How to reproduce: Run tilde_sample.

Here is the PubInfo.
This node relays std_msgs::msg::String.

header:
  stamp:
    sec: 1646034075
    nanosec: 142661059
  frame_id: ''
output_info:
  topic_name: /relay_without_stamp
  node_fqn: ''
  seq: 13
  pub_time:
    sec: 1646034075
    nanosec: 142667675
  pub_time_steady:
    sec: 6846520
    nanosec: 913127491
  header_stamp:                      # std_msgs::msg::String has no header.stamp but this field is filled
    sec: 1646034075
    nanosec: 142651785
input_infos:
- topic_name: /topic_without_stamp
  sub_time:
    sec: 1646034075
    nanosec: 131743819
  sub_time_steady:
    sec: 6846520
    nanosec: 902204465
  has_header_stamp: false      # false, that's right
  header_stamp:
    sec: 0
    nanosec: 0

latency viewer may hang if the target message doesn't have header stamp field or very slow Hz

Originally, this happened with tilde bf0d05f for internal experiments.

Be aware the target topic doesn't have the header.stamp field.

stamps: 1, 0.000000000
(snip, same lines)
stamps: 1, 0.000000000
Traceback (most recent call last):
  File "TILDE/install/tilde_vis/lib/tilde_vis/latency_viewer", line 11, in <module>
    load_entry_point('tilde-vis', 'console_scripts', 'latency_viewer')()
  File "TILDE/build/tilde_vis/tilde_vis/latency_viewer.py", line 767, in main
    main_curses(None, args=sys.argv)
  File "TILDE/build/tilde_vis/tilde_vis/latency_viewer.py", line 749, in main_curses
    rclpy.spin(node)
  File "/opt/ros/galactic/lib/python3.8/site-packages/rclpy/__init__.py", line 196, in spin
    executor.spin_once()
  File "/opt/ros/galactic/lib/python3.8/site-packages/rclpy/executors.py", line 707, in spin_once
    raise handler.exception()
  File "/opt/ros/galactic/lib/python3.8/site-packages/rclpy/task.py", line 239, in __call__
    self._handler.send(None)
  File "/opt/ros/galactic/lib/python3.8/site-packages/rclpy/executors.py", line 415, in handler
    await call_coroutine(entity, arg)
  File "/opt/ros/galactic/lib/python3.8/site-packages/rclpy/executors.py", line 329, in _execute_timer
    await await_or_execute(tmr.callback)
  File "/opt/ros/galactic/lib/python3.8/site-packages/rclpy/executors.py", line 107, in await_or_execute
    return callback(*args)
  File "TILDE/build/tilde_vis/tilde_vis/latency_viewer.py", line 695, in timer_callback
    logs.extend(self.handle_stat(stamps))
  File "TILDE/build/tilde_vis/tilde_vis/latency_viewer.py", line 573, in handle_stat
    stats = handle_stat(stamps,
  File "TILDE/build/tilde_vis/tilde_vis/latency_viewer.py", line 295, in handle_stat
    stats = calc_stat(merged)
  File "TILDE/build/tilde_vis/tilde_vis/latency_viewer.py", line 388, in calc_stat
    return results.apply_with_depth(_calc_stat)
AttributeError: 'NoneType' object has no attribute 'apply_with_depth'

It looks merged is None at stats = calc_stat(merged) in latency_viewer.py:295.
This happens when:

(1) message does not have the header.stamp field. We need to check has_header_field.

(2) even if a message has the header.stamp field, this problem happens.
For example, idx can be 0 in the code below when Hz is very low.

# latency_viewer.py
def handle_stat(stamps, pubinfos, target_topic, solver, stops, dumps=False):
	idx = 0        # actually, we set idx by logic.
    merged = None
    for target_stamp in stamps[:idx]:  # if idx=0, no loop
	   # update merged

    stats = calc_stat(merged)  # here, merged = None
    return stats

minimum case

See issues_23_1.launch.py and issues_23_2.launch.py in tilde_vis_test.

Clear STEE explicit sources after publish

When we use explicit API multiple times, old information in the sources field doesn't disappear.

Reproduce

  1. call explicit API
  2. publish
  3. call explicit API again
  4. publish. Then, we got two sources field entries, including information (1) and (3).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.