wenbowen123 / catgrasp

[ICRA 2022] CaTGrasp: Learning Category-Level Task-Relevant Grasping in Clutter from Simulation
Apache License 2.0
298 stars 82 forks source link

Problem about the python generate_grasp.py #5

Closed sunhan1997 closed 2 years ago

sunhan1997 commented 2 years ago

hello,thank you for your work. I clone your code and run the python generate_grasp.py --class_name nut --debug 0,but there is a bug. Screenshot from 2022-05-11 21-15-43 Did you met this problem and how can i fix it.

wenbowen123 commented 2 years ago

Hi, I didn't meet this before. Does it happen every time if you destroy the docker container and restart?

sunhan1997 commented 2 years ago

yes,it happens every time. My docker is 5.19.03 and the code is built successfully in the docker. I use the pycharm to debug the generate_grasp.py. and find this bug happen when run the from dexnet.grasping.gripper import RobotGripper. Then I run the gripper.py in dexnet.grasping, and when run the from meshpy.sdf_file import SdfFile, this bug happen again. Screenshot from 2022-05-12 09-44-31

wenbowen123 commented 2 years ago

what if you create a new test file, e.g. test.py and put these lines and then run?

import open3d as o3d
import os, sys, time,torch,pickle,trimesh,yaml
from scipy.spatial import ConvexHull
from uuid import uuid4
import cv2
from PIL import Image, ImageDraw
import numpy as np
import multiprocessing as mp
import math,glob,re,copy
sunhan1997 commented 2 years ago

this code can work

wenbowen123 commented 2 years ago

Are you able to run the testing demo?

sunhan1997 commented 2 years ago

yes, the testing demo can run, but the bug is not fixed

wenbowen123 commented 2 years ago

Can you run git pull -X theirs and then run generate_grasp.py?

sunhan1997 commented 2 years ago

it still does not work. I will try to delete this docker image and run docker pull wenbowen123/catgrasp:latest again

wenbowen123 commented 2 years ago

also make sure your gripper.py is now the same as the online file in this repo.

lovesuiyue commented 2 years ago

(catgrasp) root@zyb-pc:/home/catgrasp# python3 run_grasp_simulation.py pybullet build time: Dec 1 2021 18:33:04 Traceback (most recent call last): File "run_grasp_simulation.py", line 30, in from predicter import * File "/home/catgrasp/predicter.py", line 21, in import PointGroup.data.dataset_seg as dataset_seg File "/home/catgrasp/PointGroup/data/dataset_seg.py", line 19, in from lib.pointgroup_ops.functions import pointgroup_ops File "/home/catgrasp/PointGroup/data/../lib/pointgroup_ops/functions/pointgroup_ops.py", line 8, in import PG_OP ModuleNotFoundError: No module named 'PG_OP'

atyzy0 commented 2 years ago

我遇到过这个问题,应该是pytorch 与 open3d import 的顺序问题,我在gripper.py里将import torch 移到import SdfFile后面,解决了,因为SdfFile需要import sdf<--import open3d

wenbowen123 commented 2 years ago

@lovesuiyue Did you run build.sh? image

wenbowen123 commented 2 years ago

The topic issue has been resolved. For other topics, please open a separate issue.