ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

What is the correct way of installing ROS2-Foxy on a Raspberry Pi Zero?

asked 2021-07-15 08:49:33 -0600

marshallpt gravatar image

updated 2021-07-26 12:55:30 -0600

We are looking to deploy ros2-foxy on some Raspberry Pi Zeros, which have the latest version of Raspberry Pi OS Lite installed, and from what I can tell on REP 2000 we should be supported at the Tier 3 level, however, when following the ROS2-foxy install guide I get stuck on the building stage, with an error for the mimick-vendor package.

pi@rsu-01:~/ros2_foxy $ colcon build --packages-select mimick_vendor
Starting >>> mimick_vendor
[Processing: mimick_vendor]                                 
--- stderr: mimick_vendor                                    
Cloning into 'mimick-4c742d61d4f47a58492c1afbd825fad1c9e05a09'...
HEAD is now at 4c742d6 Initial support for Apple M1 (#17)
CMake Error at CMakeLists.txt:88 (message):
  Architecture 'armv6l' is not supported.


make[2]: *** [CMakeFiles/mimick-4c742d61d4f47a58492c1afbd825fad1c9e05a09.dir/build.make:108: mimick-4c742d61d4f47a58492c1afbd825fad1c9e05a09-prefix/src/mimick-4c742d61d4f47a58492c1afbd825fad1c9e05a09-stamp/mimick-4c742d61d4f47a58492c1afbd825fad1c9e05a09-configure] Error 1
make[1]: *** [CMakeFiles/Makefile2:132: CMakeFiles/mimick-4c742d61d4f47a58492c1afbd825fad1c9e05a09.dir/all] Error 2
make: *** [Makefile:141: all] Error 2
---
Failed   <<< mimick_vendor [49.5s, exited with code 2]

Summary: 0 packages finished [1min 21s]
  1 package failed: mimick_vendor
  1 package had stderr output: mimick_vendor

I tried the fix in this blog post, but I didn't even have a build/mimick_vendor/mimick-ext-prefix/ directory. I do have, as can be seen in that above output, a build//mimick_vendor/mimick-4c742d61d4f47a58492c1afbd825fad1c9e05a09-prefix directory, so I tried the instructions with that, but no dice. For grins, I went through the entire mimick_vendor directory and ran the command in that blog post for every single CMakeLists.txt file, but that didn't help either.

It's worth pointing out that before compiling from source I ran across this post and tried the cross-compilation instructions provided in the most recent response, but despite the fact that I attempted it twice, I got a weird, only partialing-working install both times, with an output that looked like this when I ran the ros2 command after sourcing local_setup.bash:

pi@rsu-01:~/ros2-cross $ ros2
Failed to load entry point 'test': No module named 'lark'
usage: ros2 [-h] Call `ros2 <command> -h` for more detailed usage. ...

ros2 is an extensible command-line tool for ROS 2.

optional arguments:
  -h, --help            show this help message and exit

Commands:
  daemon  Various daemon related sub-commands
  topic   Various topic related sub-commands

  Call `ros2 <command> -h` for more detailed usage.

Any help would be much appreciated, and I can provide more details if necessary!

EDIT: So, it turns out that cross-compilation tutorial should work, I just somehow entirely missed the fact that when I was running cross-colcon-build --packages-up-to ros2topic I was only compiling the topic portion of ROS2, which is why I was getting what I thought was "weird, only partialing-working" output both times.

I tried cross-compiling again, but my workstation was missing some dependency, and being on a managed machine I didn't want to deal with it and went back to just trying to compile on the Pi Zero itself. I got past the compilation error I wrote about above by doing what this PR did, but, at the time of updating this post, has not been approved / merged yet. Changing that one line was enough to get it to compile.

Unfortunately, the ... (more)

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2021-07-15 09:18:51 -0600

lukicdarkoo gravatar image

You are doing well with the second approach. The tutorial is written so it doesn't install unnecessary packages (it takes memory, time, and transfer is longer).

If you want to work with e.g. services then simply run:

cross-colcon-build --packages-up-to ros2service

Similar for other packages.

edit flag offensive delete link more

Comments

Wow, I don't know how I missed the fact that I was only compiling ros2 topic... that would explain why that was the only thing showing up.

marshallpt gravatar image marshallpt  ( 2021-07-26 12:47:41 -0600 )edit

Question Tools

3 followers

Stats

Asked: 2021-07-15 08:49:33 -0600

Seen: 733 times

Last updated: Jul 26 '21