Skip to content

Commit

Permalink
Fixed uninitialized Time usage in rosservice call (#2369)
Browse files Browse the repository at this point in the history
  • Loading branch information
peci1 authored Sep 4, 2024
1 parent aef16f0 commit de95e28
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tools/rosservice/src/rosservice/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -607,6 +607,8 @@ def _rosservice_cmd_call(argv):
service_uri = master.getPid()
except socket.error:
raise ROSServiceIOException("Unable to communicate with master!")
# initialize rospy time due to potential throttled printing
rospy.rostime.set_rostime_initialized(True)
rospy.wait_for_service(service_name)

# optimization: in order to prevent multiple probe calls against a service, lookup the service_class
Expand Down

0 comments on commit de95e28

Please sign in to comment.