Skip to content

Commit

Permalink
enable prefix option
Browse files Browse the repository at this point in the history
  • Loading branch information
jgvictores committed Dec 3, 2017
1 parent c8db78c commit 3c45449
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/openrave-YarpPluginLoader.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
env.Load('/usr/local/share/teo-openrave-models/contexts/openrave/teo/teo.robot.xml')

OpenraveYarpPluginLoader = RaveCreateModule(env,'OpenraveYarpPluginLoader')
print OpenraveYarpPluginLoader.SendCommand('open --device controlboardwrapper2 --subdevice YarpOpenraveControlboard --robotIndex 0 --manipulatorIndex 0')
print OpenraveYarpPluginLoader.SendCommand('open --device controlboardwrapper2 --subdevice YarpOpenraveControlboard --robotIndex 0 --manipulatorIndex 0 --prefix /drl')

while 1:
pass
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,14 @@ class OpenraveYarpPluginLoader : public OpenRAVE::ModuleBase
//-- If robotIndex (and then if manipulatorIndex), get and put name
if( options.check("robotIndex") )
{
std::string name("/");
std::string name;

if( options.check("prefix") )
{
name += options.find("prefix").asString();
}

name += "/";
int robotPtrIdx = options.find("robotIndex").asInt();

std::vector<OpenRAVE::RobotBasePtr> vectorOfRobotPtr;
Expand Down

0 comments on commit 3c45449

Please sign in to comment.