Ask Your Question

davidhuziji's profile - activity

2019-05-20 00:59:47 -0500 marked best answer How to execute local_setup.bash generated in cross-compilation environment?

Hi,

I'd like to know how to setup ROS2 environment on arm platforms. I thought simply executing local_setup.bash can get all the things ready. But it doesn't work.

I build up ROS2 in cross-compilation environment on X86 PC. After the building completes, I just copy the install directory to an arm64 platform. I create the same directory on arm platform as that on X86 PC. I execute local_setup.bash on arm but the ROS2 binary cannot be found. Besides, It seems that some modules are neither found. For example, I get an error show as below when I run ROS2 command.

Traceback (most recent call last):  
   File "./ros2", line 5, in <module>
      from pkg_resources import load_entry_point
   File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2927, in <module>
      @_call_aside
   File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2913, in _call_aside
       f(*args, **kwargs)
   File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2940, in _initialize_master_working_set
       working_set = WorkingSet._build_master()
   File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 635, in _build_master
      ws.require(__requires__)
   File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 943, in require
      needed = self.resolve(parse_requirements(requirements))
   File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 829, in resolve
      raise DistributionNotFound(req, requirers)
  pkg_resources.DistributionNotFound: The 'ros2cli==0.4.0' distribution was not found and is required by the application

Could you please tell me how to adjust local_setup.bash on arm platform so I can execute it as on X86 PC?

Updates:

After set AMENT_TRACE_SETUP_FILES, the output of local_setup.bash is showed as below.

. "<my_path>/install/local_setup.sh"
. "<my_path>/install/share/ament_clang_format/local_setup.bash"
. "<my_path>/install/share/ament_clang_format/local_setup.sh"
. "<my_path>/install/share/ament_clang_format/environment/ament_prefix_path.sh"
. "<my_path>/install/share/ament_clang_format/environment/path.sh"
. "<my_path>/install/share/ament_clang_format/environment/pythonpath.sh"
. "<my_path>/install/share/ament_copyright/local_setup.bash"
. "<my_path>/install/share/ament_copyright/local_setup.sh"
. "<my_path>/install/share/ament_copyright/environment/ament_prefix_path.sh"
. "<my_path>/install/share/ament_copyright/environment/path.sh"
. "<my_path>/install/share/ament_copyright/environment/pythonpath.sh"
. "<my_path>/install/share/ament_cppcheck/local_setup.bash"
. "<my_path>/install/share/ament_cppcheck/local_setup.sh"
. "<my_path>/install/share/ament_cppcheck/environment/ament_prefix_path.sh"
. "<my_path>/install/share/ament_cppcheck/environment/path.sh"
. "<my_path>/install/share/ament_cppcheck/environment/pythonpath.sh"
. "<my_path>/install/share/ament_cpplint/local_setup.bash"
. "<my_path>/install/share/ament_cpplint/local_setup.sh"
. "<my_path>/install/share/ament_cpplint/environment/ament_prefix_path.sh"
. "<my_path>/install/share/ament_cpplint/environment/path.sh"
. "<my_path>/install/share/ament_cpplint/environment/pythonpath.sh"
. "<my_path>/install/share/ament_flake8/local_setup.bash"
. "<my_path>/install/share/ament_flake8/local_setup.sh"
. "<my_path>/install/share/ament_flake8/environment/ament_prefix_path.sh"
. "<my_path>/install/share/ament_flake8/environment/path.sh"
. "<my_path>/install/share/ament_flake8/environment/pythonpath.sh"
. "<my_path>/install/share/ament_index_python/local_setup.bash"
. "<my_path>/install/share/ament_index_python/local_setup.sh"
. "<my_path>/install/share/ament_index_python/environment/ament_prefix_path.sh"
. "<my_path>/install/share/ament_index_python/environment/path.sh"
. "<my_path>/install/share/ament_index_python/environment/pythonpath.sh"
. "<my_path>/install/share/ament_lint_cmake/local_setup.bash"
. "<my_path>/install/share/ament_lint_cmake/local_setup.sh"
. "<my_path>/install/share/ament_lint_cmake/environment/ament_prefix_path.sh"
. "<my_path>/install/share/ament_lint_cmake/environment/path.sh"
. "<my_path>/install/share/ament_lint_cmake/environment/pythonpath.sh"
. "<my_path>/install/share ...
(more)
2018-12-19 05:07:08 -0500 received badge  Taxonomist
2018-11-01 08:20:27 -0500 received badge  Famous Question (source)
2018-04-22 21:13:46 -0500 received badge  Notable Question (source)
2018-04-20 00:49:44 -0500 answered a question How to execute local_setup.bash generated in cross-compilation environment?

Hi, I download the latest code and force ROS2 to use Python3 on arm platform. Although there are still errors dumped, t

2018-04-10 00:04:28 -0500 received badge  Popular Question (source)
2018-04-09 22:00:33 -0500 commented question How to execute local_setup.bash generated in cross-compilation environment?

Hi marguedas, thanks for your reply. Could you please see my updates? I append them to the question. I create the same

2018-04-09 21:59:10 -0500 edited question How to execute local_setup.bash generated in cross-compilation environment?

How to execute local_setup.bash generated in cross-compilation environment? Hi, I'd like to know how to setup ROS2 envi

2018-04-09 21:59:10 -0500 received badge  Editor (source)
2018-04-09 21:58:17 -0500 edited question How to execute local_setup.bash generated in cross-compilation environment?

How to execute local_setup.bash generated in cross-compilation environment? Hi, I'd like to know how to setup ROS2 envi

2018-04-09 05:00:39 -0500 asked a question How to execute local_setup.bash generated in cross-compilation environment?

How to execute local_setup.bash generated in cross-compilation environment? Hi, I'd like to know how to setup ROS2 envi