We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents c23b183 + 58af930 commit 8913248Copy full SHA for 8913248
qsr_prob_rep/src/qsrrep_ros/ros_client.py
@@ -27,7 +27,12 @@ def call_service(self, req):
27
"""
28
assert(issubclass(req.__class__, HMMRepRequestAbstractclass))
29
s = rospy.ServiceProxy(self.services[req.__class__],QSRProbRep)
30
- res = s(QSRProbRepRequest(qsr_type=req.kwargs.pop("qsr_type"), data=json.dumps(req.kwargs)))
+ try:
31
+ s.wait_for_service(timeout=10.)
32
+ res = s(QSRProbRepRequest(qsr_type=req.kwargs.pop("qsr_type"), data=json.dumps(req.kwargs)))
33
+ except (rospy.ROSException, rospy.ROSInterruptException, rospy.ServiceException) as e:
34
+ rospy.logerr(e)
35
+ return None
36
try:
37
data = json.loads(res.data)
38
except ValueError:
0 commit comments