机器人 以expo_marker_red为例抓取姿态的生成

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/flyfish1986/article/details/85049054

机器人 以expo_marker_red为例抓取姿态的生成

flyfish

源码地址
https://github.com/atenpas/gpg

生成条件是 6-DOF grasp poses for a 2-finger grasp

$ git clone https://github.com/atenpas/gpg.git

整个编译过程如下
生成项目

$ cd grasp_candidates_generator
$ mkdir build && cd build
$ cmake …
$ make

最后安装项目

$ sudo make install

源图片的样子
在这里插入图片描述
点云文件夹
在这里插入图片描述
使用原始的夹抓参数

# Robot Hand Geometry Parameters:
#   finger_width: the width of the finger
#   outer_diameter: the diameter of the robot hand (= maximum aperture plus 2 * finger width)
#   hand_depth: the finger length (measured from hand base to finger tip)
#   hand_height: the height of the hand
#   init_bite: the minimum distance between the fingertip and the side of the object that is oriented toward the hand
finger_width = 0.01
hand_outer_diameter = 0.12
hand_depth = 0.06
hand_height = 0.02
init_bite = 0.01

# Preprocessing of Point Cloud
#   voxelize: if the point cloud gets voxelixed
#   remove_outliers: if statistical outliers are removed from the point cloud (used to remove noise)
#   workspace: the workspace of the robot manipulator
#   camera_pose: the pose of the camera that took the point cloud
voxelize = 1
remove_outliers = 0
workspace = -1.0 1.0 -1.0 1.0 -1.0 1.0
camera_pose = 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1

# Grasp Candidate Generation
#   num_samples: the number of samples to be drawn from the point cloud
#   num_threads: the number of CPU threads to be used
#   nn_radius: the radius for the neighborhood search
#   num_orientations: the number of robot hand orientations to evaluate
#   rotation_axis: the axis about which the point neighborhood gets rotated
num_samples = 5
num_threads = 4
nn_radius = 0.01
num_orientations = 1
rotation_axis = 2

# Visualization
#   plot_grasps: if the grasp candidates found are plotted with PCL
#   plot_normals: if the calculated surface normals are plotted with PCL
plot_grasps = 1
plot_normals = 1

执行命令

扫描二维码关注公众号,回复: 5364532 查看本文章
pumpkinking@pumpkinkingpc:~/code/gpg/build$ ./generate_candidates ../cfg/params.cfg ~/data/NP1_0.pcd
finger_width: 0.01
hand_outer_diameter: 0.12
hand_depth: 0.06
hand_height: 0.02
init_bite: 0.01
voxelize: 1
remove_outliers: 0
workspace: -1.0 1.0 -1.0 1.0 -1.0 1.0
camera_pose: 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1
num_samples: 5
num_threads: 4
nn_radius: 0.01
num_orientations: 1
rotation_axis: 2
plot_grasps: 1
plot_normals: 1
Loaded point cloud with 750 points 
3
Processing cloud with: 750 points.
After workspace filtering: 750 points left.
After voxelization: 259 points left.
Subsampled 5 at random uniformly.
Calculating surface normals ...
camera: 0, #indices: 259, #normals: 259 
 runtime (normals): 0.0143232
Reversing direction of normals that do not point to at least one camera ...
 reversed 0 normals
 runtime (reverse normals): 5.224e-06
Drawing 259 normals


Estimating local reference frames ...
Estimated 5 local reference frames in 0.00154198 sec.
Finding hand poses ...
 Found 5 grasp candidate sets in 0.00282635 sec.
====> HAND SEARCH TIME: 0.00446058
Generated 5 grasp candidate sets.
Generated 5 grasp candidates.

换个pcd文件

