-
Notifications
You must be signed in to change notification settings - Fork 522
Closed
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed
Description
Feature request
Feature description
Current implementation of THROTTLE logger macros require rclcpp::Clock object to be a local (due to the way the lambda is defined in the macro body). This precludes the use of the node clock or a clock data member.
Implementation considerations
The lambda could be changed slightly to cache a reference to the clock in a local variable which would allow the THROTTLE macro to be called like this:
RCLCPP_INFO_THROTTLE(get_logger(), *get_clock(), ...)
instead of:
rclcpp::Clock clock;
RCLCPP_INFO_THROTTLE(get_logger(), clock, ...)
The exact change would be in the rclcpp/rclcpp/resource/logging.hpp.em file (see attached diff)
logging.hpp.em.diff.txt
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed