PKU-EPIC / DexGraspNet

147 stars 17 forks source link

MIssing file visualize_data_table_top.py #3

Closed liuallen871219 closed 1 week ago

liuallen871219 commented 1 year ago

I want to show the table-top grasp. I follow the instruction to generate grasping pose but I can not find the file visualize_data_table_top.py Another question is Can I use the same file(validate_grasps.py) from the main branch to validate table-top grasp in issacsim ?

mzhmxzh commented 1 year ago

There seems to be a typo in file grasp_generation/README.md of branch table. The correct file name for table top data visualization should be visualize_result.py in grasp_generation/tests. Thank you for pointing this out. :)

Yes, validate_grasps.py from branch main could be used to validate table top results. In fact, a table top grasp is considered valid if it can resist external forces in 5 directions rather than 6 directions as in branch main. But we ignored this difference, so the two files are actually the same.

These updates can be found in the newest commits.

liuallen871219 commented 1 year ago

Thanks for your reply!! I have another problem that I want to generate tabletop mano hand grasp. Can you give me some advice that how to modify your implementation

Best regards

mzhmxzh commented 1 year ago

Four modifications are needed:

  1. Use grasp_generation/scripts/generate_object_pose.py from branch table to drop objects onto the table.
  2. Implement an initialization function to initialize MANO hands above the table plane, following grasp_generation/utils/initializations.py from branch table.
  3. Add an energy term to penalize any MANO vertex that penetrates the table plane. A possible choice could be $E{\text{tpen}} = \sum{p\in V(H)}\max (0, -p_z) $, where $V(H)$ represents the 778 MANO vertices in the table reference frame (so the z coordinate shows the height above the table). This can be achieved by implementing a cal_dis_plane method for class HandModel, and use this method to compute E_tpen in energy.py, as in branch table.
  4. Modify main.py to record E_pen.

We are writing a more detailed instruction in the README files of branches mano and table, and will also provide a complete implementation for table-top MANO grasp generation soon. You can try your own implementations for the MANO version of E_tpen, too. :)

mzhmxzh commented 1 year ago

We created a new branch mano-table. It contains a complete pipeline that can generate grasps for MANO on top of a table, and some pre-computed examples in data which can be visualized by running visualize_result.py.

We will update the README files soon.

liuallen871219 commented 1 year ago

I have another question. Is it also possible to validate the generated mano table-top grasp in Isaac?

wrc042 commented 1 year ago

We have not yet attempted validation of the Mano hand in Isaac, as its implementation would require significant modifications, since the Mano hand cannot be modeled as articulated rigid bodies as the ShadowHand. I may not be able to provide you much help. However, I would suggest exploring whether Isaac offers official tools that support Mano hand simulation or if you could import it as fixed rigid bodies. Be aware that the simulator may automatically operate convex decomposition. Best of luck with your project.