Ekumen-OS / andino_webots

Webots simulation of the Andino robot fully integrated with ROS 2
BSD 3-Clause "New" or "Revised" License
6 stars 1 forks source link

osrf/ros:humble-desktop-full doesn't support ARM64 architecture #39

Open Fatyhich opened 5 months ago

Fatyhich commented 5 months ago

Hello, I'm new to docker. I'm trying to complete installation. My ubuntu 22.04 is running with UTM on macOS Sonoma. Webots installed on MacOS, because cyberbotics doesn't have a build for arm64 ubuntu and it can't build from source. So, I use TCP/IP bridge.

When I try to set up docker env I got error:

Building the docker image for ros2 humble andino development. [+] Building 0.8s (6/24) docker:default => [internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 1.89kB 0.0s => [internal] load metadata for docker.io/osrf/ros:humble-desktop-full 0.5s => [internal] load .dockerignore 0.0s => => transferring context: 2B 0.0s => CACHED [ 1/20] FROM docker.io/osrf/ros:humble-desktop-full@sha256:d5b 0.0s => [internal] load build context 0.0s => => transferring context: 71B 0.0s => ERROR [ 2/20] RUN echo 'debconf debconf/frontend select Noninteractiv 0.2s


[ 2/20] RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections: 0.153 exec /bin/sh: exec format error

Dockerfile:10

8 | ENV TERM linux 9 | ENV DEBIAN_FRONTEND noninteractive 10 | >>> RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections 11 |
12 | # Copy requirement files and install dependencies

ERROR: failed to solve: process "/bin/sh -c echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections" did not complete successfully: exit code: 1

I think this is because osrf/ros:humble-desktop-full doesn't support ARM64 architecture. How can I fix it ?

Maybe I must use this arm64/ros docker image ?

Fatyhich commented 5 months ago

I tried to replace first line of the dockerfile to : 'FROM arm64v8/ros:humble-ros-core'

and that's what I get:

ERROR [ 8/20] RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y webots 2.3s
[ 8/20] RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y webots:
0.459 Hit:1 http://ports.ubuntu.com/ubuntu-ports jammy InRelease
0.588 Hit:2 http://ports.ubuntu.com/ubuntu-ports jammy-updates InRelease
0.660 Hit:3 http://ports.ubuntu.com/ubuntu-ports jammy-backports InRelease
0.732 Hit:4 http://ports.ubuntu.com/ubuntu-ports jammy-security InRelease
0.848 Get:5 https://cyberbotics.com/debian binary-amd64/ InRelease [2620 B] 0.927 Hit:6 http://packages.ros.org/ros2/ubuntu jammy InRelease 0.956 Get:7 https://cyberbotics.com/debian binary-amd64/ Packages [811 B] 0.965 Fetched 3431 B in 1s (4817 B/s) 0.965 Reading package lists... 1.533 Reading package lists... 2.057 Building dependency tree... 2.196 Reading state information... 2.207 E: Unable to locate package webots

Dockerfile:23

22 |
23 | >>> RUN apt-get update && DEBIAN_FRONTEND=noninteractive \ 24 | >>> apt-get install -y \ 25 | >>> webots 26 |

ERROR: failed to solve: process "/bin/sh -c apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y webots" did not complete successfully: exit code: 100

I think It because webots hasn't ARM64 build. Maybe I can just remove this from file ?

Fatyhich commented 5 months ago

finally it doesn't work properly

[15/16] RUN sudo apt upgrade -y && sudo apt update && rosdep update:
0.290
0.290 WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
0.290
0.313 Reading package lists...
0.892 Building dependency tree... 1.026 Reading state information... 1.049 Calculating upgrade... 1.208 The following packages will be upgraded: 1.208 distro-info-data linux-libc-dev python3-rosdistro-modules 1.451 3 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 1.451 Need to get 1355 kB of archives. 1.451 After this operation, 12.3 kB of additional disk space will be used. 1.451 Get:1 http://ports.ubuntu.com/ubuntu-ports jammy-updates/main arm64 distro-info-data all 0.52ubuntu0.7 [5326 B] 1.540 Get:2 http://ports.ubuntu.com/ubuntu-ports jammy-updates/main arm64 linux-libc-dev arm64 5.15.0-106.116 [1318 kB] 2.309 Get:3 http://packages.ros.org/ros2/ubuntu jammy/main arm64 python3-rosdistro-modules all 0.9.1-1 [31.9 kB] 3.068 Fetched 1355 kB in 1s (1147 kB/s) (Reading database ... 54641 files and directories currently installed.) 3.105 Preparing to unpack .../distro-info-data_0.52ubuntu0.7_all.deb ... 3.111 Unpacking distro-info-data (0.52ubuntu0.7) over (0.52ubuntu0.6) ... 3.136 Preparing to unpack .../linux-libc-dev_5.15.0-106.116_arm64.deb ... 3.141 Unpacking linux-libc-dev:arm64 (5.15.0-106.116) over (5.15.0-105.115) ... 4.263 Preparing to unpack .../python3-rosdistro-modules_0.9.1-1_all.deb ... 4.311 Unpacking python3-rosdistro-modules (0.9.1-1) over (0.9.0-1) ... 4.393 Setting up distro-info-data (0.52ubuntu0.7) ... 4.398 Setting up linux-libc-dev:arm64 (5.15.0-106.116) ... 4.405 Setting up python3-rosdistro-modules (0.9.1-1) ... 4.509 4.509 WARNING: apt does not have a stable CLI interface. Use with caution in scripts. 4.509 4.985 Hit:1 http://ports.ubuntu.com/ubuntu-ports jammy InRelease 5.046 Hit:2 http://ports.ubuntu.com/ubuntu-ports jammy-updates InRelease 5.119 Hit:3 http://ports.ubuntu.com/ubuntu-ports jammy-backports InRelease 5.191 Hit:4 http://ports.ubuntu.com/ubuntu-ports jammy-security InRelease 5.796 Hit:5 http://packages.ros.org/ros2/ubuntu jammy InRelease 5.844 Reading package lists... 6.371 Building dependency tree... 6.507 Reading state information... 6.516 All packages are up to date. 6.521 /bin/sh: 1: rosdep: not found

Dockerfile:54

52 |
53 | # Updates 54 | >>> RUN sudo apt upgrade -y && sudo apt update && rosdep update 55 |
56 | # Defines a workspace folder.

ERROR: failed to solve: process "/bin/sh -c sudo apt upgrade -y && sudo apt update && rosdep update" did not complete successfully: exit code: 127

francocipollone commented 5 months ago

Hey @Fatyhich , great you are trying this out on another platform.

Not that the latest error says:

6.521 /bin/sh: 1: rosdep: not found

And as you are basing the docker image on ...ros-core probably rosdep is not installed. Try installing rosdep as well: sudo apt-get install python3-rosdep

Fatyhich commented 5 months ago

Thanks ! I'll try it soon.

And as you are basing the docker image on ...ros-core probably rosdep is not installed. Try installing rosdep as well: sudo apt-get install python3-rosdep

Also I tried to build this without docker because I have ros2 humble on my virtual machine. And after few attempts I've launched Webots with robot model. Unfortunately, for this I had to remove all the dependencies with gazebo from submodules. Last step is to check out navigation stack.

If it can really be useful for you, I will continue to send my achievements here. Thanks a lot for your attention and advice !

francocipollone commented 5 months ago

If it can really be useful for you, I will continue to send my achievements here. Thanks a lot for your attention and advice !

For sure! Any update will be useful for future users as well and the community in general :rocket: