Open tswie opened 5 years ago
Thank you for your reporting. I get the same error as yours in ubuntu 18.04 / Melodic. I'm still investigating the cause of this error.
terminate called after throwing an instance of 'pluginlib::ClassLoaderException what(): Unable to find package: controller_interface`
The exception throws from pluginlib packages: https://github.com/ros/pluginlib/blob/54c925eebf8fd8db0c5e7e9ea18cba1d32402909/pluginlib/include/pluginlib/class_loader_imp.hpp#L85-L87
As you said, although rospack can find the controllerinterface, `ros::package::getPath(package)fails to find
package_("controller_interface") and then returns empty string. To be sure getPath() works correctly, I wrote the minimal test code like this;
string path = ros::package::getPath("controller_interface");`
It works and returns the correct package path...
Hello,
Just for clarification, is it just the returned path that is correct or does the robot itself actually respond when explicitly asking for the path? If the former, is there any update on a fix for the issue?
Hello,
Is there any update on this issue?
Hello guys,
I found the cause of this issue. The problem is caused by the tinyxml2 library that included in a denso_robot_core package. That library is not support 'xml-model' predeclare tag in a package.xml, so you can solve this problem with modified tinyxml2.c and tinyxml2.h as followings
diff --git a/denso_robot_core/include/denso_robot_core/tinyxml2.h
b/denso_robot_core/include/denso_robot_core/tinyxml2.h
index d932ff2..768685f 100644
--- a/denso_robot_core/include/denso_robot_core/tinyxml2.h
+++ b/denso_robot_core/include/denso_robot_core/tinyxml2.h
@@ -871,6 +871,7 @@ protected:
XMLDocument* _document;
XMLNode* _parent;
mutable StrPair _value;
+ int _parseLineNum;
XMLNode* _firstChild;
XMLNode* _lastChild;
diff --git a/denso_robot_core/src/tinyxml2.cpp b/denso_robot_core/src/tinyxml2.cpp
index ca98b64..82b4a4f 100644
--- a/denso_robot_core/src/tinyxml2.cpp
+++ b/denso_robot_core/src/tinyxml2.cpp
@@ -952,6 +952,8 @@ char* XMLNode::ParseDeep( char* p, StrPair* parentEnd )
break;
}
+ int initialLineNum = node->_parseLineNum;
+
StrPair endTag;
p = node->ParseDeep( p, &endTag );
if ( !p ) {
@@ -966,11 +968,31 @@ char* XMLNode::ParseDeep( char* p, StrPair* parentEnd )
if ( decl ) {
// A declaration can only be the first child of a document.
// Set error, if document already has children.
+#if 0
if ( !_document->NoChildren() ) {
_document->SetError( XML_ERROR_PARSING_DECLARATION, decl->Value(), 0);
DeleteNode( decl );
break;
}
+#else
+ // Declarations are only allowed at document level
+ bool wellLocated = ( ToDocument() != 0 );
+ if ( wellLocated ) {
+ // Multiple declarations are allowed but all declarations
+ // must occur before anything else
+ for ( const XMLNode* existingNode = _document->FirstChild(); existingNode; existingNode = existingNode->NextSibling() ) {
+ if ( !existingNode->ToDeclaration() ) {
+ wellLocated = false;
+ break;
+ }
+ }
+ }
+ if ( !wellLocated ) {
+ _document->SetError( XML_ERROR_PARSING_DECLARATION, 0, 0);
+ DeleteNode( node );
+ break;
+ }
+#endif
}
XMLElement* ele = node->ToElement();
@haraisao Thank you for teaching me so kindly. We will test it and update it. Thank you so much!
Hi I think I also got the same error with Cobotta. Did anyone solve this ??
I'm using
terminate called after throwing an instance of 'pluginlib::ClassLoaderException'
what(): Unable to find package: controller_interface
[cobotta/denso_robot_control-3] process has died [pid 856, exit code -6, cmd /home/catkin_ws/devel/lib/denso_robot_control/denso_robot_control __name:=denso_robot_control __log:=/root/.ros/log/372726a8-08ab-11eb-95f7-0242ac110002/cobotta-denso_robot_control-3.log].
log file: /root/.ros/log/372726a8-08ab-11eb-95f7-0242ac110002/cobotta-denso_robot_control-3*.log
@Shunichi09 Have you tried the modification that haraiso showed? https://github.com/DENSORobot/denso_robot_ros/issues/27#issuecomment-589495455
I have confirmed that this modify fix the error you posted. The official integrate to ROS melodic is in preparation. Sorry. Please wait for a while.
Thank you for the comments!! I tried the modification. First, it did not work but I rebooted everything including the cobotta. Then, it worked!! Thanks, again.
Hello,
I'm currently trying to control a VS6577 robot using this package on ROS Melodic. So far, I am capable of running my project in Gazebo and the robot responds to commands issued to it through RViz. Upon trying to run the project live, I get this issue each time:
After getting this issue the first time, the error message switches to:
At this point, I need to restart the robot controller in order to return to the first error message (controller_interface not found). I've tried uninstalling ros-melodic-controllers and ros_control and recompiling them as part of the project. ROS itself can find the controller_interface package; it is also listed as required in the package.xml and CMakeLists.txt. The project compiles as well, it just fails to run in non-simulation mode.
Is this a known Melodic issue? The project otherwise works in Melodic so far, and I would prefer to keep using our 18.04 setup if possible.