Skip to content
Snippets Groups Projects
Commit 0327cab6 authored by Christoph Pohl's avatar Christoph Pohl Committed by ARMAR-DE
Browse files

Add warnings and ice deprecations notices for loadLibFromPath and Package

parent b9ddf306
No related branches found
No related tags found
No related merge requests found
...@@ -95,8 +95,11 @@ namespace armarx::RobotUnitModule ...@@ -95,8 +95,11 @@ namespace armarx::RobotUnitModule
std::stringstream ss; std::stringstream ss;
ss << "Requested controller class '" << className ss << "Requested controller class '" << className
<< "' unknown! Known classes:" << NJointControllerRegistry::getKeys() << "' unknown! Known classes:" << NJointControllerRegistry::getKeys()
<< " (If this class exists in a different lib then load it via " << " (If this class exists in a different lib then load it in the property "
"loadLibFromPath(path) or loadLibFromPackage(package, lib))"; "definitions of the RT-unit. DO NOT load it via "
"loadLibFromPath(path) or loadLibFromPackage(package, lib)) (see "
"https://git.h2t.iar.kit.edu/sw/armarx-integration/robots/armar7/documentation/-/"
"issues/85)";
ARMARX_ERROR << ss.str(); ARMARX_ERROR << ss.str();
throw InvalidArgumentException{ss.str()}; throw InvalidArgumentException{ss.str()};
} }
...@@ -303,6 +306,9 @@ namespace armarx::RobotUnitModule ...@@ -303,6 +306,9 @@ namespace armarx::RobotUnitModule
ControllerManagement::loadLibFromPath(const std::string& path, const Ice::Current&) ControllerManagement::loadLibFromPath(const std::string& path, const Ice::Current&)
{ {
throwIfInControlThread(BOOST_CURRENT_FUNCTION); throwIfInControlThread(BOOST_CURRENT_FUNCTION);
ARMARX_WARNING << "Do not use this function as it has implications on the RT thread (see "
"https://git.h2t.iar.kit.edu/sw/armarx-integration/robots/armar7/"
"documentation/-/issues/85)";
const bool result = getArmarXManager()->loadLibFromPath(path); const bool result = getArmarXManager()->loadLibFromPath(path);
ARMARX_INFO << "loadLibFromPath('" << path << "') -> " << result; ARMARX_INFO << "loadLibFromPath('" << path << "') -> " << result;
return result; return result;
...@@ -314,6 +320,9 @@ namespace armarx::RobotUnitModule ...@@ -314,6 +320,9 @@ namespace armarx::RobotUnitModule
const Ice::Current&) const Ice::Current&)
{ {
throwIfInControlThread(BOOST_CURRENT_FUNCTION); throwIfInControlThread(BOOST_CURRENT_FUNCTION);
ARMARX_WARNING << "Do not use this function as it has implications on the RT thread (see "
"https://git.h2t.iar.kit.edu/sw/armarx-integration/robots/armar7/"
"documentation/-/issues/85)";
const bool result = getArmarXManager()->loadLibFromPackage(package, lib); const bool result = getArmarXManager()->loadLibFromPackage(package, lib);
ARMARX_INFO << "loadLibFromPackage('" << package << "', '" << lib << "') -> " << result; ARMARX_INFO << "loadLibFromPackage('" << package << "', '" << lib << "') -> " << result;
return result; return result;
......
...@@ -284,7 +284,9 @@ module armarx ...@@ -284,7 +284,9 @@ module armarx
void deactivateAndDeleteNJointControllers(Ice::StringSeq controllerInstanceNames)throws InvalidArgumentException, LogicError; void deactivateAndDeleteNJointControllers(Ice::StringSeq controllerInstanceNames)throws InvalidArgumentException, LogicError;
//loading libs //loading libs
["deprecate:loadLibFromPath(string path) has dangerous implications on the RT thread. Use the scenario config instead to load additional libraries. See https://git.h2t.iar.kit.edu/sw/armarx-integration/robots/armar7/documentation/-/issues/85"]
bool loadLibFromPath(string path); bool loadLibFromPath(string path);
["deprecate:loadLibFromPackage(string package, string libname) has dangerous implications on the RT thread. Use the scenario config instead to load additional libraries. See https://git.h2t.iar.kit.edu/sw/armarx-integration/robots/armar7/documentation/-/issues/85"]
bool loadLibFromPackage(string package, string libname); bool loadLibFromPackage(string package, string libname);
}; };
interface RobotUnitSelfCollisionCheckerInterface interface RobotUnitSelfCollisionCheckerInterface
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment