ros2 / ros2/rclcpp

MultiThreadedExecutor should use assigned CPUs in the process space if possible.

Open
#2,037 8 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Feature request

Feature description

MultiThreadedExecutor should honor CPU affinity to be set by user application for process space, including inherited affinity.
https://github.com/ros2/rclpy/pull/1031 includes this configuration, so the same behavior should go to rclcpp.
Using single thread with MultiThreadedExecutor will print the warning since it is not recommended, to avoid the possible problem which is described https://github.com/ros2/rclcpp/issues/2029.
But if the CPU affinity is set by user application, it will honor that configuration.

Implementation considerations
  • Implement abstracted function in rcutils so that we can conceal the platform implementation in client libraries.
Related PRs

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 with MultiThreadedExecutor in rclcpp and compare the CPU-affinity configuration described by rclpy PR #1031 and rclcpp PR #2030. Investigate the proposed abstracted function in rcutils, then verify that inherited process affinity is honored and the single-thread warning behavior remains consistent.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
backend-api-design, operating-systems
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.