autoware
autoware copied to clipboard
Fix ARM build of scenario_simulator
libembree-dev
can't be installed on ARM.
https://github.com/autowarefoundation/autoware/pull/8#issuecomment-1014333684
- Build
embree
manually - Run
rosdep install
with--skip-keys=embree
This pull request has been automatically marked as stale because it has not had recent activity.
@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.
@esteve I think it's great! @hakuturu583 What do you think?
I arleady developed embree_vendor package, but it takes a lot of time.
https://github.com/OUXT-Polaris/embree_vendor
And also, I have not tested this vendor package on arm CPU.
Hi, any updates on this issue ?
@hakuturu583 Can we use embree_vendor
package on arm CPU ?
@hakuturu583 Can we use embree_vendor package on arm CPU ?
Yes, I tested on qemu and it works.
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.
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
.
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.
I was able to build on arm with the following workaround:
- Use Embree 3.13.5 and cherry-pick https://github.com/embree/embree/commit/82ca6b5ccb7abe0403a658a0e079926478f04cb1 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
- Modify simple_sensor_simulator's dependency in package.xml to use embree_vendor instead of embree.
- 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
Related Issue: https://github.com/tier4/scenario_simulator_v2/issues/1094
I was able to build on arm with the following workaround:
- 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
- Modify simple_sensor_simulator's dependency in package.xml to use embree_vendor instead of embree.
- 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.