blob: 60fbd7fee41b5a17d67f07c8d7f202fa6288792b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
Find package.xml in ros_packages/package_name too as we moved it here.
Index: pluginlib-1.11.1/include/pluginlib/class_loader_imp.h
===================================================================
--- pluginlib-1.11.1.orig/include/pluginlib/class_loader_imp.h
+++ pluginlib-1.11.1/include/pluginlib/class_loader_imp.h
@@ -510,12 +510,17 @@ ClassLoader<T>::getPackageFromPluginXMLF
std::string package_name;
boost::filesystem::path p(plugin_xml_file_path);
boost::filesystem::path parent = p.parent_path();
+ boost::filesystem::path basename = p.filename();
// Figure out exactly which package the passed XML file is exported by.
while (true) {
if (boost::filesystem::exists(parent / "package.xml")) {
std::string package_file_path = (boost::filesystem::path(parent / "package.xml")).string();
return extractPackageNameFromPackageXML(package_file_path);
+ } else if(boost::filesystem::exists(parent / "ros_packages" / basename / "package.xml"))
+ {
+ std::string package_file_path = (boost::filesystem::path(parent / "ros_packages" / basename / "package.xml")).string();
+ return(extractPackageNameFromPackageXML(package_file_path));
} else if (boost::filesystem::exists(parent / "manifest.xml")) {
#if BOOST_FILESYSTEM_VERSION >= 3
std::string package = parent.filename().string();
@@ -532,6 +537,7 @@ ClassLoader<T>::getPackageFromPluginXMLF
}
// Recursive case - hop one folder up
+ basename = parent.filename();
parent = parent.parent_path().string();
// Base case - reached root and cannot find what we're looking for
|