[ros-users] rospkg API review (REP 114)

Dirk Thomas mail at dirk-thomas.net
Tue Oct 4 12:48:53 UTC 2011


Hi Ken,

we are using rospkg for ROS GUI.

There was only one thing which was inconvenient to use.
We had to manually replace "${prefix}" from the plugin-attribute of an export tag.
See the following code snippet:

     plugins = []
     r = rospkg.RosPack()
     for package_name in r.list():
         manifest = r.get_manifest(package_name)
         package_path = r.get_path(package_name)
         exports = manifest.get_export(self.export_tag_, 'plugin')
         for export in exports:
             xml_file_name = str(export)
=>          xml_file_name = xml_file_name.replace('${prefix}', package_path)
             plugins.append([package_name, xml_file_name])

Would it be possible to hide this from the user and perform the replacement transparently (if desired in all cases)?

A minor cosmetic issue is the printing of "READ_CACHE manifest.xml" in rospkg/rospack.py:188.
I guest this output will be removed in the next release?

Dirk



More information about the ros-users mailing list