Modifies timers API to select autostart state#1004
Modifies timers API to select autostart state#1004clalancette merged 10 commits intoros2:rollingfrom
Conversation
Signed-off-by: Voldivh <eloyabmfcv@gmail.com>
tfoote
left a comment
There was a problem hiding this comment.
Two thoughts:
- We should add a backwards compatible function.
- We should make sure that there's new test coverage of the
autostart = falsepath in the timer unit tests.
Signed-off-by: Voldivh <eloyabmfcv@gmail.com>
Signed-off-by: Voldivh <eloyabmfcv@gmail.com>
Signed-off-by: Voldivh <eloyabmfcv@gmail.com>
Signed-off-by: Voldivh <eloyabmfcv@gmail.com>
Signed-off-by: Voldivh <eloyabmfcv@gmail.com>
fujitatomoya
left a comment
There was a problem hiding this comment.
although this is an easy way to support autostart capability for timer, i was expecting we were going to extend the capability like start and stop for the timer. and then autostart can rely on those capabilities?
i was thinking that,
- with current implementation including ros2/rclcpp#2005
- creating already canceled timer and start the timer with
resetis kinda weird?
- creating already canceled timer and start the timer with
- having
startandstopcapabilities for the timer.- cannot start / stop the canceled timer.
- canceled timer can be reset only.
next_call_timeshould be calculated and managed internally. (for example, period is 30s timer. after 15s, it can callstop, then left time should be kept. if it starts the timer, 1st period will be 15s and after that 30s period. this is the difference from reset.)autostartflag can callstartAPI internally. in this case, we would addrcl_timer_start/stopAPIs as extension, probably avoid to addrcl_timer_init2to keep the backward compatibility?
There could have been discussion something like this, but i would like to have feedback.
thanks,
|
CC: @ivanpauno @wjwwood |
How would they work exactly? |
Ah sorry, you already explained my question. |
|
Taking into account the proposal of extending the capabilities of timers and some concerns on this PR regarding the use of the |
|
I believe that the latter one makes more sense. (related to ros2/rclcpp#2006 (comment), adding @ros2/team friendly ping. |
fujitatomoya
left a comment
There was a problem hiding this comment.
overall lgtm, sorry to be late to get back to this.
@Voldivh are you still working on this? there are conflicts what needs to be addressed.
Hey @fujitatomoya I stopped working on this some time ago. However, I believe it only requires a little final push to get this and the follow up PR's in. I believe I can get back on this later this week. Give me a couple of days to recall the implementation I was doing and solve the conflicts we currently have. |
|
@Voldivh thanks for taking care of this, there is build failure https://build.ros2.org/job/Rpr__rcl__ubuntu_jammy_amd64/350/console |
Yeah I noticed, however, I believe the error is coming from this commit made into rolling. I'm not sure if I should modify something here. |
|
@christophebedard Rpr job is supposed to fail because of c43c7ab? |
|
Yeah, it will fail until |
|
@Voldivh never mind the rpr job failure, i wll start the CI to verify. |
|
Hey @fujitatomoya, I believe the CI build failed because of the branch for ros2/system_tests#508 was outdated. I already sync it with the latest changes from rolling, I think it should fix it. |
|
@Voldivh thanks for checking! CI: 🤞 |
|
@fujitatomoya well that didn't do the trick :c. I'm not sure on what to do next, this is the error we are getting https://ci.ros2.org/job/ci_linux/18944/console#:~:text=12%3A18%3A46%20%3D%3D%3E,with%20return%20code%20%271%27 |
There's no package called |
That makes a lot of sense, is that something that is defined when running the CI or do I have to modify something? |
|
@Voldivh @clalancette Ah, sorry 😓 i will restart the CI. |
|
@Voldivh i think we need to rebase rclcpp, please check https://ci.ros2.org/job/ci_linux/18949/console. |
I agree, it should be fine now after this commit. |
|
Pulls: #1004, ros2/rclcpp#2005, ros2/system_tests#508, ros2/rclpy#999 |
|
Rebuilds build #12240 |
|
@clalancette can you review and merge these PRs? they need to be go in at the same time, but i do not have merge permission for |
clalancette
left a comment
There was a problem hiding this comment.
I've left three small things to fix.
Signed-off-by: Voldivh <eloyabmfcv@gmail.com>
Signed-off-by: Chris Lalancette <clalancette@gmail.com>


Signed-off-by: Voldivh eloyabmfcv@gmail.com
Part of ros2/rclcpp#1980
Basically it gives the timer initialization a variable that enables or disables the autostart on initialization. The variable
autostartis defaulted toTruein order to avoid any breaks in current use of the API.