Closed jdddog closed 5 years ago
@jdddog It looks like there's a test failure in the time synchronizer test that might be related to this PR. Would you mind fixing it? https://ci.ros2.org/job/ci_linux/8279/testReport/junit/message_filters.test.directed/TestDirected/test_synchronizer/
@jdddog It looks like there's a test failure in the time synchronizer test that might be related to this PR. Would you mind fixing it? https://ci.ros2.org/job/ci_linux/8279/testReport/junit/message_filters.test.directed/TestDirected/test_synchronizer/
Hey @sloretz, no worries and thanks for the feedback. Yeah sure, I can take a look on the weekend.
@jdddog can you have another look?
The failing tests are due to the fact that the called API Time.from_msg
is currently broken. See ros2/rclpy#453 for the proposed fix.
Thanks for the PR @jdddog !
Thanks for the PR @jdddog !
@sloretz No worries. Apologies for not looking at how to fix the breaking test.
Fixes #34
In the TimeSynchronizer class the following error is thrown because msg.header.stamp (builtin_interfaces/Time) is not hashable (perhaps it was in ROS 1), see below:
This occurs at messagefilters/__init_\.py#L227.
I've just taken the approach used in ApproximateTimeSynchronizer to hash the timestamp, creating a rclpy Time object and using the nanoseconds field as the hash:
There is also a lot of code that was added to ApproximateTimeSynchronizer but not to TimeSynchronizer, perhaps these checks should be in TimeSynchronizer too, in case someone doesn't set a header?