抓取宽度设置为物体y轴方向
This commit is contained in:
@@ -64,11 +64,15 @@ def calculate_pose_pca(
|
||||
if calculate_grab_width:
|
||||
obb = point_cloud.get_oriented_bounding_box()
|
||||
x, y, z = obb.center
|
||||
sizes = obb.extent
|
||||
grab_width = np.sort(sizes)[-2]
|
||||
extent = obb.extent
|
||||
order = np.argsort(-extent)
|
||||
|
||||
grab_width = extent[order][-2]
|
||||
z = z + grab_width * 0.20
|
||||
|
||||
v = obb.R
|
||||
v = v[:, order]
|
||||
|
||||
if v is None:
|
||||
logging.warning("PCA output v is None")
|
||||
return np.eye(4), 0.0
|
||||
|
||||
Reference in New Issue
Block a user