cfg ~/data/NP3_156.pcd
finger_width: 0.01
hand_outer_diameter: 0.12
hand_depth: 0.06
hand_height: 0.02
init_bite: 0.01
voxelize: 1
remove_outliers: 0
workspace: -1.0 1.0 -1.0 1.0 -1.0 1.0
camera_pose: 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1
num_samples: 5
num_threads: 4
nn_radius: 0.01
num_orientations: 1
rotation_axis: 2
plot_grasps: 1
plot_normals: 1
Loaded point cloud with 427 points 
3
Processing cloud with: 427 points.
After workspace filtering: 427 points left.
After voxelization: 241 points left.
Subsampled 5 at random uniformly.
Calculating surface normals ...
camera: 0, #indices: 241, #normals: 241 
 runtime (normals): 0.00224894
Reversing direction of normals that do not point to at least one camera ...
 reversed 0 normals
 runtime (reverse normals): 3.8181e-05
Drawing 241 normals
Estimating local reference frames ...
Estimated 5 local reference frames in 0.00153187 sec.
Finding hand poses ...
 Found 5 grasp candidate sets in 0.00215031 sec.
====> HAND SEARCH TIME: 0.00377834
Generated 5 grasp candidate sets.
Generated 5 grasp candidates.

在这里插入图片描述
在这里插入图片描述
绿色是生成的夹抓

在这里插入图片描述
更改之后的夹抓参数

# Robot Hand Geometry Parameters:
#   finger_width: the width of the finger
#   outer_diameter: the diameter of the robot hand (= maximum aperture plus 2 * finger width)
#   hand_depth: the finger length (measured from hand base to finger tip)
#   hand_height: the height of the hand
#   init_bite: the minimum distance between the fingertip and the side of the object that is oriented toward the hand
finger_width = 0.001
hand_outer_diameter = 0.012
hand_depth = 0.006
hand_height = 0.002
init_bite = 0.001

# Preprocessing of Point Cloud
#   voxelize: if the point cloud gets voxelixed
#   remove_outliers: if statistical outliers are removed from the point cloud (used to remove noise)
#   workspace: the workspace of the robot manipulator
#   camera_pose: the pose of the camera that took the point cloud
voxelize = 1
remove_outliers = 0
workspace = -1.0 1.0 -1.0 1.0 -1.0 1.0
camera_pose = 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1

# Grasp Candidate Generation
#   num_samples: the number of samples to be drawn from the point cloud
#   num_threads: the number of CPU threads to be used
#   nn_radius: the radius for the neighborhood search
#   num_orientations: the number of robot hand orientations to evaluate
#   rotation_axis: the axis about which the point neighborhood gets rotated
num_samples = 5
num_threads = 4
nn_radius = 0.01
num_orientations = 1
rotation_axis = 2

# Visualization
#   plot_grasps: if the grasp candidates found are plotted with PCL
#   plot_normals: if the calculated surface normals are plotted with PCL
plot_grasps = 1
plot_normals = 1

夹转参数变更后只生成3个抓取姿态

pumpkinking@pumpkinkingpc:~/code/gpg/build$ ./generate_candidates ../cfg/params.cfg ~/data/NP3_156.pcd
finger_width: 0.001
hand_outer_diameter: 0.012
hand_depth: 0.006
hand_height: 0.002
init_bite: 0.001
voxelize: 1
remove_outliers: 0
workspace: -1.0 1.0 -1.0 1.0 -1.0 1.0
camera_pose: 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1
num_samples: 5
num_threads: 4
nn_radius: 0.01
num_orientations: 1
rotation_axis: 2
plot_grasps: 1
plot_normals: 1
Loaded point cloud with 427 points 
3
Processing cloud with: 427 points.
After workspace filtering: 427 points left.
After voxelization: 241 points left.
Subsampled 5 at random uniformly.
Calculating surface normals ...
camera: 0, #indices: 241, #normals: 241 
 runtime (normals): 0.00227129
Reversing direction of normals that do not point to at least one camera ...
 reversed 0 normals
 runtime (reverse normals): 3.5915e-05
Drawing 241 normals
Estimating local reference frames ...
Estimated 5 local reference frames in 0.00696974 sec.
Finding hand poses ...
 Found 2 grasp candidate sets in 0.00844783 sec.
====> HAND SEARCH TIME: 0.0157341
Generated 2 grasp candidate sets.
Generated 2 grasp candidates.

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/flyfish1986/article/details/85049054