ros2 / ros2/rclcpp

Support loaned message passed by intraprocess

Open
#1,769 6 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

backlog
Dominant language
C++
Stars
805
Forks
564
Avg merge
1d 17h
Merged PRs (30d)
27

Description

Currently RCLCPP intra-process communication can't handle Loan Messages:
https://github.com/ros2/rclcpp/blob/665e37784a6f1772e0efd2685c10fb0c17fdac96/rclcpp/include/rclcpp/publisher.hpp#L397-L400

After some CPU profiling done around Loaned Messages shown in https://github.com/ros2/rclcpp/issues/1642#issuecomment-916078459 I can tell that is not trivial to improve significantly the performances (CPU, latency). For small message passing, RCLCPP intra-process still performs at least twice as better. This leads me to the question of how much we could improve the use of Loaned Messages if they were supported by the intra-process manager, which will bring probably some benefits.

@Karsten1987 is there any updates on a plan to support Loaned Messages with intra-process communication?
@alsora @wjwwood

Contributor guide

Open the contributing guide

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.

Research direction

Start at rclcpp/include/rclcpp/publisher.hpp around lines 397-400 and trace how the intra-process manager handles message passing. Review the CPU profiling discussion in issue #1642, then determine the scope needed for Loan Messages to work through intra-process communication. Done means Loan Messages are supported there with the expected performance benefits validated.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
distributed-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.