Allow saving timestamp-less messages to Cache (using rospy.Time.now() as their timestamp).#806
Allow saving timestamp-less messages to Cache (using rospy.Time.now() as their timestamp).#806peci1 wants to merge 3 commits intoros:kinetic-develfrom
Conversation
…() as their timestamp). Also added a convenience `getLast` method for retrieving the last message in the cache.
…explicitly asked to in contructor.
| if m.header.stamp >= from_stamp and m.header.stamp <= to_stamp] | ||
|
|
||
| return [msg for (msg, time) in zip(self.cache_msgs, self.cache_times) | ||
| if from_stamp <= time <= to_stamp] |
There was a problem hiding this comment.
This is not valid logic. The first operator results in a boolean which is then used in the second comparison.
There was a problem hiding this comment.
If I understand you objection correctly, I think it is incorrect :) Check http://stackoverflow.com/questions/26502775/pycharm-simplify-chained-comparison
There was a problem hiding this comment.
Omg scary syntax, I guess I just learned something new. Thanks for the reference. Please forget my comment.
|
Thank you for iterating on this. I have squashed and cherry-picked your changes in 005191b. |
|
Just came across this and it seems like a useful feature. @peci1: will you also update the wiki on message_filters? I do not see this mentioned anywhere right now. |
|
@gavanderhoorn Thanks for the hint, I've edited the page accordingly. |
Retargeting #636 to kinetic-devel.