Build issue with humble-future branch of events executor (timer reset support)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- cpp
- Domain
- build-system, robotics
Research direction
Start by reproducing the Humble build of the humble-future events executor and inspect rclcpp/src/rclcpp/timer.cpp alongside rclcpp/include/rclcpp/timer.hpp and detail/cpp_callback_trampoline.hpp. Compare the cherry-picked rclcpp and rcl timer-reset commits described in the events-executor README. Done means the required commits or dependency set is identified and rclcpp builds successfully with timer reset support.
Written by the indexing model from the issue text.
Description
I’m attempting to use iRobot’s events executor with ROS 2 Humble and am trying to build the humble-future branch of the events executor.
As noted in the README, this branch requires additional support from rclcpp and rcl for resetting timers. I cherry-picked the recommended commits, but I’m running into the following build error when compiling rclcpp:
--- stderr: rclcpp
/irobot_ws/src/rclcpp/rclcpp/src/rclcpp/timer.cpp: In member function ‘void rclcpp::TimerBase::set_on_reset_callback(std::function<void(long unsigned int)>)’:
/irobot_ws/src/rclcpp/rclcpp/src/rclcpp/timer.cpp:186:21: error: function template-id ‘cpp_callback_trampoline<rclcpp::TimerBase::set_on_reset_callback(std::function<void(long unsigned int)>)::<lambda(size_t)>, const void*, size_t>’ in nested-name-specifier
186 | rclcpp::detail::cpp_callback_trampoline<
| ^~~~~~~~~~~~~~~~~~~~~~~~
187 | decltype(new_callback), const void *, size_t>::callback,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /irobot_ws/src/rclcpp/rclcpp/src/rclcpp/timer.cpp:25:
/irobot_ws/src/rclcpp/rclcpp/include/rclcpp/detail/cpp_callback_trampoline.hpp:58:1: note: ‘template<class UserDataT, class ... Args, class ReturnT> ReturnT rclcpp::detail::cpp_callback_trampoline(UserDataT, Args ...)’ declared here
58 | cpp_callback_trampoline(UserDataT user_data, Args ... args) noexcept
| ^~~~~~~~~~~~~~~~~~~~~~~
/irobot_ws/src/rclcpp/rclcpp/src/rclcpp/timer.cpp:194:24: error: no matching function for call to ‘rclcpp::TimerBase::set_on_reset_callback(<unresolved overloaded function type>, const void*)’
194 | set_on_reset_callback(
| ~~~~~~~~~~~~~~~~~~~~~^
195 | rclcpp::detail::cpp_callback_trampoline<
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
196 | decltype(on_reset_callback_), const void *, size_t>,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
197 | static_cast<const void *>(&on_reset_callback_));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/irobot_ws/src/rclcpp/rclcpp/src/rclcpp/timer.cpp:152:1: note: candidate: ‘void rclcpp::TimerBase::set_on_reset_callback(std::function<void(size_t)>)’
152 | TimerBase::set_on_reset_callback(std::function<void(size_t)> callback)
| ^~~~~~~~~
/irobot_ws/src/rclcpp/rclcpp/src/rclcpp/timer.cpp:152:1: note: candidate expects 1 argument, 2 provided
In file included from /irobot_ws/src/rclcpp/rclcpp/src/rclcpp/timer.cpp:15:
/irobot_ws/src/rclcpp/rclcpp/include/rclcpp/timer.hpp:193:3: note: candidate: ‘void rclcpp::TimerBase::set_on_reset_callback(rcl_event_callback_t, const void*)’
193 | set_on_reset_callback(rcl_event_callback_t callback, const void * user_data);
| ^~~~~~~~~~~~~~~~~~~~~
/irobot_ws/src/rclcpp/rclcpp/include/rclcpp/timer.hpp:193:46: note: no known conversion for argument 1 from ‘<unresolved overloaded function type>’ to ‘rcl_event_callback_t’ {aka ‘void (*)(const void*, long unsigned int)’}
193 | set_on_reset_callback(rcl_event_callback_t callback, const void * user_data);
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
gmake[2]: *** [CMakeFiles/rclcpp.dir/build.make:1119: CMakeFiles/rclcpp.dir/src/rclcpp/timer.cpp.o] Error 1
gmake[2]: *** Waiting for unfinished jobs....
gmake[1]: *** [CMakeFiles/Makefile2:465: CMakeFiles/rclcpp.dir/all] Error 2
gmake: *** [Makefile:146: all] Error 2
Environment
OS: Ubuntu 22.04
ROS 2: Humble
Question
Has anyone successfully built the humble-future branch of events executor with timer reset support? Am I missing a required patch or dependency in rclcpp/rcl?
Any guidance or confirmation on the correct set of commits needed would be greatly appreciated.
- Dominant language
- C++
- Stars
- 829
- Forks
- 587
- Avg merge
- 4d 6h
- Merged PRs (30d)
- 30
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ros2/rclcpp
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Maintainers usually reply within 1 day
-
Memory grows per callback group created and destroyed on long lived nodesPossibly taken @jwallace42 claimed this 1 day ago. Openbug
Difficulty 4/5 3-5 days Newbie friendliness 28/100
ros2/rclcpp#3428 · 1 comment · 1 assignee ·
Maintainers usually reply within 1 day
-
removing and immediately re-adding a node to the EventsCBGExecutor leaves its entities unregisteredPossibly taken @skyegalaxy claimed this 10 days ago. Openbug
ros2/rclcpp#3418 · 1 assignee ·
Maintainers usually reply within 1 day
-
[Humble] Removing a node with more than one auto-added callback group leaves a dangling guard condition in the executorPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 4/5 3-5 days Newbie friendliness 55/100
ros2/rclcpp#3410 · 2 comments ·
Maintainers usually reply within 1 day
Similar issues
-
bug
Difficulty 1/5 1-3 hours Newbie friendliness 82/100
EchoTools/nevr-runtime#2912 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
Maintainers usually reply within 1 day
-
category:port-update
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 2 days
-
bug-unconfirmed
Difficulty 1/5 Under an hour Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
libc++
Difficulty 1/5 Under an hour Newbie friendliness 88/100
llvm/llvm-project#246508 ·
Maintainers usually reply within 1 day