Compile ROS2 dependencies using Unreal's toolchain (#8401)
This commit is contained in:
parent
753bc5f1e6
commit
1dc37692ef
|
@ -1,5 +1,3 @@
|
|||
#define _GLIBCXX_USE_CXX11_ABI 0
|
||||
|
||||
#include "BasicListener.h"
|
||||
#include <iostream>
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
// For a copy, see <https://opensource.org/licenses/MIT>.
|
||||
|
||||
#pragma once
|
||||
#define _GLIBCXX_USE_CXX11_ABI 0
|
||||
|
||||
#include <memory>
|
||||
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
#define _GLIBCXX_USE_CXX11_ABI 0
|
||||
|
||||
#include "CarlaListener.h"
|
||||
#include <iostream>
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
// For a copy, see <https://opensource.org/licenses/MIT>.
|
||||
|
||||
#pragma once
|
||||
#define _GLIBCXX_USE_CXX11_ABI 0
|
||||
|
||||
#include <memory>
|
||||
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
#define _GLIBCXX_USE_CXX11_ABI 0
|
||||
|
||||
#include "CarlaSubscriberListener.h"
|
||||
#include <iostream>
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
// For a copy, see <https://opensource.org/licenses/MIT>.
|
||||
|
||||
#pragma once
|
||||
#define _GLIBCXX_USE_CXX11_ABI 0
|
||||
|
||||
#include <memory>
|
||||
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
#define _GLIBCXX_USE_CXX11_ABI 0
|
||||
|
||||
#include "BasicPublisher.h"
|
||||
|
||||
#include <string>
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
// For a copy, see <https://opensource.org/licenses/MIT>.
|
||||
|
||||
#pragma once
|
||||
#define _GLIBCXX_USE_CXX11_ABI 0
|
||||
|
||||
#include <memory>
|
||||
#include "CarlaPublisher.h"
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
#define _GLIBCXX_USE_CXX11_ABI 0
|
||||
|
||||
#include "CarlaClockPublisher.h"
|
||||
|
||||
#include <string>
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
// For a copy, see <https://opensource.org/licenses/MIT>.
|
||||
|
||||
#pragma once
|
||||
#define _GLIBCXX_USE_CXX11_ABI 0
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
#define _GLIBCXX_USE_CXX11_ABI 0
|
||||
|
||||
#include "CarlaCollisionPublisher.h"
|
||||
|
||||
#include <string>
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
// For a copy, see <https://opensource.org/licenses/MIT>.
|
||||
|
||||
#pragma once
|
||||
#define _GLIBCXX_USE_CXX11_ABI 0
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
#define _GLIBCXX_USE_CXX11_ABI 0
|
||||
|
||||
#include "CarlaDVSCameraPublisher.h"
|
||||
|
||||
#include <string>
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
// For a copy, see <https://opensource.org/licenses/MIT>.
|
||||
|
||||
#pragma once
|
||||
#define _GLIBCXX_USE_CXX11_ABI 0
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
#define _GLIBCXX_USE_CXX11_ABI 0
|
||||
|
||||
#include "CarlaDepthCameraPublisher.h"
|
||||
|
||||
#include <string>
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
// For a copy, see <https://opensource.org/licenses/MIT>.
|
||||
|
||||
#pragma once
|
||||
#define _GLIBCXX_USE_CXX11_ABI 0
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
#define _GLIBCXX_USE_CXX11_ABI 0
|
||||
|
||||
#include "CarlaGNSSPublisher.h"
|
||||
|
||||
#include <string>
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
// For a copy, see <https://opensource.org/licenses/MIT>.
|
||||
|
||||
#pragma once
|
||||
#define _GLIBCXX_USE_CXX11_ABI 0
|
||||
|
||||
#include <memory>
|
||||
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
#define _GLIBCXX_USE_CXX11_ABI 0
|
||||
|
||||
#include "CarlaIMUPublisher.h"
|
||||
|
||||
#include <string>
|
||||
|
@ -175,7 +173,7 @@ namespace ros2 {
|
|||
geometry_msgs::msg::Quaternion orientation;
|
||||
|
||||
const float rx = 0.0f; // pitch
|
||||
const float ry = (M_PIf32 / 2.0f) - compass; // yaw
|
||||
const float ry = (float(M_PI_2) / 2.0f) - compass; // yaw
|
||||
const float rz = 0.0f; // roll
|
||||
|
||||
const float cr = cosf(rz * 0.5f);
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
// For a copy, see <https://opensource.org/licenses/MIT>.
|
||||
|
||||
#pragma once
|
||||
#define _GLIBCXX_USE_CXX11_ABI 0
|
||||
|
||||
#include <memory>
|
||||
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
#define _GLIBCXX_USE_CXX11_ABI 0
|
||||
|
||||
#include "CarlaISCameraPublisher.h"
|
||||
|
||||
#include <string>
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
// For a copy, see <https://opensource.org/licenses/MIT>.
|
||||
|
||||
#pragma once
|
||||
#define _GLIBCXX_USE_CXX11_ABI 0
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
#define _GLIBCXX_USE_CXX11_ABI 0
|
||||
|
||||
#include "CarlaLidarPublisher.h"
|
||||
|
||||
#include <string>
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
// For a copy, see <https://opensource.org/licenses/MIT>.
|
||||
|
||||
#pragma once
|
||||
#define _GLIBCXX_USE_CXX11_ABI 0
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
#define _GLIBCXX_USE_CXX11_ABI 0
|
||||
|
||||
#include "CarlaLineInvasionPublisher.h"
|
||||
|
||||
#include <string>
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
// For a copy, see <https://opensource.org/licenses/MIT>.
|
||||
|
||||
#pragma once
|
||||
#define _GLIBCXX_USE_CXX11_ABI 0
|
||||
|
||||
#include <memory>
|
||||
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
#define _GLIBCXX_USE_CXX11_ABI 0
|
||||
|
||||
#include "CarlaMapSensorPublisher.h"
|
||||
|
||||
#include <string>
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
// For a copy, see <https://opensource.org/licenses/MIT>.
|
||||
|
||||
#pragma once
|
||||
#define _GLIBCXX_USE_CXX11_ABI 0
|
||||
|
||||
#include <memory>
|
||||
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
#define _GLIBCXX_USE_CXX11_ABI 0
|
||||
|
||||
#include "CarlaNormalsCameraPublisher.h"
|
||||
|
||||
#include <string>
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
// For a copy, see <https://opensource.org/licenses/MIT>.
|
||||
|
||||
#pragma once
|
||||
#define _GLIBCXX_USE_CXX11_ABI 0
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
#define _GLIBCXX_USE_CXX11_ABI 0
|
||||
|
||||
#include "CarlaOpticalFlowCameraPublisher.h"
|
||||
|
||||
#include <string>
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
// For a copy, see <https://opensource.org/licenses/MIT>.
|
||||
|
||||
#pragma once
|
||||
#define _GLIBCXX_USE_CXX11_ABI 0
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
// For a copy, see <https://opensource.org/licenses/MIT>.
|
||||
|
||||
#pragma once
|
||||
#define _GLIBCXX_USE_CXX11_ABI 0
|
||||
|
||||
#include <string>
|
||||
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
#define _GLIBCXX_USE_CXX11_ABI 0
|
||||
|
||||
#include "CarlaRGBCameraPublisher.h"
|
||||
|
||||
#include <string>
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
// For a copy, see <https://opensource.org/licenses/MIT>.
|
||||
|
||||
#pragma once
|
||||
#define _GLIBCXX_USE_CXX11_ABI 0
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
#define _GLIBCXX_USE_CXX11_ABI 0
|
||||
|
||||
#include "CarlaRadarPublisher.h"
|
||||
|
||||
#include <string>
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
// For a copy, see <https://opensource.org/licenses/MIT>.
|
||||
|
||||
#pragma once
|
||||
#define _GLIBCXX_USE_CXX11_ABI 0
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
#define _GLIBCXX_USE_CXX11_ABI 0
|
||||
|
||||
#include "CarlaSSCameraPublisher.h"
|
||||
|
||||
#include <string>
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
// For a copy, see <https://opensource.org/licenses/MIT>.
|
||||
|
||||
#pragma once
|
||||
#define _GLIBCXX_USE_CXX11_ABI 0
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
#define _GLIBCXX_USE_CXX11_ABI 0
|
||||
|
||||
#include "CarlaSemanticLidarPublisher.h"
|
||||
|
||||
#include <string>
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
// For a copy, see <https://opensource.org/licenses/MIT>.
|
||||
|
||||
#pragma once
|
||||
#define _GLIBCXX_USE_CXX11_ABI 0
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
#define _GLIBCXX_USE_CXX11_ABI 0
|
||||
|
||||
#include "CarlaSpeedometerSensor.h"
|
||||
|
||||
#include <string>
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
// For a copy, see <https://opensource.org/licenses/MIT>.
|
||||
|
||||
#pragma once
|
||||
#define _GLIBCXX_USE_CXX11_ABI 0
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
#define _GLIBCXX_USE_CXX11_ABI 0
|
||||
|
||||
#include "CarlaTransformPublisher.h"
|
||||
|
||||
#include <string>
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
// For a copy, see <https://opensource.org/licenses/MIT>.
|
||||
|
||||
#pragma once
|
||||
#define _GLIBCXX_USE_CXX11_ABI 0
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
#define _GLIBCXX_USE_CXX11_ABI 0
|
||||
|
||||
#include "BasicSubscriber.h"
|
||||
|
||||
#include "carla/ros2/types/String.h"
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
// For a copy, see <https://opensource.org/licenses/MIT>.
|
||||
|
||||
#pragma once
|
||||
#define _GLIBCXX_USE_CXX11_ABI 0
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
#define _GLIBCXX_USE_CXX11_ABI 0
|
||||
|
||||
#include "CarlaEgoVehicleControlSubscriber.h"
|
||||
|
||||
#include "carla/ros2/types/CarlaEgoVehicleControl.h"
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
// For a copy, see <https://opensource.org/licenses/MIT>.
|
||||
|
||||
#pragma once
|
||||
#define _GLIBCXX_USE_CXX11_ABI 0
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
// For a copy, see <https://opensource.org/licenses/MIT>.
|
||||
|
||||
#pragma once
|
||||
#define _GLIBCXX_USE_CXX11_ABI 0
|
||||
|
||||
#include <string>
|
||||
|
||||
|
|
|
@ -9,24 +9,15 @@ include (ExternalProject)
|
|||
|
||||
set (PROJECT_INSTALL_PATH ${CMAKE_CURRENT_BINARY_DIR}/install)
|
||||
|
||||
set (PROJECT_CMAKE_FLAGS
|
||||
-DCMAKE_CXX_COMPILER=${GXX_COMPILER}
|
||||
-DCMAKE_C_COMPILER=${GCC_COMPILER}
|
||||
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
|
||||
-DCMAKE_CXX_FLAGS_RELEASE=-D_GLIBCXX_USE_CXX11_ABI=0
|
||||
-DCMAKE_INSTALL_PREFIX=${PROJECT_INSTALL_PATH}
|
||||
)
|
||||
|
||||
ExternalProject_add (
|
||||
foonathan_memory
|
||||
URL https://github.com/eProsima/foonathan_memory_vendor/archive/refs/heads/${CARLA_FOONATHAN_MEMORY_VENDOR_TAG}.zip
|
||||
CMAKE_ARGS ${PROJECT_CMAKE_FLAGS} -DBUILD_SHARED_LIBS=ON -DFOONATHAN_MEMORY_FORCE_VENDORED_BUILD=ON
|
||||
)
|
||||
|
||||
ExternalProject_add (
|
||||
fastcdr
|
||||
URL https://github.com/eProsima/Fast-CDR/archive/refs/heads/${CARLA_FASTCDR_TAG}.zip
|
||||
CMAKE_ARGS ${PROJECT_CMAKE_FLAGS}
|
||||
CMAKE_ARGS
|
||||
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
|
||||
-DCMAKE_INSTALL_PREFIX=${PROJECT_INSTALL_PATH}
|
||||
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
|
||||
-DBUILD_SHARED_LIBS=ON
|
||||
-DFOONATHAN_MEMORY_FORCE_VENDORED_BUILD=ON
|
||||
)
|
||||
|
||||
# Note: We are using GIT_REPOSITORY instead URL for fastdds because fastdss contains submodules
|
||||
|
@ -35,15 +26,29 @@ ExternalProject_add (
|
|||
fastdds
|
||||
GIT_REPOSITORY https://github.com/eProsima/Fast-DDS.git
|
||||
GIT_TAG ${CARLA_FASTDDS_TAG}
|
||||
CMAKE_ARGS ${PROJECT_CMAKE_FLAGS} -DTHIRDPARTY_Asio=FORCE -DTHIRDPARTY_TinyXML2=FORCE -DCOMPILE_TOOLS=OFF
|
||||
DEPENDS foonathan_memory fastcdr
|
||||
CMAKE_ARGS
|
||||
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
|
||||
-DCMAKE_INSTALL_PREFIX=${PROJECT_INSTALL_PATH}
|
||||
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
|
||||
-DBUILD_SHARED_LIBS=ON
|
||||
-DBUILD_TESTING=OFF
|
||||
-DCOMPILE_EXAMPLES=OFF
|
||||
-DCOMPILE_TOOLS=OFF
|
||||
-DTHIRDPARTY_Asio=FORCE
|
||||
-DTHIRDPARTY_fastcdr=FORCE
|
||||
-DTHIRDPARTY_TinyXML2=FORCE
|
||||
-DSQLITE3_SUPPORT=OFF
|
||||
DEPENDS foonathan_memory
|
||||
)
|
||||
|
||||
ExternalProject_Add (
|
||||
carla-ros2-native-lib
|
||||
DEPENDS fastdds
|
||||
SOURCE_DIR ${PROJECT_SOURCE_DIR}/LibCarlaRos2Native
|
||||
CMAKE_ARGS ${PROJECT_CMAKE_FLAGS}
|
||||
CMAKE_ARGS
|
||||
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
|
||||
-DCMAKE_INSTALL_PREFIX=${PROJECT_INSTALL_PATH}
|
||||
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
|
||||
)
|
||||
|
||||
set (CARLA_PLUGIN_BINARY_PATH ${CMAKE_SOURCE_DIR}/Unreal/CarlaUnreal/Plugins/Carla/Binaries/Linux)
|
||||
|
|
|
@ -176,7 +176,7 @@ public class Carla :
|
|||
RuntimeDependencies.Add(Path.Combine(CarlaPluginBinariesLinuxPath, "libfoonathan_memory-0.7.3.so"));
|
||||
RuntimeDependencies.Add(Path.Combine(CarlaPluginBinariesLinuxPath, "libfastcdr.so"));
|
||||
RuntimeDependencies.Add(Path.Combine(CarlaPluginBinariesLinuxPath, "libfastcdr.so.1"));
|
||||
RuntimeDependencies.Add(Path.Combine(CarlaPluginBinariesLinuxPath, "libfastcdr.so.1.1.1"));
|
||||
RuntimeDependencies.Add(Path.Combine(CarlaPluginBinariesLinuxPath, "libfastcdr.so.1.1.0"));
|
||||
RuntimeDependencies.Add(Path.Combine(CarlaPluginBinariesLinuxPath, "libfastrtps.so"));
|
||||
RuntimeDependencies.Add(Path.Combine(CarlaPluginBinariesLinuxPath, "libfastrtps.so.2.11"));
|
||||
RuntimeDependencies.Add(Path.Combine(CarlaPluginBinariesLinuxPath, "libfastrtps.so.2.11.2"));
|
||||
|
|
Loading…
Reference in New Issue