Skip to content

Commit

Permalink
[backport] use correct synchronous service call (#1006)
Browse files Browse the repository at this point in the history
Backport from #792
to fix #838

Co-authored-by: Christian Rauch <Rauch.Christian@gmx.de>
  • Loading branch information
RBT22 and christianrauch committed Aug 19, 2024
1 parent 72e58bc commit 77bb2d3
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions camera_calibration/src/camera_calibration/camera_calibrator.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,10 +193,8 @@ def handle_stereo(self, msg):


def check_set_camera_info(self, response):
if response.done():
if response.result() is not None:
if response.result().success:
return True
if response.success:
return True

for i in range(10):
print("!" * 80)
Expand All @@ -218,14 +216,14 @@ def do_upload(self):
rv = True
if self.c.is_mono:
req.camera_info = info
response = self.set_camera_info_service.call_async(req)
response = self.set_camera_info_service.call(req)
rv = self.check_set_camera_info(response)
else:
req.camera_info = info[0]
response = self.set_left_camera_info_service.call_async(req)
response = self.set_left_camera_info_service.call(req)
rv = rv and self.check_set_camera_info(response)
req.camera_info = info[1]
response = self.set_right_camera_info_service.call_async(req)
response = self.set_right_camera_info_service.call(req)
rv = rv and self.check_set_camera_info(response)
return rv

Expand Down

0 comments on commit 77bb2d3

Please sign in to comment.