rclcpp icon indicating copy to clipboard operation
rclcpp copied to clipboard

Use `NodeParametersInterface` to track `use_sim_time` parameter for time source

Open fujitatomoya opened this issue 8 months ago • 0 comments

Minor Enhancement

see https://github.com/ros2/rclcpp/blob/411dbe8212dd753ee60871f8605d0a8beaae5e37/rclcpp/src/rclcpp/time_source.cpp#L280

it uses basically /parameter_events subscription to check the use_sim_time which belongs to the node. but as mentioned TODO, this can be done more efficiently using NodeParametersInterface.

Implementation considerations

reference implementation (pretty old, reference only): https://github.com/fujitatomoya/rclcpp/commit/7867e98191d5a8e80afdc97a375aec2ddbe0e9ef

fujitatomoya avatar Nov 14 '23 17:11 fujitatomoya