[ros-users] [Discourse.ros.org] [Next Generation ROS] ROS Time in beta1

Tully Foote ros.discourse at gmail.com
Wed Dec 20 00:23:02 UTC 2017

In C++ ROS time is operational using the `/clock` topic if the parameter `use_sim_time` is set, following the [Clock and TIme design article](http://design.ros2.org/articles/clock_and_time.html).

The rclcpp Node has been extended to automatically setup a time source and provides [`now()`](https://github.com/ros2/rclcpp/blob/master/rclcpp/include/rclcpp/node.hpp#L376) and [`get_clock()`](https://github.com/ros2/rclcpp/blob/master/rclcpp/include/rclcpp/node.hpp#L372) convenience methods.

It has not been tested with the bridge and ROS1. I suspect that it would work if the right alias is defined between ROS1's `std_msgs/Time` and ROS2's `builtin_msgs/Time` as the datatypes are the same and the topic is the same.

Note that there's slightly different semantics on the parameter too as it's on the node and not global anymore.

[Visit Topic](https://discourse.ros.org/t/ros-time-in-beta1/1003/6) or reply to this email to respond.

More information about the ros-users mailing list