Skip to content

Commit

Permalink
Merge pull request #1522 from yuyu2172/null-target_bin
Browse files Browse the repository at this point in the history
[jsk_apc2016_common] tf_bbox_to_mask produces warning message when posiiton of an arm is i…
  • Loading branch information
wkentaro committed May 25, 2016
2 parents 0ffb0ea + 336e43b commit 2c5930c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions jsk_apc2016_common/node_scripts/tf_bbox_to_mask.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ def _callback(self, camera_info):
timeout=rospy.Duration(10.0))

mask_img = self.get_mask_img(camera2bb_base, target_bin, self.camera_model)
if np.all(mask_img == 0):
rospy.logwarn('Bin mask image is all zero. ' +
'Position of an arm might be wrong.')
return
mask_msg = self.bridge.cv2_to_imgmsg(mask_img, encoding="passthrough")
mask_msg.header = camera_info.header
self.pub.publish(mask_msg)
Expand Down

0 comments on commit 2c5930c

Please sign in to comment.