0
$\begingroup$

Rosanswers logo

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.

This code block was moved to the following github gist: https://gist.github.com/answers-se-migration-openrobotics/f053dea359c6a74f5bcaf9d4cf01b265

The output of PYTHONPATH is empty. The python library in use is:

['', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-aarch64-linux-gnu', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages']

I follow ros2-for-arm cross-compilation instructions to build ROS2. The host X86 PC is Ubuntu 16.04 x86_64.

The arm64 platform is a Hikey960 board with Ubuntu 16.04 aarch64 version.

Originally posted by davidhuziji on ROS Answers with karma: 16 on 2018-04-09

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Hi,

I download the latest code and force ROS2 to use Python3 on arm platform. Although there are still errors dumped, the demo can run. Thanks.


Originally posted by davidhuziji with karma: 16 on 2018-04-20

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.