ros / roscpp_core

ros distribution sandbox
89 stars 116 forks source link

WallRate and Rate have have different Sleep-Behaviour #39

Closed NikolasE closed 8 years ago

NikolasE commented 9 years ago

According to the documentation, ros::Rate should return false if the desired rate was not reached (https://github.com/ros/roscpp_core/pull/37 will make sure that is is also implemented).

However, the docu of WallRate.sleep() says that it will return true if the rate was not reached which is surprising. I think that both classes should behave the same so that the docu (and implementation) of WallRate should be aligned.

dirk-thomas commented 8 years ago

45 fixes the return value of Rate::sleep.

WallRate::sleep will be updated in K-turtle - the documentation as well as the implementation - to be similar to Rate::sleep and allow to distinguish if the function slept as expected or not.

dirk-thomas commented 8 years ago

47 changes the semantic of Duration::sleep to match the return value semantic of Rate::sleep.

@NikolasE Can you please give the branch of that PR a try to confirm that it behaves in the way you expect it to.