Skip to content

Commit

Permalink
add some --env and --penv checks, #38
Browse files Browse the repository at this point in the history
  • Loading branch information
jgvictores committed Oct 31, 2017
1 parent 7b5c9c1 commit 57d0164
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions yarpplugins/YarpOpenraveControlboard/DeviceDriverImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,18 @@

bool roboticslab::YarpOpenraveControlboard::open(yarp::os::Searchable& config) {

if ( ( ! config.check("env") ) && ( ! config.check("penv") ) )
{
CD_ERROR("Please use --env or --penv parameter. Bye!\n");
return false;
}

if ( ( config.check("env") ) && ( config.check("penv") ) )
{
CD_ERROR("Please do not use --env and --penv simultaneously. Bye!\n");
return false;
}

//CD_DEBUG("penv: %p\n",*((const OpenRAVE::EnvironmentBase**)(config.find("penv").asBlob())));
penv = *((OpenRAVE::EnvironmentBasePtr*)(config.find("penv").asBlob()));

Expand Down

0 comments on commit 57d0164

Please sign in to comment.