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

Planning simulator doesn't seem to work on Arm #1912

Closed
3 tasks done
kaspermeck-arm opened this issue Sep 20, 2022 · 8 comments
Closed
3 tasks done

Planning simulator doesn't seem to work on Arm #1912

kaspermeck-arm opened this issue Sep 20, 2022 · 8 comments
Assignees
Labels
type:bug Software flaws or errors.

Comments

@kaspermeck-arm
Copy link
Contributor

Checklist

  • I've read the contribution guidelines.
  • I've searched other issues and no duplicate issues were found.
  • I'm convinced that this is not my fault but a bug.

Description

When following the instructions from

Expected behavior

For the container to launch using rocker.

Actual behavior

Container doesn't launch.

Steps to reproduce

Clone repo and pull container

ubuntu@ava:~$ git clone https://github.com/autowarefoundation/autoware.git
ubuntu@ava:~$ docker pull ghcr.io/autowarefoundation/autoware-universe:galactic-20220915-prebuilt-cuda-arm64
ubuntu@ava:~$ docker images
REPOSITORY                                     TAG                                     IMAGE ID       CREATED         SIZE
ghcr.io/autowarefoundation/autoware-universe   galactic-20220915-prebuilt-cuda-arm64   399c11688e53   5 days ago      18.2GB
ubuntu@ava:~$ rocker -e LIBGL_ALWAYS_SOFTWARE=1 --x11 --user --volume $HOME/autoware -- ghcr.io/autowarefoundation/autoware-universe:galactic-20220915-prebuilt-cuda-arm64

Inside container

ubuntu@cdf526db27a5:~$ cd autoware/
ubuntu@cdf526db27a5:~/autoware$ mkdir src
ubuntu@cdf526db27a5:~/autoware$ vcs import src < simulator.repos
ubuntu@cdf526db27a5:~/autoware$ sudo apt update
ubuntu@cdf526db27a5:~/autoware$ rosdep update
ubuntu@cdf526db27a5:~/autoware$ rosdep install -y --from-paths . --ignore-src --rosdistro $ROS_DISTRO

Error message

...
executing command [sudo -H apt-get install libembree-dev]
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package libembree-dev
ERROR: the following rosdeps failed to install
  apt: command [sudo -H apt-get install libembree-dev] failed
...

Versions

  • Ubuntu 20.04 LTS
  • ROS2
  • ghcr.io/autowarefoundation/autoware-universe:galactic-20220915-prebuilt-cuda-arm64

Possible causes

Seems as though libembree-dev isn't available on Arm.

Additional context

No response

@kenji-miyake
Copy link
Contributor

kenji-miyake commented Sep 21, 2022

Seems as though libembree-dev isn't available on Arm.

Related: autowarefoundation/autoware#2413

@kaspermeck-arm
Copy link
Contributor Author

Proposed fix:

  1. install libembree-dev manually
  2. add --skip-keys=embree to the rosdep install command
  3. see if CMake can find the package when running colcon build

@kaspermeck-arm kaspermeck-arm added the type:bug Software flaws or errors. label Sep 21, 2022
@mitsudome-r mitsudome-r self-assigned this Sep 21, 2022
@mitsudome-r
Copy link
Member

@ito-san Already ran planning simulator on ARM machine.
autowarefoundation/autoware-projects#32 (comment)

@ito-san Do you have instructions to reproduce your test on Open AD Kit?

@ito-san
Copy link
Contributor

ito-san commented Sep 22, 2022

@kasperornmeck

If you want to build scenario_simulator_v2, please follow the instructions below.

  1. Add depencies

    sudo add-apt-repository ppa:kisak/kisak-mesa -y
    sudo apt install libegl-mesa0 libglfw3-dev -y
  2. Build oneTBB

    git clone https://github.com/oneapi-src/oneTBB -b v2021.3.0
    cd ~/oneTBB
    mkdir build & cd build & cmake -DCMAKE_CXX_STANDARD=20 -DCMAKE_BUILD_TYPE=debug -DCMAKE_CXX_COMPILER=g++ -DCMAKE_C_COMPILER=gcc -DTBB_CPF='ON' -DTBB_TEST=OFF .. & make & sudo make install
  3. Build embree

    git clone https://github.com/embree/embree -b v3.13.0
    cd ~/embree
    mkdir build && cd build && cmake ../ -DEMBREE_ISPC_SUPPORT=OFF && make && sudo make install
  4. Build your workspace

    cd ~/autoware
    vcs import src < simulator.repos
    rosdep install -y --from-paths src --ignore-src --rosdistro $ROS_DISTRO --skip-keys embree
    MAKEFLAGS=-j3 colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release --parallel-worker 3

But you can also use docker container built for arm64 like this.

docker run --rm -it --net host -v /home/autoware/sample_data:/sample_data ghcr.io/ito-san/scenario_simulator_v2:galactic-arm64 ros2 launch scenario_test_runner scenario_test_runner.launch.py scenario:=/sample_data/t4v2.yaml architecture_type:=awf/universe launch_autoware:=false record:=false

@evshary
Copy link
Member

evshary commented Sep 22, 2022

@ito-san I tried to run Open AD Kit v2.0 based on this guide
In this guide, Autoware is running on AVA platform (Yocto-based) and the scenario_simulator_v2 is running on my x86 host, which is no problem.
Then I also want to try scenario_simulator_v2 on AVA platform, so use your docker container.
But I meet the following error message:

Screenshot from 2022-09-22 17-44-24

Not sure whether it's related to the dependency issue, maybe I need to fetch the latest scenario_simulator_v2 code and try again.
Do you have any suggestions about this error?

@ito-san
Copy link
Contributor

ito-san commented Sep 22, 2022

@evshary
Please run the following.

docker run --rm -it --net host -v /home/root/sample_data:/sample_data ghcr.io/ito-san/scenario_simulator_v2:galactic-arm64 /bin/bash

Inside container

ros2 launch scenario_test_runner scenario_test_runner.launch.py scenario:=/sample_data/t4v2.yaml architecture_type:=awf/universe launch_autoware:=false record:=false

You will get the error.
Please let me know this output.

cat /tmp/scenario_test_runner/result.junit.xml

@evshary
Copy link
Member

evshary commented Sep 23, 2022

@ito-san Thank you for the explanation.
After viewing the output, I found I have the wrong path of the map in the docker container.
It works perfectly after correcting the path.
Thank you!

@xmfcx
Copy link
Contributor

xmfcx commented Oct 4, 2022

@kasperornmeck @evshary I am closing this issue since it's fixed, please reopen it if I understood it wrong.

@xmfcx xmfcx closed this as completed Oct 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Software flaws or errors.
Projects
Status: Done
Development

No branches or pull requests

6 participants