-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix device time #129
fix device time #129
Conversation
@@ -160,9 +160,6 @@ class OpenNI2Device | |||
bool depth_video_started_; | |||
|
|||
bool image_registration_activated_; | |||
|
|||
bool use_device_time_; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is unused - removing it does break ABI - but these packages haven't even been synced out yet
@@ -53,7 +53,7 @@ def generate_launch_description(): | |||
plugin='openni2_wrapper::OpenNI2Driver', | |||
name='driver', | |||
parameters=[{'depth_registration': True}, | |||
{'use_device_time': False}], | |||
{'use_device_time': True}], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this puts our example launch files more in line with ROS1 usage - where use_device_time was enabled by default
{ | ||
image->header.stamp = ros_now; | ||
|
||
RCLCPP_DEBUG(rclcpp::get_logger("openni2"), "Time interval between frames: %.4f ms", (float)((ros_now - prev_time_stamp_).nanoseconds() / 1e6)); | ||
RCLCPP_DEBUG(rclcpp::get_logger("openni2"), "Time interval between frames: %.4f ms", | ||
(float)((ros_now.nanoseconds() - prev_time_stamp_.nanoseconds()) / 1e6)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this needs to be X.nanoseconds() - Y.nanoseconds() because if you switch between use_device_time and not, you will get an std::runtime_error that the clock sources are different
CI failure is only because of ABI change - which was expected due to fixing the name of a variable, and removing another unused one |
closes #121