How to transfer second to rostime in ROS2
In ROS2, which function can replace ros1 'ros::Time().fromSec'? Thanks a lot for your time!
ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
In ROS2, which function can replace ros1 'ros::Time().fromSec'? Thanks a lot for your time!
rclcpp::Duration has a from_seconds() constructor - but rclcpp::Time does not, the best approximation that I've found is:
rclcpp::Time t(static_cast<uin64_t>(seconds * 1e9));
I have a bit more detailed write up in the ros2_cookbook
Asked: 2022-06-10 20:42:29 -0600
Seen: 523 times
Last updated: Jun 10 '22
Best toolchain for recording kinect data and converting to pointcloud offline?
how to bind a callback to include a MessageEvent [closed]
Proper source of xncore for compiling svn opencv with openni support?
Is it safe to change system date/time during execution