ros2 throttle logs
I am trying to use logging statements like the following:
RCLCPP_INFO_THROTTLE(...)
in my code (C++, ROS2 Eloquent). I am used to the ROS1 syntax in which you specify a duration (as a float or double) and the print statement gets printed every so often. I found the code documentation for these here:
http://docs.ros2.org/latest/api/rclcp...
Here's what I tried in my code:
RCLCPP_INFO_THROTTLE(this->get_logger(), this->get_clock(), std::chrono::seconds(10), "Print statement here");
I am not clear on what to pass in for the clock and duration arguments. Are these supposed to be std::chrono clock/duration or rcpcpp::clock? I'm finding the documentation of clocks in ROS2 in general to be confusing and haven't found a good tutorial. Any help would be appreciated (I'm going to do my own throttling for now because this is proving difficult).