Skip to content

Commit

Permalink
Use rospkg instead of roslib in declared_nodelets
Browse files Browse the repository at this point in the history
Close #48
  • Loading branch information
wkentaro authored and mikaelarguedas committed Oct 18, 2016
1 parent 9e5bea9 commit 40490d3
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions nodelet/scripts/declared_nodelets
Expand Up @@ -34,21 +34,22 @@



import roslib
import rospkg
from xml.dom import minidom
import xml

nodelet_files = []

for p in roslib.rospack.rospack_depends_on_1('nodelet'):
rp = rospkg.RosPack()
for p in rp.get_depends_on('nodelet', implicit=False):
#print "Processing package %s to find declared nodelets"%p
manifest = roslib.manifest.load_manifest(p)
manifest = rp.get_manifest(p)
for e in manifest.exports:
try:
if e.__dict__['tag'] == 'nodelet':
plugin_file = e.get('plugin')
if plugin_file:
plugin_file = plugin_file.replace('${prefix}',roslib.packages.get_pkg_dir(p))
plugin_file = plugin_file.replace('${prefix}', rp.get_path(p))
nodelet_files.append(plugin_file)
except Exception, ex:
print ex
Expand Down

0 comments on commit 40490d3

Please sign in to comment.