Ask Your Question
1

Run Graspit! with plugin

asked 2012-11-12 07:41:11 -0500

shuai gravatar image

Hi all,

I am trying to use Graspit! in ros. But I couldn't launch Graspit! with plugins. I have tried rosrun graspit graspit plugin: and it didn't work. Does anyone have experience with running Graspit! with plugins? Thank you very very much!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2013-01-10 08:20:08 -0500

m.anderson gravatar image

Hey,

I couldn't get this working either. I looked through the source and it seems that there is a bug in the graspitGUI.cpp code for loading plugins on the command line. The problem is here starting at line 155 in graspitGUI.cpp:

//look for plugins of the form plugin:name in the arguments
for (int i=1; i<argc; i++) {
QString arg(argv[i]);
if (arg.section(',',0,0)=="plugin") {
  QString libName = arg.section(',',1,1);
  std::cout << "Processing arguments \n ";
  PluginCreator* creator = PluginCreator::loadFromLibrary(libName.toStdString());     
  if (creator) {
    mPluginCreators.push_back(creator);
  } else {
    DBGA("Failed to load plugin: " << libName.latin1());
  }
}

This shows that "if (arg.section(',',0,0)=="plugin")" and "QString libName = arg.section(',',1,1);" are actually looking for an argument of the form "plugin,name" versus "plugin:name"

So, just change your argument to "plugin,name" to get it to run for now I guess... Or, recompile with the commas replaced with colons.

-Michael

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2012-11-12 07:41:11 -0500

Seen: 314 times

Last updated: Jan 10 '13