how is rosh's ok() different from rospy.is_shutdown()?
Specifically, what's the difference with how they handle a KeyboardInterrupt/SIGINT?
I would expect these two snippets to act the same, but they don't:
#!/usr/bin/env python
import rospy
r = rospy.Rate(10)
while not rospy.is_shutdown():
print 'ok...'
r.sleep()
and
#!/usr/bin/env rosh
r = Rate(10)
while ok():
print "ok..."
r.sleep()
The first example exits on Ctrl+C, but the second does not. What am I missing?