-
Notifications
You must be signed in to change notification settings - Fork 522
Description
Even if a node has its use_sim_time parameter set to false, if a message is received by the TimeSource on the /clock topic, the node's clock will start using sim time.
This branch has added a test that fails but I would expect to pass: https://github.com/ros2/rclcpp/blob/07567dfbcd56803d0cb5ff8afe23e6b3171d02b6/rclcpp/test/test_time_source.cpp#L339..L341
The presence of a publisher on the clock topic currently causes nodes with unset use_sim_time parameter value to start using sim time (see #514 if you want to discuss that), but I don't think it should happen for those that have explicitly set the parameter to false.
If others agree we can label this as a bug and then only enable ROS time upon receipt of /clock msg if the parameter has not explicitly been set. That would keep the rest of the existing behaviour the same (again, if you want to discuss the behaviour on unset use_sim_time parameter, see #514).