ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
Looking at the source code for both, I believe they are the same:
For rcrclcpp::Clock(RCL_ROS_TIME).now()
source code:
https://docs.ros2.y org/foxy/api/rclcpp/clock_8hpp_source.html
And for node_->get_clock()->now()
source code:
https://docs.ros2.org/dashing/api/rclcpp/node_8hpp_source.html
Both are declared the same way:
RCLCPP_PUBLIC
Time
now()
The only difference I see is the first one is more direct method .