Template Function rclcpp::create_wall_timer

Function Documentation

template<typename DurationRepT, typename DurationT, typename CallbackT>
rclcpp::WallTimer<CallbackT>::SharedPtr rclcpp::create_wall_timer(std::chrono::duration<DurationRepT, DurationT> period, CallbackT callback, rclcpp::CallbackGroup::SharedPtr group, node_interfaces::NodeBaseInterface *node_base, node_interfaces::NodeTimersInterface *node_timers)

Convenience method to create a wall timer with node resources.

Template Parameters:
  • DurationRepT

  • DurationT

  • CallbackT

Parameters:
  • period – period to execute callback. This duration must be 0 <= period < nanoseconds::max()

  • callback – callback to execute via the timer period

  • group – callback group

  • node_base – node base interface

  • node_timers – node timer interface

Throws:

std::invalid_argument – if either node_base or node_timers are null, or period is negative or too large

Returns:

shared pointer to a wall timer