Any equivalent in ros2 of ros::Time::setNow()?

asked 2022-05-27 12:02:41 -0500

msmcconnell gravatar image

updated 2022-05-27 12:03:03 -0500

As the title says, I'm wondering if its possible to achieve the same effect in ROS2 as calling ros::Time::setNow(new_time) in ROS1. This method sets the time to the provided value which can be useful in unit testing. Based on my understanding of the ROS2 clock architecture, I would expect the rclcpp::Clock class to have a setNow() method but I don't see one. Is there anyway to accomplish the same thing?

edit retag flag offensive close merge delete