Created
October 2, 2019 19:14
-
-
Save Tutorgaming/a81b4100391c39f45c6fff8442f62353 to your computer and use it in GitHub Desktop.
Playing with ROSPKG
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from rospkg import RosPack | |
# Create Ros Pack instace | |
rp = RosPack() | |
pluginlib_deb = rp.get_depends_on('pluginlib') | |
navcore_deb = rp.get_depends_on('nav_core') | |
plugin_nav_core = list(set(pluginlib_deb).intersection(navcore_deb)) | |
print plugin_nav_core | |
result_bgp = [] | |
result_blp = [] | |
for item in plugin_nav_core: | |
package_man = rp.get_manifest(item) | |
exports = package_man.exports | |
for exp in exports: | |
attribute = exp.attrs | |
if attribute.has_key('plugin'): | |
plugin = attribute['plugin'] | |
print plugin | |
if plugin.find("bgp_plugin") != -1: | |
print plugin + "goes to BGP" | |
result_bgp.append(item) | |
if plugin.find("blp_plugin") != -1: | |
print plugin + "goes to BLP" | |
result_blp.append(item) | |
print "Base Local Planners : " | |
print result_blp | |
print "Base Global Planners : " | |
print result_bgp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment