success
This commit is contained in:
26
baselines/grasping/GSNet/graspnetAPI/examples/exam_vis.py
Executable file
26
baselines/grasping/GSNet/graspnetAPI/examples/exam_vis.py
Executable file
@@ -0,0 +1,26 @@
|
||||
__author__ = 'mhgou'
|
||||
__version__ = '1.0'
|
||||
|
||||
# GraspNetAPI example for visualization.
|
||||
# change the graspnet_root path
|
||||
|
||||
####################################################################
|
||||
graspnet_root = '/mnt/h/AI/Datasets/graspnet-1billion/test_seen' # ROOT PATH FOR GRASPNET
|
||||
####################################################################
|
||||
|
||||
from graspnetAPI import GraspNet
|
||||
|
||||
# initialize a GraspNet instance
|
||||
g = GraspNet(graspnet_root, camera='kinect', split='test_seen')
|
||||
|
||||
# show object grasps
|
||||
g.showObjGrasp(objIds = 0, show=True)
|
||||
|
||||
# show 6d poses
|
||||
g.show6DPose(sceneIds = 0, show = True)
|
||||
|
||||
# show scene rectangle grasps
|
||||
g.showSceneGrasp(sceneId = 0, camera = 'realsense', annId = 0, format = 'rect', numGrasp = 20)
|
||||
|
||||
# show scene 6d grasps(You may need to wait several minutes)
|
||||
g.showSceneGrasp(sceneId = 4, camera = 'kinect', annId = 2, format = '6d')
|
Reference in New Issue
Block a user