geometry2
geometry2 copied to clipboard
reuse logic from Time::durationToSec method
As suggested in https://github.com/ros2/rclcpp/pull/536#discussion_r211035479 the logic could be moved to rcutils
and be used in rclcpp::Time
and rclcpp::Duration
.
I can open up a PR for this since it's a simple logic movement but I would assume it would make more sense to move the logic to rclcpp opposed to rcutils to keep rcutils concise. Does anybody else have any opinions on where it should be moved to?
I can open up a PR for this since it's a simple logic movement but I would assume it would make more sense to move the logic to rclcpp opposed to rcutils to keep rcutils concise.
I don't think we can do that. The problem is that tf2
does not, and cannot, depend on rclcpp
. However, both tf2
and rclcpp
currently depend on rcutils
, so that is a logical place to share the implementation.