Simulated clock subscriber is built for each node

Open
#2,659 8 comments 0 reactions 1 assignee View on GitHub

Maintainers usually reply within 1 day

@roncapat is already working on this.

Since Nov 21, 2024.

Assessment

This issue has not been assessed yet.

Description

enhancement

While profiling a big application of mine, made by static composition of 20+ nodes in the same executable, enabling use_sim_time makes 20+ threads spawn, each one with a clock subscriber.

https://github.com/ros2/rclcpp/blob/9b654942f99f17850e0e95480958abdbb508bc00/rclcpp/src/rclcpp/time_source.cpp#L396-L402

Why wouldn't be possible to share among all nodes the clock subscription / the time source? This would bring down the count of clock subscriber threads to just one.

Dominant language
C++
Stars
829
Forks
587
Avg merge
4d 6h
Merged PRs (30d)
30

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ros2/rclcpp

All issues in ros2/rclcpp

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.