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

Ubuntu 22.04, ros humble fixes #41

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

nikola-j
Copy link

Fixes: Building and running UE5 + ros humble on ubuntu 22.04

About

Updates gcc and g++ to 11, updates setup file to install right dependencies. Fix fs link.

How Has This Been Tested?

Instructions for building:

# install ROS2 pkgs:
sudo apt-get install ros-${ROS_DISTRO}-tf2-sensor-msgs \
    ros-${ROS_DISTRO}-image-transport-plugins \
    ros-${ROS_DISTRO}-tf2-geometry-msgs \
    ros-${ROS_DISTRO}-mavros* \
    libyaml-cpp-dev \
    libc++abi-11-dev \
    libstdc++-11-dev \
    libc++-11-dev \
    vulkan-tools
    
sudo ln -s /usr/lib/x86_64-linux-gnu/libstdc++.so.6 /usr/lib/libstdc++.so

./setup.sh
./build.sh
cd ros2
colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release

Run UE5, run airsim ros from ros2 folder

. install/setup.bash
ros2 launch airsim_ros_pkgs airsim_with_simple_PD_position_controller.launch.py

Issue takeoff command in separate terminal

. install/setup.bash
ros2 service call /airsim_node/drone_1/takeoff airsim_interfaces/srv/Takeoff "wait_on_last_task: false"

Screenshots (if appropriate):

@xxEoD2242
Copy link

@nikola-j I will review this tomorrow when I get back to my desktop Linux.

Is this cross compitable with 20.04?

@nikola-j
Copy link
Author

Not sure, I don't have 20.04 to test. The setup.sh should probably be different.

@xxEoD2242
Copy link

Gotcha, I'll try it out on 20.04 but won't merge until that is verified

@iagupov
Copy link

iagupov commented Oct 23, 2023

what is a python version that you used? I've made changes according to the commit, but got an error: cannot find -lstdc++: No such file or directory.
The full log is shown below

CMake Error at /home/user/.pyenv/versions/3.9.17/lib/python3.9/site-packages/cmake/data/share/cmake-3.26/Modules/CMakeTestCXXCompiler.cmake:60 (message):
The C++ compiler
"/usr/bin/clang++-11"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: /home/user/cv_dev/del/Colosseum/build_release/CMakeFiles/CMakeScratch/TryCompile-sxFXrH
Run Build Command(s): /home/user/.pyenv/versions/3.9.17/lib/python3.9/site-packages/cmake/data/bin/cmake -E env VERBOSE=1 /usr/bin/gmake -f Makefile cmTC_e1d20/fast && /usr/bin/gmake -f CMakeFiles/cmTC_e1d20.dir/build.make CMakeFiles/cmTC_e1d20.dir/build
gmake[1]: Entering directory '/home/user/cv_dev/del/Colosseum/build_release/CMakeFiles/CMakeScratch/TryCompile-sxFXrH'
Building CXX object CMakeFiles/cmTC_e1d20.dir/testCXXCompiler.cxx.o
/usr/bin/clang++-11 -MD -MT CMakeFiles/cmTC_e1d20.dir/testCXXCompiler.cxx.o -MF CMakeFiles/cmTC_e1d20.dir/testCXXCompiler.cxx.o.d -o CMakeFiles/cmTC_e1d20.dir/testCXXCompiler.cxx.o -c /home/user/cv_dev/del/Colosseum/build_release/CMakeFiles/CMakeScratch/TryCompile-sxFXrH/testCXXCompiler.cxx
Linking CXX executable cmTC_e1d20
/home/user/.pyenv/versions/3.9.17/lib/python3.9/site-packages/cmake/data/bin/cmake -E cmake_link_script CMakeFiles/cmTC_e1d20.dir/link.txt --verbose=1
/usr/bin/clang++-11 CMakeFiles/cmTC_e1d20.dir/testCXXCompiler.cxx.o -o cmTC_e1d20
/usr/bin/ld: cannot find -lstdc++: No such file or directory
clang: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[1]: *** [CMakeFiles/cmTC_e1d20.dir/build.make:100: cmTC_e1d20] Error 1
gmake[1]: Exiting directory '/home/user/cv_dev/del/Colosseum/build_release/CMakeFiles/CMakeScratch/TryCompile-sxFXrH'
gmake: *** [Makefile:127: cmTC_e1d20/fast] Error 2

@nikola-j
Copy link
Author

nikola-j commented Oct 25, 2023

The default Python 3.10.12, did you follow all of the steps?
Did you change this line? https://github.com/CodexLabsLLC/Colosseum/pull/41/files#diff-4d2a8eefdf2a9783512a35da4dc7676a66404b6f3826a8af9aad038722da6823R120

It might be a problem with your installation.

@iagupov
Copy link

iagupov commented Oct 25, 2023

@nikola-j yes, I did exactly all these steps, I did all modifications in build.sh, CommonSetup.cmake, CMakeLists.txt, package.xml and setup.sh. And after that I get this error above

@jmackay2
Copy link

jmackay2 commented Dec 7, 2023

@iagupov You can run clang -v and check what GCC installation it is using. This error is probably due to the fact that clang is using a newer gcc that doesn't have the stdc++ version installed (i.e. probably using gcc 12 instead of 11). To fix this you can either install the newer stdc++ version or tell clang to use gcc 11.

@jmackay2
Copy link

@xxEoD2242 I tested this change on a 20.04 docker container, and it built without issues.

@Snoeprol
Copy link

Snoeprol commented May 9, 2024

Hi. I managed to get the Blocks environment working with UE5.2 and ubuntu 22.04. If there's interest in it let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants