3 from .cmake_parser
import parse_file
4 from .launch
import Launch
5 from .package_structure
import get_package_structure
6 from .package_xml
import PackageXML
7 from .plugin_xml
import PluginXML
8 from .ros_generator
import ROSGenerator
9 from .setup_py
import SetupPy
10 from .source_code
import SourceCode
11 from .urdf
import UrdfFile
18 self.
name = self.manifest.name
23 self.source_code.setup_tags(self.
cmake)
28 for rel_fn, file_path
in package_structure[
'launch'].items():
29 self.launches.append(Launch(rel_fn, file_path))
30 for rel_fn, file_path
in package_structure[
'plugin_config'].items():
31 self.plugin_configs.append(PluginXML(rel_fn, file_path))
32 for rel_fn, file_path
in package_structure[
'urdf'].items():
33 self.urdf_files.append(UrdfFile(rel_fn, file_path))
36 if 'setup.py' in package_structure[
'key']:
37 self.
setup_py = SetupPy(self.
name, package_structure[
'key'][
'setup.py'])
39 for rel_fn, path
in package_structure[
'generators'].items():
40 gen = ROSGenerator(rel_fn, path)
44 for rel_fn, path
in package_structure[
'urdf'].items():
45 self.urdf_files.append(UrdfFile(rel_fn, path))
49 return self.manifest.is_metapackage()
or self.cmake.is_metapackage()
52 return self.source_code.get_build_dependencies()
59 packages.update(launch.get_dependencies())
62 packages.update(urdf.get_dependencies())
64 if self.
name in packages:
65 packages.remove(self.
name)
70 packages.update(self.source_code.get_test_dependencies())
74 packages.add(
'rostest')
75 packages.update(launch.get_dependencies())
76 if self.
name in packages:
77 packages.remove(self.
name)
81 for gens
in self.generators.values():
88 packages.update(gen.dependencies)
100 for src
in self.source_code.sources.values():
104 s =
'== {} ========\n'.format(self.
name)
105 s +=
' package.xml\n' 106 s +=
' CMakeLists.txt\n' 110 'launch':
'\n'.join(map(str, self.
launches)),
112 'plugin configs':
'\n'.join([cfg.rel_fn
for cfg
in self.
plugin_configs]),
113 'urdf models':
'\n'.join(map(str, self.
urdf_files)),
117 components[ext] =
'\n'.join(map(str, self.
generators[ext]))
118 for name, c_str
in sorted(components.items()):
121 s +=
' {}\n'.format(name)
122 for line
in c_str.split(
'\n'):
123 s +=
' ' + line +
'\n'
def get_dependencies_from_msgs(self)
def get_run_dependencies(self)
def get_test_dependencies(self)
def get_package_structure(pkg_root)
def get_all_generators(self)
def get_build_dependencies(self)