RobotecAI / ros2-for-unity

High-performance ROS2 solution for Unity3D
Apache License 2.0
446 stars 58 forks source link

building standalone on Ubuntu 22.04 creates error. #80

Open chwu-rwth opened 1 year ago

chwu-rwth commented 1 year ago

Environment: Ubuntu 22.04 ROS2 Humble

ros2cs was installed successfully using the --standalone tag. But as i was trying to build ros2-for-unity, the following error was shown:

-- Using RMW implementation 'rmw_fastrtps_cpp' as default 'patchelf' found in /usr/bin/patchelf -- Found rmw_cyclonedds_cpp: 0.22.6 (/opt/ros/galactic/share/rmw_cyclonedds_cpp/cmake)
CMake Error at CMakeLists.txt:182 (get_target_property): get_target_property() called with non-existent target "rmw_cyclonedds_cpp::rmw_cyclonedds_cpp". Call Stack (most recent call first): CMakeLists.txt:230 (fetch_target_lib) CMakeLists.txt:370 (get_standalone_dependencies)

Finished <<< example_interfaces [3.84s] -- Configuring incomplete, errors occurred! See also "/home/student/ros2_ws/ros2-for-unity/build/ros2cs_core/CMakeFiles/CMakeOutput.log". --- stderr: ros2cs_core
'patchelf' found in /usr/bin/patchelf CMake Error at CMakeLists.txt:182 (get_target_property): get_target_property() called with non-existent target "rmw_cyclonedds_cpp::rmw_cyclonedds_cpp". Call Stack (most recent call first): CMakeLists.txt:230 (fetch_target_lib) CMakeLists.txt:370 (get_standalone_dependencies)

Any help is appreciated.

pijaro commented 1 year ago

It looks like the cmake found a galactic version of cyclone dds in your system. If you are trying to build a humble release, then this is a conflict.

Do you have installed a galactic on Ubuntu 22? Is it sourced before the build?

You can try to install humble version of cyclonedds manually: sudo apt install ros-humble-rmw-cyclonedds-cpp