Skip to content

Commit

Permalink
fixed bounding box handling
Browse files Browse the repository at this point in the history
  • Loading branch information
mathias-luedtke committed May 29, 2012
1 parent d33e06a commit eb5e6c5
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions cob_generic_states/src/generic_manipulation_states.py
Expand Up @@ -249,13 +249,16 @@ def execute(self, userdata):
print "Service call failed: %s"%e
self.retries = 0
return 'failed'

#print userdata.object
#return 'failed'

# transform object_pose to middle
object_pose_in = userdata.object.pose
object_pose_in.header.stamp = self.listener.getLatestCommonTime("/base_link",object_pose_in.header.frame_id)
object_pose_in.pose.position.x += userdata.object.bounding_box.x/2.0
object_pose_in.pose.position.y += userdata.object.bounding_box.y/2.0
object_pose_in.pose.position.z += userdata.object.bounding_box.z/2.0
#object_pose_in.header.stamp = self.listener.getLatestCommonTime("/base_link",object_pose_in.header.frame_id)
#object_pose_in.pose.position.x += userdata.object.bounding_box_lwh.x/2.0
#object_pose_in.pose.position.y += userdata.object.bounding_box_lwh.y/2.0
object_pose_in.pose.position.z += userdata.object.bounding_box_lwh.z/2.0


req = GetPoseStampedTransformedRequest()
Expand Down

0 comments on commit eb5e6c5

Please sign in to comment.