BerkeleyAutomation / dex-net

Repository for reading the Dex-Net 2.0 HDF5 database of 3D objects, parallel-jaw grasps, and robust grasp metrics
https://berkeleyautomation.github.io/dex-net/code.html
Other
296 stars 97 forks source link

KeyError: "Can't open attribute (Can't locate attribute: 'num_stable_poses')" #40

Open amritkochar opened 5 years ago

amritkochar commented 5 years ago

I added 3 new objects using the CLI to the existing example.hdf5 database and it was smooth. But when I executed generate_gqcnn_dataset.py I found out that 0 stable poses were generated for these 3 objects. I cannot understand the reason for the same.

Please help me out with this, thank you!

Here is the entire error message from the terminal.

Traceback (most recent call last): File "tools/generate_gqcnn_dataset.py", line 579, in config) File "tools/generate_gqcnn_dataset.py", line 343, in generate_gqcnn_dataset stable_poses = dataset.stable_poses(obj.key) File "/home/loccioni/DexNet/src/dexnet/database/database.py", line 1072, in stable_poses stps = Hdf5ObjectFactory.stable_poses(self.stable_pose_data(key)) File "/home/loccioni/DexNet/src/dexnet/database/hdf5_factory.py", line 66, in stable_poses num_stable_poses = data.attrs[NUM_STP_KEY] File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper (/tmp/pip-4rPeHA-build/h5py/_objects.c:2684) File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper (/tmp/pip-4rPeHA-build/h5py/_objects.c:2642) File "/usr/local/lib/python2.7/dist-packages/h5py/_hl/attrs.py", line 58, in getitem attr = h5a.open(self._id, self._e(name)) File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper (/tmp/pip-4rPeHA-build/h5py/_objects.c:2684) File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper (/tmp/pip-4rPeHA-build/h5py/_objects.c:2642) File "h5py/h5a.pyx", line 77, in h5py.h5a.open (/tmp/pip-4rPeHA-build/h5py/h5a.c:2172)

Thank you.

jeffmahler commented 5 years ago

@amrit-007 What are the objects? Spherical objects could cause this, or there may be a problem with the meshes.

amritkochar commented 5 years ago

Hello @jeffmahler, they are not spherical. I am attaching the .OBJ files with this comment for your perusal.

Objects.zip

amritkochar commented 5 years ago

Hello team,

Could you please help me with this error, because I have tried every thing from my end.

When, I use Dexnet as a service on http://automation.berkeley.edu/dex-net/#, with these objects there are grasps which get generated. Is there any way I can download the .json from here and add them to the database.

Please help!

jeffmahler commented 5 years ago

@amrit-007 Apologies for the delay. Your OBJ files look good to me.

@Binaryhalibut Is there a tool for importing grasps from DNaaS into a Dex-Net database?

01halibut commented 5 years ago

No, there isn't a tool for importing DNaaS grasps into a Dex-Net database at the moment.

On Fri, Jun 21, 2019, 8:39 AM Jeffrey Mahler notifications@github.com wrote:

@amrit-007 https://github.com/amrit-007 Apologies for the delay. Your OBJ files look good to me.

@Binaryhalibut https://github.com/Binaryhalibut Is there a tool for importing grasps from DNaaS into a Dex-Net database?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/BerkeleyAutomation/dex-net/issues/40?email_source=notifications&email_token=AAKNRRUFZMYGPMHYFOOYAQDP3TYZVA5CNFSM4HPMXBGKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYI2AWY#issuecomment-504471643, or mute the thread https://github.com/notifications/unsubscribe-auth/AAKNRRTIRTKFLJ6N4Q7QS6TP3TYZVANCNFSM4HPMXBGA .

amritkochar commented 5 years ago

Hi @Binaryhalibut,

Is there any way (any workaround) to add my objects to an existing .hdf5 database if adding it via dexnet_cli.py is not generating any stable poses but DNaaS does compute stable poses?

mariabauza commented 4 years ago

Hi @amrit-007 , We had the same problem and the solution was to save the stl files in meters. Originally they where in millimeters and no stable poses were found unless the min_prob was set really low.

Hope it helps!

elevenjiang1 commented 2 years ago

I also have this problem by self make database. Even the object are from their shapes. Hoping to provide the origin parameters of generate database and generate gqcnn @jeffmahler

Best