Build issue with humble-future branch of events executor (timer reset support)
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 805
- Forks
- 564
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 27
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.
Contributor 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.
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.
Assessment
- Tech stack
- cpp
- Domain
- build-system, robotics
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100