Closed droter closed 5 years ago
HAROS was not made with ROS2 in mind. If there are any file structure changes, such as missing CMake files, it will not work.
I will look into the first two errors, though, to see if there is some quick fix for them.
https://github.com/ros2/rmw_implementation.git File "/usr/local/lib/python2.7/dist-packages/haros/cmake_parser.py", line 530, in _process_link_libraries assert len(args) >= 2 AssertionError
I have just released a fix for this issue. I could not reproduce the other one, so I would need more information.
If you can, run with debug enabled (haros --debug ...
) and paste the log.txt
found in ~/.haros
.
Hi Andre,
Here are the results for this package: https://github.com/ros2/orocos_kinematics_dynamics.git
Terminal output:
[HAROS] Reading project and indexing source code...
Traceback (most recent call last):
File "/usr/local/bin/haros", line 11, in <module>
sys.exit(main())
File "/usr/local/lib/python2.7/dist-packages/haros/haros.py", line 725, in main
if launcher.launch(argv = argv):
File "/usr/local/lib/python2.7/dist-packages/haros/haros.py", line 150, in launch
return args.command(args, settings)
File "/usr/local/lib/python2.7/dist-packages/haros/haros.py", line 184, in command_analyse
return analyse.run()
File "/usr/local/lib/python2.7/dist-packages/haros/haros.py", line 497, in run
configs, env = self._extract_metamodel(node_cache)
File "/usr/local/lib/python2.7/dist-packages/haros/haros.py", line 518, in _extract_metamodel
extractor.index_source(settings = self.settings)
File "/usr/local/lib/python2.7/dist-packages/haros/extractor.py", line 103, in index_source
self._find_nodes(settings)
File "/usr/local/lib/python2.7/dist-packages/haros/extractor.py", line 229, in _find_nodes
extractor.find_nodes(pkg)
File "/usr/local/lib/python2.7/dist-packages/haros/extractor.py", line 689, in find_nodes
parser.parse(os.path.join(self.package.path, "CMakeLists.txt"))
File "/usr/local/lib/python2.7/dist-packages/haros/cmake_parser.py", line 406, in parse
self._analyse_command(command, args)
File "/usr/local/lib/python2.7/dist-packages/haros/cmake_parser.py", line 435, in _analyse_command
args = [self._argument(arg) for arg in args]
File "/usr/local/lib/python2.7/dist-packages/haros/cmake_parser.py", line 778, in _argument
return arg.replace('"', "")
AttributeError: 'list' object has no attribute 'replace'
I was able to fix the initial error, but now another error comes up in one of the secondary CMake files.
I cannot quick fix this one; the parser has to change significantly. Since the current implementation is outdated and other users also had issues with it, I will prioritise changing the CMake parser more in future tasks.
I was running HAROS against the latest release and there are a few errors on the packages: https://raw.githubusercontent.com/ros2/rosdistro/ros2/crystal/distribution.yaml
https://github.com/ros2/rmw_implementation.git File "/usr/local/lib/python2.7/dist-packages/haros/cmake_parser.py", line 530, in _process_link_libraries assert len(args) >= 2 AssertionError
https://github.com/ros2/orocos_kinematics_dynamics.git AttributeError: 'list' object has no attribute 'replace'
Some of the ROS2 meta packages don't contain a CMakeList.txt so they all fail. https://github.com/ros2/ros2cli.git IOError: [Errno 2] No such file or directory: '/home/matt/haros/ros/test_dir/ros2cli/CMakeLists.txt
Will ROS2 tests be different?
Thanks,
Matt