Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem about the python generate_grasp.py #5

Closed
sunhan1997 opened this issue May 11, 2022 · 13 comments
Closed

Problem about the python generate_grasp.py #5

sunhan1997 opened this issue May 11, 2022 · 13 comments

Comments

@sunhan1997
Copy link

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
Copy link
Owner

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

@sunhan1997
Copy link
Author

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
Copy link
Owner

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
Copy link
Author

this code can work

@wenbowen123
Copy link
Owner

Are you able to run the testing demo?

@sunhan1997
Copy link
Author

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

@wenbowen123
Copy link
Owner

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

@sunhan1997
Copy link
Author

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

@wenbowen123
Copy link
Owner

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

@lovesuiyue
Copy link

(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
Copy link

atyzy0 commented May 16, 2022

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

@wenbowen123
Copy link
Owner

@lovesuiyue
Did you run build.sh?
image

@wenbowen123
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants