Skip to content
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

rospy.sleep(): request for specific exception if time moved backwards #485

Closed
jowave opened this issue Aug 6, 2014 · 2 comments
Closed

Comments

@jowave
Copy link

jowave commented Aug 6, 2014

I kindly request for the TODO of rospy.sleep() in rospy.timer.py to be implemented and use a specific exception if ros time moved backwards.
I had trouble to find the cause of a python node shutting down, when using 'rosbag play -l --clock bagfile'. When the implementation follows the ros tutorials on python the ROSInterruptException is always catched:

if __name__ == '__main__':
    try:
        talker()
    except rospy.ROSInterruptException: pass

And there is no error message telling you, that time moved backwards.

@dirk-thomas dirk-thomas added this to the untargeted milestone Aug 18, 2014
@dirk-thomas
Copy link
Member

Since it is not very likely that this will get implemented by the maintainer I have marked the issue with the milestone untargeted.

Please consider to provide a pull request for the proposed feature. One comment though: a newly introduced exception would anyway need to inherit from rospy.ROSInterruptException in order to not change the API in terms of raising a new unrelated exception.

@jowave
Copy link
Author

jowave commented Aug 19, 2014

I made pull request #491 for the proposed feature. In addition to the exception inheriting from rospy.ROSInterruptException a logerr message is produced to inform the user. I hope this is ok. I looked into rospy.topics.py which produces log messages, too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants