ros2 / ros2/rclcpp

rclcpp::TimerBase::SharedPtr timer - behaivor change with ros jazzy for reset timer method

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

Nobody has claimed this yet.

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

Description

Hello,

I have a rclcpp::TimerBase::SharedPtr timer_i2c; in my code, which I instantiate by
timer_i2c = this->create_wall_timer(1000ms / params_uint8[PARAM_UPDATE_RATE], std::bind(&ROSRider::timer_i2c_callback, this));

However while testing with jazzy I have found out the reset() function no longer works. Indeed, when reset is called timer stops, so reset acts like stop. in previous version, it just resetted the period of the timer.

And comments or ideas on this?

Best Regards,
C.

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::TimerBase::reset() and the create_wall_timer call shown in the report, then compare their behavior under ROS Jazzy with the previous version. Reproduce whether reset stops the timer instead of resetting its period; done when the intended semantics are confirmed and the behavior is covered by a regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
robotics
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.