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

Found one bug: Load grasps failed #165

Open
zhangcogito opened this issue Dec 4, 2019 · 0 comments
Open

Found one bug: Load grasps failed #165

zhangcogito opened this issue Dec 4, 2019 · 0 comments

Comments

@zhangcogito
Copy link

I build and install graspit form here https://github.com/jvarley/graspit/wiki/CGDB-Integration to use cgdb. I import the HumanHand16DOF. But when I load grasps for this hand, it failed.
Finaly I fixed the bug. Here is my solution.

1.Go to about line 231 int graspit/src/DBase/DBPlanner/sql_databse_manager.cpp
2.Find this statement
if (!database_.Query("SELECT * FROM get_grasps('" + model.ModelName() + "','" + hand_name + "');", &results)) ;
3.The reason is that the hand_name="Human", but in the cgdb hand_name="HUMAN". So transform the hand_name to upper case. Then it works. Here is how I transform the hand_name using transform() function in STL.
image

Remember you should include the header file:
#include <algorithm>
4. Finaly, I load grasps succesfully.

image

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

1 participant