ros2 / ros2/rclcpp

StaticSingleThreadedExecutor uses spin_once in spin

Open
#2,470 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

This change seems to have been made in https://github.com/ros2/rclcpp/pull/2142

https://github.com/ros2/rclcpp/blob/c5bc4b65284c71a86fc1758cc7eeb22204aa2bdd/rclcpp/src/rclcpp/executors/static_single_threaded_executor.cpp#L41C1-L43C4

  while (rclcpp::ok(this->context_) && spinning.load()) {
    this->spin_once_impl(std::chrono::nanoseconds(-1));
  }

I guess it should be

  while (rclcpp::ok(this->context_) && spinning.load()) {
    this->spin_all(std::chrono::nanoseconds(0));
  }

@mjcarroll @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 with rclcpp/src/rclcpp/executors/static_single_threaded_executor.cpp at the loop linked in the issue, then review the referenced pull request 2142 for context. Compare the current spin call with the proposed spin_all call and confirm that the executor's spin behavior matches the intended change.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.