You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The implementation should be rather straightforward.
In ros2, point of interest is time_source.cpp. It involves adding a "/clock" subscription that runs in it's own executor and using it as a time source if the parameter is set (with rcl_set_ros_time_override). This is preceded by resetting clocks and calling rcl_enable_ros_time_override. Since we interface with rcl, we need to replicate the behavior around calling these.
The work is as follows:
Expose API to set use_sim_time (on Ros2cs level)
Make this setting control whether we add a subscriber to "/clock" topic which in callback calls the *ros_time_override api. We would do this internally within Ros2cs. The subscription is best effort, keep last 1.
The current api for getting time should then just work (give system or "/clock" time depending on the parameter).
The text was updated successfully, but these errors were encountered:
The implementation should be rather straightforward.
In ros2, point of interest is time_source.cpp. It involves adding a "/clock" subscription that runs in it's own executor and using it as a time source if the parameter is set (with
rcl_set_ros_time_override
). This is preceded by resetting clocks and callingrcl_enable_ros_time_override
. Since we interface with rcl, we need to replicate the behavior around calling these.The work is as follows:
use_sim_time
(on Ros2cs level)The current api for getting time should then just work (give system or "/clock" time depending on the parameter).
The text was updated successfully, but these errors were encountered: