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

Fix ARM build of scenario_simulator #2413

Closed
kenji-miyake opened this issue Jan 17, 2022 · 13 comments
Closed

Fix ARM build of scenario_simulator #2413

kenji-miyake opened this issue Jan 17, 2022 · 13 comments
Labels
priority:low Lower urgency, can be addressed later.

Comments

@kenji-miyake
Copy link
Contributor

libembree-dev can't be installed on ARM.
#8 (comment)

  • Build embree manually
  • Run rosdep install with --skip-keys=embree
kenji-miyake referenced this issue in autowarefoundation/autoware_core_universe_prototype Jan 17, 2022
autowarefoundation/autoware#21
Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>
kenji-miyake referenced this issue in autowarefoundation/autoware_core_universe_prototype Jan 18, 2022
* ci: add build CI

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* feat: add files for Ansible Galaxy

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* feat: copy ansible files from tier4's proposal

Remove cache_valid_time

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

v0.4.0

Signed-off-by: mitsudome-r <ryohsuke.mitsudome@tier4.jp>

copy setup

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>

add ros2 ansible roles

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>

ansible add ubuntu20 setup

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>

ansible fix pacmod

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>

temp disable cuda & tensorrt

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>

ansible fix kvaser library repo

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>

temporally comment out for unused modules

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>

remove unused codes

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>

Install osqp only once (#95)

* update readme and fix osqp_vendor tag

* Remove ansible osqp role

fix: ansbile role

Closes #140

add ansible for cuda 11.1 & tensorrt 7.2.1 & cudnn 8.0.5

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>

add script for install livox sdk

Signed-off-by: kosuke murakami <kosuke.murakami@tier4.jp>

add ansible sdk task

Signed-off-by: kosuke murakami <kosuke.murakami@tier4.jp>

Use Livox vendor package (#156)

* Use Livox vendor package

* Removed Livox SDK from ansible

* Use upstream Livox ROS2 driver

Install kvaser library

Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>

Update ansible/localhost-setup-ubuntu20.04-devpc.yml

Install kvaser library from origin

Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>

Update ansible/localhost-setup-ubuntu20.04-devpc.yml

install vcstool and do vcs import in ansible setup (#170)

Update documents and fix typos

* update install instructions
* remove redundant statements
* fix typos

Separate Ansible tasks related to vcs import to new role (#180)

* Separate Ansible tasks related to vcs import to new role

* Move the Ansible task to install vcstool to the ROS2 role

Add rmw-cyclonedds-cpp to ansible (#67)

* Add rmw-cyclonedds-cpp to ansible

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* Add settings to .bashrc

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

Fix setup script typos (#202) (#73)

Signed-off-by: Lalith Vipulananthan <63835446+LalithVipulananthan@users.noreply.github.com>
Co-authored-by: Kazuki Miyahara <kmiya@outlook.com>

Revive pacmod role (#103)

* Revert "Install kvaser library from origin"

This reverts commit 3859fff.

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* Remove ROS role

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

install pip before rosdep (#72)

Fix: Update GPG key download task for ROS2 (#125)

* Fix: Update GPG key download task for ROS2

* Fix: Update comments, source list

Add pre-commit CI (#167)

* Add pre-commit CI

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* Add .prettierrc.yaml

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* Ignore some markdownlint rules

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* Apply format

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* Fix typo

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* Fix typo

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

Move to ROS2 Galactic (#107)

* Fix rosdistro in ansible

Fix rosdistro other than autoware in ansible (#146)

* Use upstream grid_map

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* Remove rosbag2

Signed-off-by: kosuke55 <kosuke.tnp@gmail.com>

* Change position of ecu_system_setup section

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* Add missing_packages in galactic

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* Add ros2/rosbag2 galactic to repos

Signed-off-by: kosuke55 <kosuke.tnp@gmail.com>

* Purge installed rosbag2 to build it from source

Signed-off-by: kosuke55 <kosuke.tnp@gmail.com>

* Add TODO comment to repos

Co-authored-by: tkimura4 <tomoya.kimura@tier4.jp>
Co-authored-by: kosuke55 <kosuke.tnp@gmail.com>

Install ros-galactic-ros2cli-common-extensions in ansible (#183)

* Signed-off-by: kosuke55 <kosuke.tnp@gmail.com>

Install ros-galactic-ros2cli-common-extensions in ansible

Signed-off-by: kosuke55 <kosuke.tnp@gmail.com>

* Add descriptions of rosbag2 purge

Use apt installed rosbag2 (#189)

Signed-off-by: kosuke55 <kosuke.tnp@gmail.com>

Remove vcs import in ansible (#198)

* Remove vcs import in ansible

Signed-off-by: kosuke55 <kosuke.tnp@gmail.com>

* Update installation steps

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

Co-authored-by: Kenji Miyake <kenji.miyake@tier4.jp>

fix gdown install command (#214)

Simplify ansible files (#122)

* Simplify ansible files

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* Add build-pr.yml

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

add libtorch (#131) (#191)

* add libtorch (#131)

* add libtorch

* update libtorch 1.6.0 -> 1.8.1

* libtorch for CUDA 11.1

* use the same command

* libtorch 1.8.1 -> 1.6.0

* add LibTorch for CUDA 11.1

* change install order

* Deprecate 18.04 support for libtorch

Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>

* pre-commit fixes

Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>

Co-authored-by: Yusuke Muramatsu <yukke42@users.noreply.github.com>

fix libtorch install (#196)

Feature/remove pacmod3 (#349)

* remove pacmod3

* Remove kvaser_interface from repos

Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>

* Fix ansible

Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>

* Fix vcs import action

Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>

* Run pre-commit

Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>

Co-authored-by: wep21 <border_goldenmarket@yahoo.co.jp>

add go dependency for pre-commit (#388)

* add go dependency by snap install --classic

* move install-go from autoware/ to pre-commit/

* update playbook.yml

* use apt without snap to install golang

* chore: clean up files

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* fix: specify pip3 executable to prevent pipx to be used

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* feat: add docker role

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* fix: use ansible_user_id instead of ansible_env.USER

root user doesn't have ansible_env.USER.

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* chore: fix verbose option

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* feat: remove libtorch

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* feat: add --no-nvidia option

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* style: rename ansible_options to ansible_args

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* feat: update CUDA versions

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* chore: fix scripts around sudo

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* feat: support arm64-sbsa in CUDA role

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* ci: add ARM build

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* chore: comment out simulator repositories

autowarefoundation/autoware#21
Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

Co-authored-by: Yukihiro Saito <yukky.saito@gmail.com>
@kenji-miyake kenji-miyake added the priority:low Lower urgency, can be addressed later. label Feb 13, 2022
@stale
Copy link

stale bot commented Apr 14, 2022

This pull request has been automatically marked as stale because it has not had recent activity.

@esteve
Copy link
Contributor

esteve commented May 26, 2022

@kenji-miyake what do you think of having an embree_vendor package and have scenario_simulator depend on it? If libembree-dev is installed on the system, that'll be used, and if not, build it.

@kenji-miyake
Copy link
Contributor Author

@esteve I think it's great! @hakuturu583 What do you think?

@hakuturu583
Copy link

I arleady developed embree_vendor package, but it takes a lot of time.

https://github.com/OUXT-Polaris/embree_vendor

@hakuturu583
Copy link

And also, I have not tested this vendor package on arm CPU.

@mitsudome-r mitsudome-r transferred this issue from autowarefoundation/autoware_core_universe_prototype Jun 26, 2022
@oguzkaganozt
Copy link
Contributor

Hi, any updates on this issue ?

@hakuturu583 Can we use embree_vendor package on arm CPU ?

@hakuturu583
Copy link

hakuturu583 commented Oct 2, 2023

@hakuturu583 Can we use embree_vendor package on arm CPU ?

Yes, I tested on qemu and it works.

@oguzkaganozt
Copy link
Contributor

Hi @hakuturu583,
I've tried with Scenario Simulator master branch and embree_vendor. It uses embree version 4.2.0 and when I try to do:
colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release --packages-up-to simple_sensor_simulator

I got following error on compilation:
error: ‘RTCIntersectContext’ has not been declared

I also checked with the original Embree version 4.0 changelog and it says:
RTCIntersectContext is renamed to RTCRayQuery context and most members moved to new RTCIntersectArguments and RTCOccludedArguments structures.

So it appears that embree version 4.x is not fit for Scenario simulator. How should I proceed do you have any suggestions ?

Thanks in advance.

@mitsudome-r
Copy link
Member

mitsudome-r commented Oct 5, 2023

I just checked installed embree apt package in my amd64 platform. It looks like I have version 3.12.2 installed.
May be you could try changing this line to v3.12.2.

@oguzkaganozt
Copy link
Contributor

I tried building with v3.12.2 and it requires libTBB version 2021.1.1 and is incompatible with 2021.5.0 that we have on Ubuntu22/arm64. Also tried version v3.13.5 and it failed with error: unrecognized command-line option ‘-msse2’ seems like the flag incompatibility with arm64.

@mitsudome-r
Copy link
Member

I was able to build on arm with the following workaround:

  1. Use Embree 3.13.5 and cherry-pick RenderKit/embree@82ca6b5 as mentioned in this issue. I've created a fork of embree_vendor with the fix so you can use the following:
cd autoware/src/universe/external
git clone -b v3.13.5_arm https://github.com/mitsudome-r/embree_vendor
  1. Modify simple_sensor_simulator's dependency in package.xml to use embree_vendor instead of embree.
  2. Even with the above fix, I still had errors from Eigen in openscenario_visualization package related to this issue. I added this warning as exception in the compile option as a quick fix.

For 2 and 3, you can checkout my fork:

cd autoware/src/simulator/scenario_simulator
git remote add https://github.com/mitsudome-r/scenario_simulator_v2
git fetch mitsudome-r
git checkout arm

@mitsudome-r
Copy link
Member

Related Issue: tier4/scenario_simulator_v2#1094

@oguzkaganozt
Copy link
Contributor

I was able to build on arm with the following workaround:

  1. Use Embree 3.13.5 and cherry-pick embree/embree@82ca6b5 as mentioned in this issue. I've created a fork of embree_vendor with the fix so you can use the following:
cd autoware/src/universe/external
git clone -b v3.13.5_arm https://github.com/mitsudome-r/embree_vendor
  1. Modify simple_sensor_simulator's dependency in package.xml to use embree_vendor instead of embree.
  2. Even with the above fix, I still had errors from Eigen in openscenario_visualization package related to this issue. I added this warning as exception in the compile option as a quick fix.

For 2 and 3, you can checkout my fork:

cd autoware/src/simulator/scenario_simulator
git remote add https://github.com/mitsudome-r/scenario_simulator_v2
git fetch mitsudome-r
git checkout arm

Thanks @mitsudome-r that solved the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority:low Lower urgency, can be addressed later.
Projects
None yet
Development

No branches or pull requests

6 participants