Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ros2 for arm32/v7 (raspi 3) #722

Closed
elgarbe opened this issue Feb 29, 2024 · 7 comments
Closed

ros2 for arm32/v7 (raspi 3) #722

elgarbe opened this issue Feb 29, 2024 · 7 comments

Comments

@elgarbe
Copy link

elgarbe commented Feb 29, 2024

Is there a foxy/humble/iron image for raspberry pi 3? I can't find any on https://hub.docker.com/r/arm32v7/ros/tags

Thank

@sloretz
Copy link
Contributor

sloretz commented Feb 29, 2024

There is not. All of the supported ROS 2 distros have arm32/v7 support listed as Tier 3 from source only in REP 2000. That means you'll have to build ROS 2 from source for that architecture.

Instructions for building ROS 2 from source are here: https://docs.ros.org/en/rolling/Installation/Alternatives/Ubuntu-Development-Setup.html

@sloretz sloretz closed this as completed Feb 29, 2024
@elgarbe
Copy link
Author

elgarbe commented Feb 29, 2024

Thank! Reading a little more I've noticed that raspi 3 is 64bit arm v8 so I've installed Ubuntu server 22.04 and then ros2 iron.
I will use docker anyway, but now I have an aarch64 os and everything is easy.

@elgarbe
Copy link
Author

elgarbe commented Mar 1, 2024

Now I'm working on an odroid xu4 that actually is an ARMv7. I've installed an official Ubuntu 22.04 but I can't install ros2 from binary package
So I need to build from source.
I would like to use docker anyway, do I need to use "source" Dockerfile? Can I build humble this way?

@mikaelarguedas
Copy link
Contributor

Duplicate of #573 (comment), #575, #556

@mikaelarguedas
Copy link
Contributor

I would like to use docker anyway, do I need to use "source" Dockerfile? Can I build humble this way?

Yes you can.

For example for building an Humble image from source

cd docker_images/ros2/source/
docker build --tag=osrf/ros2:devel devel/.
docker build --tag=osrf/ros2:source  source/. --build-arg="ROS_DISTRO=humble"

Note that the source image will clone and build all repos listed in the ros2.repos file for the ROS version you picked; aka a LOT of stuff including e.g. rviz.
You might want to adjust the set of repos and packages to build to match your setup to reduce your build time and resulting image size to be tailored to your needs

You can use rosinstall_generator for that, you'll find a couple resources online (e.g. ros2/ros2_documentation#870 (comment))

@elgarbe
Copy link
Author

elgarbe commented Mar 3, 2024

Thank for your help!
Right now I'm cross building a ros2:humble image (ros2_core from rosinstall_generator) thanks to docker buildx.
But I have one last question. Can I remove

  python3-pip \
  python3-pytest-cov \
  python3-flake8-blind-except \
  python3-flake8-class-newline \
  python3-flake8-deprecated \
  python3-pytest-repeat \
  python3-pytest-rerunfailures \
  ros-dev-tools

after colcon build? I would like to have a small image and use it as a base for other images where I will build other specific ros2 packages, like mavros, micro-ros. May I remove some other packages used by colcon build but not for ros2 packages?

@mikaelarguedas
Copy link
Contributor

Can I remove blabla after colcon build?

yes

It's up to you what dev tools you want or not in your images.

I would like to have a small image and use it as a base for other images where I will build other specific ros2 packages

You will likely need build tools and dev tools to be able to build these following images

The topic of overall build dependencies vs runtime dependencies is discussed in a couple places. e.g. https://discourse.ros.org/t/package-separation-for-building-and-running-ros-applications/35527

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants