maliput / maliput_infrastructure

Driving simulation repository for workspace .repo indexes, Makefiles, etc.
BSD 3-Clause "New" or "Revised" License
0 stars 2 forks source link

Support building workspace on Ubuntu 20.04 with ROS Foxy #196

Closed scpeters closed 3 years ago

scpeters commented 3 years ago

We would like to support 18.04 (dashing) and 20.04 (foxy) if possible with the maliput codebase with some CI builds for both platforms. Delphyne does not need to keep supporting 18.04 after the transition to 20.04.

agalbachicar commented 3 years ago

I think we should increase the priority of this task. dashing becomes EOL at the end of May 2021. -> https://docs.ros.org/en/dashing/Releases.html#list-of-distributions

agalbachicar commented 3 years ago

Suggested plan of work (already discussed in a weekly meeting)

scpeters commented 3 years ago

draft PR enabling CI with 18.04 and 20.04 in maliput: https://github.com/ToyotaResearchInstitute/maliput/pull/421

it's a draft because there's one type of clang-format error I haven't been able to figure out

scpeters commented 3 years ago

I've started testing maliput_py and have noticed that as of https://github.com/ToyotaResearchInstitute/maliput_py/commit/32108406a3dfb201c0e00f3e5a6009ca6469166c in the foxy branch, it is able to resolve all rosdep keys, but it fails to build pybind11:

--- stderr: pybind11
CMake Error at tests/CMakeLists.txt:218 (message):
  Running the tests requires pytest.  Please install it manually (try:
  /usr/bin/python -m pip install pytest)

I've confirmed that python3-pytest is installed by looking at the apt console log in the rosdep step, but this revision of pybind11 (https://github.com/RobotLocomotion/pybind11/commit/69a5d92a5ff9fe84581a1edeb6051a8c21d9eb97 from 2019) is finding a python2 executable at this step.

I've tried building maliput_py against the drake branch of the pybind11 fork in https://github.com/ToyotaResearchInstitute/maliput_py/commit/ef9fd87236831a5372fe5c9212c22dba49348a80, and it successfully compiles pybind11 with warnings but fails to configure maliput_py with cmake errors

scpeters commented 3 years ago

I opened https://github.com/ToyotaResearchInstitute/maliput_infrastructure/issues/215 to track the matter of updating to a new version of pybind11

scpeters commented 3 years ago

Packages with 20.04 CI enabled:

scpeters commented 3 years ago

I have branches started for several packages that aren't yet in pull requests:

agalbachicar commented 3 years ago

To sum up the status of the migration, right now we are dealing with:

francocipollone commented 3 years ago

When using the sanitizers (asan, tsan, etc) they fail at link time trying to link against LLVMgold.so. The path to the library is wrong but the library is properly installed.

Actually it wasn't an issue with the sanitizers but with the linker when using clang as compiler

Here I fixed it in maliput_py PR#13. Once approved I will replicate this across the workspace.

agalbachicar commented 3 years ago

I found an error in focal and delphyne when running tests. pydrake python module is not found:

/usr/bin/python3 -m pytest /home/agalbachicar/maliput_ws_focal/src/delphyne/test/regression/python/simulation_runner_py_test.py 
========================================================== test session starts ===========================================================
platform linux -- Python 3.8.10, pytest-4.6.9, py-1.8.1, pluggy-0.13.0
rootdir: /home/agalbachicar/maliput_ws_focal
plugins: ament-flake8-0.9.6, ament-lint-0.9.6, colcon-core-0.6.1, cov-2.8.1
collected 0 items / 1 errors                                                                                                             

================================================================= ERRORS =================================================================
___________________________ ERROR collecting src/delphyne/test/regression/python/simulation_runner_py_test.py ____________________________
ImportError while importing test module '/home/agalbachicar/maliput_ws_focal/src/delphyne/test/regression/python/simulation_runner_py_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
src/delphyne/test/regression/python/simulation_runner_py_test.py:10: in <module>
    from delphyne.simulation import (
E   ImportError: ModuleNotFoundError: No module named 'pydrake'
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
======================================================== 1 error in 0.15 seconds ========================================================

That's the only missing thing to send a PR that completes the migration in delphyne.

agalbachicar commented 3 years ago

The error commented in https://github.com/ToyotaResearchInstitute/maliput_infrastructure/issues/196#issuecomment-883313840 got solved via ToyotaResearchInstitute/delphyne#793 (removal of unnecessary pydrake inclusions).

agalbachicar commented 3 years ago

I'm facing an issue trying to load delphyne_gui executables which is related to $AMENT_CURRENT_PREFIX used in setup.sh.in template to load paths to assets and libraries relative to the install space.

In bionic, the variable is empty before and after sourcing ws/install/setup.bash. In focal, the variable points to /opt/ros/foxy. When checking the values that variables depending on AMENT_CURRENT_PREFIX take in both OSs, I could note the difference:

Before proceeding, we should look into this. One possibility, is to start using ament_index and use that API to look for resource paths that are independent on the install space.

agalbachicar commented 3 years ago

I verified that this problem is in all packages exporting via ament_environment_hooks() macros variables. If we replace AMENT_CURRENT_PREFIX by COLCON_PREFIX_PATH, paths remain immutable across ROS versions.

agalbachicar commented 3 years ago

I'm really happy to close this ticket now that #221 has been submitted.

scpeters commented 3 years ago

congratulations!