ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
self.current_time = self.get_clock().now().to_msg()
ct = self.current_time.sec + (self.current_time.nanosec/1e+9)
lt = self.last_time.sec + (self.last_time.nanosec/1e+9)
dt = (ct - lt)
print(dt)