SHARE
TWEET

Untitled

a guest Oct 21st, 2019 77 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. from rospkg import RosPack
  2.  
  3. # Create Ros Pack instace
  4. rp = RosPack()
  5.  
  6. pluginlib_deb = rp.get_depends_on('pluginlib')
  7. navcore_deb = rp.get_depends_on('nav_core')
  8.  
  9.  
  10. plugin_nav_core = list(set(pluginlib_deb).intersection(navcore_deb))
  11. print plugin_nav_core
  12. result_bgp = []
  13. result_blp = []
  14. for item in plugin_nav_core:
  15.     package_man = rp.get_manifest(item)
  16.     exports = package_man.exports
  17.     for exp in exports:
  18.         attribute = exp.attrs
  19.         if attribute.has_key('plugin'):    
  20.             plugin = attribute['plugin']
  21.             print plugin   
  22.             if plugin.find("bgp_plugin") != -1:
  23.                 print plugin + "goes to BGP"               
  24.                 result_bgp.append(item)
  25.  
  26.             if plugin.find("blp_plugin") != -1:
  27.                 print plugin + "goes to BLP"   
  28.                 result_blp.append(item)
  29.  
  30. print "Base Local Planners : "
  31. print result_blp
  32. print "Base Global Planners : "
  33. print result_bgp
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top