Skip to content

Commit 0e26750

Browse files
(skills) don't try to save image when error (#1240)
2 parents 1f722a8 + 3903e2f commit 0e26750

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

robot_skills/src/robot_skills/world_model_ed.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -416,6 +416,7 @@ def save_image(self, path="", path_suffix="", filename=""):
416416
res = self._ed_get_image_srv(filename=filename)
417417
if res.error_msg:
418418
rospy.logerr("Could not save image: %s" % res.error_msg)
419+
return False
419420

420421
with open(fname + ".rgbd", "wb") as f:
421422
f.write(bytearray(res.rgbd_data))
@@ -426,6 +427,8 @@ def save_image(self, path="", path_suffix="", filename=""):
426427
# rgbd to png
427428
os.system('rosrun rgbd rgbd_to_png %s' % (fname + ".rgbd")) # ToDo: very very very ugly
428429

430+
return True
431+
429432
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
430433

431434
@deprecated

0 commit comments

Comments
 (0)