Minor suggestion for `rclcpp::Node::now()` documentation string
Closed this issue · 4 comments
roncapat commented
rclcpp/rclcpp/include/rclcpp/node.hpp
Lines 1433 to 1439 in e646270
Notice how "clock_type" is never referenced in the node.hpp
file.
I believe this is a copy-paste from rclcpp::Clock::now()
method docstring.
Maybe it's better to say something like:
Returns current time from the node time source.
If `use_sim_time` parameter is set to `true` while
constructing the `Node`, the simulation time is returned,
otherwise system time is returned.
christophfroehlich commented
Returns current time from the node time source. If `use_sim_time` parameter is set to `true` while constructing the `Node`, the simulation time is returned, otherwise system time is returned.
I think it doesn't need to be set before construction but can be set afterwards like in gz_ros2_control
roncapat commented
Refined proposal:
Returns current time from the node time source.
If `use_sim_time` parameter is set to `true`
the simulation time is returned,
otherwise system time is returned.
fujitatomoya commented
@roncapat thanks for the suggestion. can you create the PR for this? i am happy to review that.
and one comment for the PR, LifecycleNode::now()
should be updated accordingly.
roncapat commented
Sure! Yep, I always forget to check LifecycleNode, I will also fix that there :)