Advertisement
Guest User

timestamp.patch

a guest
Mar 19th, 2012
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.55 KB | None | 0 0
  1. Index: bin/ROSProxy/ROSProxy.py
  2. ===================================================================
  3. --- bin/ROSProxy/ROSProxy.py    (revision 2450)
  4. +++ bin/ROSProxy/ROSProxy.py    (working copy)
  5. @@ -134,8 +134,11 @@
  6.                 inst = roslib.rostime.Time()
  7.             else:
  8.                 inst = roslib.rostime.Duration()
  9. -           inst.nsecs = obj['nsecs']
  10. -           inst.secs = obj['secs']
  11. +           if 'nsecs' in obj and 'secs' in obj:
  12. +               inst.nsecs = obj['nsecs']
  13. +               inst.secs = obj['secs']
  14. +           else:
  15. +               inst = rospy.get_rostime()
  16.             return inst
  17.         else:
  18.             if typeStr == 'Header':
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement