UE-side build system progress + disable PhysX preemtively.
This commit is contained in:
parent
19680dcc1d
commit
fb3d37fc50
223
CMakeLists.txt
223
CMakeLists.txt
|
@ -133,7 +133,7 @@ endif ()
|
|||
|
||||
if (BUILD_LIBCARLA_SERVER)
|
||||
|
||||
project (libcarla-server)
|
||||
project (carla-server)
|
||||
|
||||
set (LIBCARLA_SERVER_INCLUDE_PATHS
|
||||
${LIBCARLA_SOURCE_PATH}
|
||||
|
@ -141,73 +141,107 @@ if (BUILD_LIBCARLA_SERVER)
|
|||
${RPCLIB_INCLUDE_PATH}
|
||||
)
|
||||
|
||||
file(GLOB LIBCARLA_SERVER_SOURCES
|
||||
${LIBCARLA_SOURCE_PATH}/carla/*.h
|
||||
file (
|
||||
GLOB
|
||||
LIBCARLA_SERVER_SOURCES
|
||||
${LIBCARLA_SOURCE_PATH}/carla/Buffer.cpp
|
||||
${LIBCARLA_SOURCE_PATH}/carla/Exception.cpp
|
||||
${LIBCARLA_SOURCE_PATH}/carla/geom/*.cpp
|
||||
${LIBCARLA_SOURCE_PATH}/carla/geom/*.h
|
||||
${LIBCARLA_SOURCE_PATH}/carla/opendrive/*.cpp
|
||||
${LIBCARLA_SOURCE_PATH}/carla/opendrive/*.h
|
||||
${LIBCARLA_SOURCE_PATH}/carla/opendrive/parser/*.cpp
|
||||
${LIBCARLA_SOURCE_PATH}/carla/opendrive/parser/*.h
|
||||
${LIBCARLA_SOURCE_PATH}/carla/road/*.cpp
|
||||
${LIBCARLA_SOURCE_PATH}/carla/road/*.h
|
||||
${LIBCARLA_SOURCE_PATH}/carla/road/element/*.cpp
|
||||
${LIBCARLA_SOURCE_PATH}/carla/road/element/*.h
|
||||
${LIBCARLA_SOURCE_PATH}/carla/road/general/*.cpp
|
||||
${LIBCARLA_SOURCE_PATH}/carla/road/general/*.h
|
||||
${LIBCARLA_SOURCE_PATH}/carla/road/object/*.cpp
|
||||
${LIBCARLA_SOURCE_PATH}/carla/road/object/*.h
|
||||
${LIBCARLA_SOURCE_PATH}/carla/road/signal/*.cpp
|
||||
${LIBCARLA_SOURCE_PATH}/carla/road/signal/*.h
|
||||
${LIBCARLA_SOURCE_PATH}/carla/rpc/*.cpp
|
||||
${LIBCARLA_SOURCE_PATH}/carla/sensor/s11n/SensorHeaderSerializer.cpp
|
||||
${LIBCARLA_SOURCE_PATH}/carla/streaming/detail/*.cpp
|
||||
${LIBCARLA_SOURCE_PATH}/carla/streaming/detail/tcp/*.cpp
|
||||
${LIBCARLA_SOURCE_PATH}/carla/multigpu/*.cpp
|
||||
)
|
||||
|
||||
file (
|
||||
GLOB
|
||||
LIBCARLA_SERVER_SOURCES_THIRD_PARTY
|
||||
${LIBCARLA_THIRD_PARTY_SOURCE_PATH}/odrSpiral/*.cpp
|
||||
${LIBCARLA_THIRD_PARTY_SOURCE_PATH}/moodycamel/*.cpp
|
||||
${LIBCARLA_THIRD_PARTY_SOURCE_PATH}/pugixml/*.cpp
|
||||
)
|
||||
|
||||
file (
|
||||
GLOB
|
||||
LIBCARLA_SERVER_HEADERS
|
||||
${LIBCARLA_SOURCE_PATH}/carla/*.h
|
||||
${LIBCARLA_SOURCE_PATH}/carla/geom/*.h
|
||||
${LIBCARLA_SOURCE_PATH}/carla/opendrive/*.h
|
||||
${LIBCARLA_SOURCE_PATH}/carla/opendrive/parser/*.h
|
||||
${LIBCARLA_SOURCE_PATH}/carla/road/*.h
|
||||
${LIBCARLA_SOURCE_PATH}/carla/road/element/*.h
|
||||
${LIBCARLA_SOURCE_PATH}/carla/road/general/*.h
|
||||
${LIBCARLA_SOURCE_PATH}/carla/road/object/*.h
|
||||
${LIBCARLA_SOURCE_PATH}/carla/road/signal/*.h
|
||||
${LIBCARLA_SOURCE_PATH}/carla/rpc/*.h
|
||||
${LIBCARLA_SOURCE_PATH}/carla/sensor/*.h
|
||||
${LIBCARLA_SOURCE_PATH}/carla/sensor/s11n/*.h
|
||||
${LIBCARLA_SOURCE_PATH}/carla/sensor/s11n/SensorHeaderSerializer.cpp
|
||||
${LIBCARLA_SOURCE_PATH}/carla/streaming/*.h
|
||||
${LIBCARLA_SOURCE_PATH}/carla/streaming/detail/*.cpp
|
||||
${LIBCARLA_SOURCE_PATH}/carla/streaming/detail/*.h
|
||||
${LIBCARLA_SOURCE_PATH}/carla/streaming/detail/tcp/*.cpp
|
||||
${LIBCARLA_SOURCE_PATH}/carla/streaming/low_level/*.h
|
||||
${LIBCARLA_SOURCE_PATH}/carla/multigpu/*.h
|
||||
${LIBCARLA_SOURCE_PATH}/carla/multigpu/*.cpp
|
||||
|
||||
${LIBCARLA_THIRD_PARTY_SOURCE_PATH}/odrSpiral/*.cpp
|
||||
${LIBCARLA_THIRD_PARTY_SOURCE_PATH}/odrSpiral/*.h
|
||||
${LIBCARLA_THIRD_PARTY_SOURCE_PATH}/moodycamel/*.cpp
|
||||
${LIBCARLA_THIRD_PARTY_SOURCE_PATH}/moodycamel/*.h
|
||||
${LIBCARLA_THIRD_PARTY_SOURCE_PATH}/pugixml/*.cpp
|
||||
${LIBCARLA_THIRD_PARTY_SOURCE_PATH}/pugixml/*.hpp
|
||||
)
|
||||
|
||||
file (
|
||||
GLOB
|
||||
LIBCARLA_SERVER_HEADERS_THIRD_PARTY
|
||||
${LIBCARLA_THIRD_PARTY_SOURCE_PATH}/odrSpiral/*.h
|
||||
${LIBCARLA_THIRD_PARTY_SOURCE_PATH}/moodycamel/*.h
|
||||
${LIBCARLA_THIRD_PARTY_SOURCE_PATH}/pugixml/*.hpp
|
||||
)
|
||||
|
||||
add_library (
|
||||
libcarla-server STATIC ${LIBCARLA_SERVER_SOURCES}
|
||||
carla-server STATIC
|
||||
${LIBCARLA_SERVER_HEADERS}
|
||||
${LIBCARLA_SERVER_SOURCES}
|
||||
${LIBCARLA_SERVER_HEADERS_THIRD_PARTY}
|
||||
${LIBCARLA_SERVER_SOURCES_THIRD_PARTY}
|
||||
)
|
||||
|
||||
target_compile_options (
|
||||
libcarla-server PRIVATE /EHsc
|
||||
carla-server PRIVATE
|
||||
/EHsc
|
||||
)
|
||||
|
||||
target_include_directories (
|
||||
libcarla-server PRIVATE ${LIBCARLA_SERVER_INCLUDE_PATHS}
|
||||
carla-server PRIVATE
|
||||
${LIBCARLA_SERVER_INCLUDE_PATHS}
|
||||
)
|
||||
|
||||
target_compile_definitions (
|
||||
libcarla-server PRIVATE
|
||||
carla-server PRIVATE
|
||||
${CARLA_COMMON_DEFINITIONS}
|
||||
)
|
||||
|
||||
install (TARGETS carla-server DESTINATION lib)
|
||||
|
||||
foreach (HEADER ${LIBCARLA_SERVER_HEADERS})
|
||||
cmake_path (GET HEADER PARENT_PATH HEADER_PARENT)
|
||||
cmake_path (RELATIVE_PATH HEADER_PARENT BASE_DIRECTORY ${LIBCARLA_SOURCE_PATH}/carla OUTPUT_VARIABLE HEADER_RELATIVE)
|
||||
install (FILES ${HEADER} DESTINATION include/carla/${HEADER_RELATIVE})
|
||||
endforeach ()
|
||||
|
||||
endif ()
|
||||
|
||||
|
||||
|
||||
if (BUILD_LIBCARLA_CLIENT)
|
||||
|
||||
project (libcarla-client)
|
||||
project (carla-client)
|
||||
|
||||
set (LIBCARLA_CLIENT_INCLUDE_PATHS
|
||||
set (
|
||||
LIBCARLA_CLIENT_INCLUDE_PATHS
|
||||
${LIBCARLA_SOURCE_PATH}
|
||||
${BOOST_INCLUDE_PATH}
|
||||
${RPCLIB_INCLUDE_PATH}
|
||||
|
@ -215,80 +249,109 @@ if (BUILD_LIBCARLA_CLIENT)
|
|||
${LIBPNG_INCLUDE_PATH}
|
||||
)
|
||||
|
||||
file (GLOB LIBCARLA_CLIENT_SOURCES
|
||||
file (
|
||||
GLOB
|
||||
LIBCARLA_CLIENT_HEADERS
|
||||
${LIBCARLA_SOURCE_PATH}/carla/*.h
|
||||
${LIBCARLA_SOURCE_PATH}/carla/*.cpp
|
||||
${LIBCARLA_SOURCE_PATH}/carla/client/*.h
|
||||
${LIBCARLA_SOURCE_PATH}/carla/client/*.cpp
|
||||
${LIBCARLA_SOURCE_PATH}carla/client/detail/*.cpp
|
||||
${LIBCARLA_SOURCE_PATH}carla/client/detail/*.h
|
||||
${LIBCARLA_SOURCE_PATH}carla/geom/*.cpp
|
||||
${LIBCARLA_SOURCE_PATH}carla/geom/*.h
|
||||
${LIBCARLA_SOURCE_PATH}carla/image/*.cpp
|
||||
${LIBCARLA_SOURCE_PATH}carla/image/*.h
|
||||
${LIBCARLA_SOURCE_PATH}carla/nav/*.cpp
|
||||
${LIBCARLA_SOURCE_PATH}carla/nav/*.h
|
||||
${LIBCARLA_SOURCE_PATH}carla/opendrive/*.cpp
|
||||
${LIBCARLA_SOURCE_PATH}carla/opendrive/*.h
|
||||
${LIBCARLA_SOURCE_PATH}carla/opendrive/parser/*.cpp
|
||||
${LIBCARLA_SOURCE_PATH}carla/opendrive/parser/*.h
|
||||
${LIBCARLA_SOURCE_PATH}carla/pointcloud/*.cpp
|
||||
${LIBCARLA_SOURCE_PATH}carla/pointcloud/*.h
|
||||
${LIBCARLA_SOURCE_PATH}carla/profiler/*.h
|
||||
${LIBCARLA_SOURCE_PATH}carla/road/*.cpp
|
||||
${LIBCARLA_SOURCE_PATH}carla/road/*.h
|
||||
${LIBCARLA_SOURCE_PATH}carla/road/element/*.cpp
|
||||
${LIBCARLA_SOURCE_PATH}carla/road/element/*.h
|
||||
${LIBCARLA_SOURCE_PATH}carla/road/general/*.cpp
|
||||
${LIBCARLA_SOURCE_PATH}carla/road/general/*.h
|
||||
${LIBCARLA_SOURCE_PATH}carla/road/object/*.cpp
|
||||
${LIBCARLA_SOURCE_PATH}carla/road/object/*.h
|
||||
${LIBCARLA_SOURCE_PATH}carla/road/signal/*.cpp
|
||||
${LIBCARLA_SOURCE_PATH}carla/road/signal/*.h
|
||||
${LIBCARLA_SOURCE_PATH}carla/rpc/*.cpp
|
||||
${LIBCARLA_SOURCE_PATH}carla/rpc/*.h
|
||||
${LIBCARLA_SOURCE_PATH}carla/rss/*.cpp
|
||||
${LIBCARLA_SOURCE_PATH}carla/rss/*.h
|
||||
${LIBCARLA_SOURCE_PATH}carla/sensor/*.cpp
|
||||
${LIBCARLA_SOURCE_PATH}carla/sensor/*.h
|
||||
${LIBCARLA_SOURCE_PATH}carla/sensor/data/*.cpp
|
||||
${LIBCARLA_SOURCE_PATH}carla/sensor/data/*.h
|
||||
${LIBCARLA_SOURCE_PATH}carla/sensor/s11n/*.cpp
|
||||
${LIBCARLA_SOURCE_PATH}carla/sensor/s11n/*.h
|
||||
${LIBCARLA_SOURCE_PATH}carla/streaming/*.cpp
|
||||
${LIBCARLA_SOURCE_PATH}carla/streaming/*.h
|
||||
${LIBCARLA_SOURCE_PATH}carla/streaming/detail/*.cpp
|
||||
${LIBCARLA_SOURCE_PATH}carla/streaming/detail/*.h
|
||||
${LIBCARLA_SOURCE_PATH}carla/streaming/detail/tcp/*.cpp
|
||||
${LIBCARLA_SOURCE_PATH}carla/streaming/detail/tcp/*.h
|
||||
${LIBCARLA_SOURCE_PATH}carla/streaming/low_level/*.cpp
|
||||
${LIBCARLA_SOURCE_PATH}carla/streaming/low_level/*.h
|
||||
${LIBCARLA_SOURCE_PATH}carla/multigpu/*.cpp
|
||||
${LIBCARLA_SOURCE_PATH}carla/multigpu/*.h
|
||||
${LIBCARLA_SOURCE_PATH}carla/trafficmanager/*.cpp
|
||||
${LIBCARLA_SOURCE_PATH}carla/trafficmanager/*.h
|
||||
${LIBCARLA_SOURCE_PATH}/carla/client/detail/*.h
|
||||
${LIBCARLA_SOURCE_PATH}/carla/geom/*.h
|
||||
${LIBCARLA_SOURCE_PATH}/carla/image/*.h
|
||||
${LIBCARLA_SOURCE_PATH}/carla/nav/*.h
|
||||
${LIBCARLA_SOURCE_PATH}/carla/opendrive/*.h
|
||||
${LIBCARLA_SOURCE_PATH}/carla/opendrive/parser/*.h
|
||||
${LIBCARLA_SOURCE_PATH}/carla/pointcloud/*.h
|
||||
${LIBCARLA_SOURCE_PATH}/carla/profiler/*.h
|
||||
${LIBCARLA_SOURCE_PATH}/carla/road/*.h
|
||||
${LIBCARLA_SOURCE_PATH}/carla/road/element/*.h
|
||||
${LIBCARLA_SOURCE_PATH}/carla/road/general/*.h
|
||||
${LIBCARLA_SOURCE_PATH}/carla/road/object/*.h
|
||||
${LIBCARLA_SOURCE_PATH}/carla/road/signal/*.h
|
||||
${LIBCARLA_SOURCE_PATH}/carla/rpc/*.h
|
||||
${LIBCARLA_SOURCE_PATH}/carla/rss/*.h
|
||||
${LIBCARLA_SOURCE_PATH}/carla/sensor/*.h
|
||||
${LIBCARLA_SOURCE_PATH}/carla/sensor/data/*.h
|
||||
${LIBCARLA_SOURCE_PATH}/carla/sensor/s11n/*.h
|
||||
${LIBCARLA_SOURCE_PATH}/carla/streaming/*.h
|
||||
${LIBCARLA_SOURCE_PATH}/carla/streaming/detail/*.h
|
||||
${LIBCARLA_SOURCE_PATH}/carla/streaming/detail/tcp/*.h
|
||||
${LIBCARLA_SOURCE_PATH}/carla/streaming/low_level/*.h
|
||||
${LIBCARLA_SOURCE_PATH}/carla/multigpu/*.h
|
||||
${LIBCARLA_SOURCE_PATH}/carla/trafficmanager/*.h
|
||||
)
|
||||
|
||||
${LIBCARLA_THIRD_PARTY_SOURCE_PATH}/odrSpiral/*.cpp
|
||||
file (
|
||||
GLOB
|
||||
LIBCARLA_CLIENT_HEADERS_THIRD_PARTY
|
||||
${LIBCARLA_THIRD_PARTY_SOURCE_PATH}/odrSpiral/*.h
|
||||
${LIBCARLA_THIRD_PARTY_SOURCE_PATH}/moodycamel/*.h
|
||||
${LIBCARLA_THIRD_PARTY_SOURCE_PATH}/pugixml/*.cpp
|
||||
${LIBCARLA_THIRD_PARTY_SOURCE_PATH}/pugixml/*.hpp
|
||||
${LIBCARLA_THIRD_PARTY_SOURCE_PATH}/pugixml/*.h
|
||||
)
|
||||
|
||||
file (
|
||||
GLOB
|
||||
LIBCARLA_CLIENT_SOURCES
|
||||
${LIBCARLA_SOURCE_PATH}/carla/*.cpp
|
||||
${LIBCARLA_SOURCE_PATH}/carla/client/*.cpp
|
||||
${LIBCARLA_SOURCE_PATH}/carla/client/detail/*.cpp
|
||||
${LIBCARLA_SOURCE_PATH}/carla/geom/*.cpp
|
||||
${LIBCARLA_SOURCE_PATH}/carla/image/*.cpp
|
||||
${LIBCARLA_SOURCE_PATH}/carla/nav/*.cpp
|
||||
${LIBCARLA_SOURCE_PATH}/carla/opendrive/*.cpp
|
||||
${LIBCARLA_SOURCE_PATH}/carla/opendrive/parser/*.cpp
|
||||
${LIBCARLA_SOURCE_PATH}/carla/pointcloud/*.cpp
|
||||
${LIBCARLA_SOURCE_PATH}/carla/road/*.cpp
|
||||
${LIBCARLA_SOURCE_PATH}/carla/road/element/*.cpp
|
||||
${LIBCARLA_SOURCE_PATH}/carla/road/general/*.cpp
|
||||
${LIBCARLA_SOURCE_PATH}/carla/road/object/*.cpp
|
||||
${LIBCARLA_SOURCE_PATH}/carla/road/signal/*.cpp
|
||||
${LIBCARLA_SOURCE_PATH}/carla/rpc/*.cpp
|
||||
${LIBCARLA_SOURCE_PATH}/carla/rss/*.cpp
|
||||
${LIBCARLA_SOURCE_PATH}/carla/sensor/*.cpp
|
||||
${LIBCARLA_SOURCE_PATH}/carla/sensor/data/*.cpp
|
||||
${LIBCARLA_SOURCE_PATH}/carla/sensor/s11n/*.cpp
|
||||
${LIBCARLA_SOURCE_PATH}/carla/streaming/*.cpp
|
||||
${LIBCARLA_SOURCE_PATH}/carla/streaming/detail/*.cpp
|
||||
${LIBCARLA_SOURCE_PATH}/carla/streaming/detail/tcp/*.cpp
|
||||
${LIBCARLA_SOURCE_PATH}/carla/streaming/low_level/*.cpp
|
||||
${LIBCARLA_SOURCE_PATH}/carla/multigpu/*.cpp
|
||||
${LIBCARLA_SOURCE_PATH}/carla/trafficmanager/*.cpp
|
||||
)
|
||||
|
||||
file (
|
||||
GLOB
|
||||
LIBCARLA_CLIENT_SOURCES_THIRD_PARTY
|
||||
${LIBCARLA_THIRD_PARTY_SOURCE_PATH}/odrSpiral/*.cpp
|
||||
${LIBCARLA_THIRD_PARTY_SOURCE_PATH}/pugixml/*.cpp
|
||||
)
|
||||
|
||||
add_library (
|
||||
libcarla-client STATIC ${LIBCARLA_CLIENT_SOURCES}
|
||||
carla-client STATIC
|
||||
${LIBCARLA_CLIENT_HEADERS}
|
||||
${LIBCARLA_CLIENT_SOURCES}
|
||||
${LIBCARLA_CLIENT_HEADERS_THIRD_PARTY}
|
||||
${LIBCARLA_CLIENT_SOURCES_THIRD_PARTY}
|
||||
)
|
||||
|
||||
target_include_directories (
|
||||
libcarla-client PRIVATE ${LIBCARLA_CLIENT_INCLUDE_PATHS}
|
||||
carla-client PRIVATE
|
||||
${LIBCARLA_CLIENT_INCLUDE_PATHS}
|
||||
)
|
||||
|
||||
target_compile_definitions (
|
||||
libcarla-client PRIVATE
|
||||
carla-client PRIVATE
|
||||
${CARLA_COMMON_DEFINITIONS}
|
||||
)
|
||||
|
||||
install (TARGETS carla-client DESTINATION lib)
|
||||
|
||||
foreach (HEADER ${LIBCARLA_CLIENT_HEADERS})
|
||||
cmake_path (GET HEADER PARENT_PATH HEADER_PARENT)
|
||||
cmake_path (RELATIVE_PATH HEADER_PARENT BASE_DIRECTORY ${LIBCARLA_SOURCE_PATH}/carla OUTPUT_VARIABLE HEADER_RELATIVE)
|
||||
install (FILES ${HEADER} DESTINATION include/carla/${HEADER_RELATIVE})
|
||||
endforeach ()
|
||||
|
||||
endif ()
|
||||
|
||||
|
||||
|
|
97
Configure.py
97
Configure.py
|
@ -4,6 +4,7 @@ import subprocess, tarfile, zipfile, argparse, requests, psutil, shutil, glob, j
|
|||
|
||||
# Constants:
|
||||
EXE_EXT = '.exe' if os.name == 'nt' else ''
|
||||
LIB_PREFIX = '' if os.name == 'nt' else 'lib'
|
||||
LIB_EXT = '.lib' if os.name == 'nt' else '.a'
|
||||
OBJ_EXT = '.obj' if os.name == 'nt' else '.o'
|
||||
SHELL_EXT = '.bat' if os.name == 'nt' else ''
|
||||
|
@ -153,6 +154,15 @@ AddDirective(
|
|||
AddDirective(
|
||||
'chrono',
|
||||
'Whether to enable Chrono.')
|
||||
AddDirective(
|
||||
'carsim',
|
||||
'Whether to enable CarSim')
|
||||
AddDirective(
|
||||
'ros2',
|
||||
'Whether to enable ROS2')
|
||||
AddDirective(
|
||||
'unity-build',
|
||||
'Whether to enable Unity Build for Unreal Engine projects.')
|
||||
AddDirective(
|
||||
'osm2odr',
|
||||
'Whether to enable OSM2ODR.')
|
||||
|
@ -229,7 +239,6 @@ def SyncArgs():
|
|||
|
||||
ARGV = SyncArgs()
|
||||
SEQUENTIAL = ARGV.configure_sequential
|
||||
ENABLE_CHRONO = ARGV.chrono
|
||||
ENABLE_OSM2ODR = ARGV.osm2odr or ARGV.python_api
|
||||
ENABLE_OSM_WORLD_RENDERER = ARGV.osm_world_renderer
|
||||
ENABLE_PYTHON_API = ARGV.python_api
|
||||
|
@ -240,7 +249,14 @@ ENABLE_LIBCARLA = any([
|
|||
ENABLE_LIBCARLA_CLIENT,
|
||||
ENABLE_LIBCARLA_SERVER,
|
||||
])
|
||||
|
||||
ENABLE_CARSIM = ARGV.carsim
|
||||
ENABLE_CHRONO = ARGV.chrono
|
||||
ENABLE_ROS2 = ARGV.ros2
|
||||
ENABLE_UNITY_BUILD = ARGV.unity_build
|
||||
ENABLE_NVIDIA_OMNIVERSE = ARGV.nv_omniverse
|
||||
ENABLE_RSS = ARGV.rss
|
||||
|
||||
UPDATE_DEPENDENCIES = ARGV.update_deps
|
||||
BUILD_DEPENDENCIES = ARGV.build_deps
|
||||
PARALLELISM = ARGV.parallelism
|
||||
|
@ -249,8 +265,8 @@ CARLA_VERSION_STRING = ARGV.version
|
|||
BUILD_PATH = Path(ARGV.build_path)
|
||||
LOG_PATH = BUILD_PATH / 'BuildLogs'
|
||||
DEPENDENCIES_PATH = BUILD_PATH / 'Dependencies'
|
||||
LIBCARLA_BUILD_PATH = BUILD_PATH / 'libcarla-build'
|
||||
LIBCARLA_INSTALL_PATH = BUILD_PATH / 'libcarla-install'
|
||||
LIBCARLA_BUILD_PATH = BUILD_PATH / 'LibCarla'
|
||||
LIBCARLA_INSTALL_PATH = WORKSPACE_PATH / 'Install' / 'LibCarla'
|
||||
# Language options
|
||||
C_COMPILER = ARGV.c_compiler
|
||||
CPP_COMPILER = ARGV.cpp_compiler
|
||||
|
@ -302,7 +318,7 @@ ZLIB_BUILD_PATH = DEPENDENCIES_PATH / 'zlib-build'
|
|||
ZLIB_INSTALL_PATH = DEPENDENCIES_PATH / 'zlib-install'
|
||||
ZLIB_INCLUDE_PATH = ZLIB_INSTALL_PATH / 'include'
|
||||
ZLIB_LIBRARY_PATH = ZLIB_INSTALL_PATH / 'lib'
|
||||
ZLIB_LIB_PATH = ZLIB_LIBRARY_PATH / f'zlib{LIB_EXT}'
|
||||
ZLIB_LIB_PATH = ZLIB_LIBRARY_PATH / f'{LIB_PREFIX}zlib{LIB_EXT}'
|
||||
# LibPNG
|
||||
LIBPNG_SOURCE_PATH = DEPENDENCIES_PATH / 'libpng-source'
|
||||
LIBPNG_BUILD_PATH = DEPENDENCIES_PATH / 'libpng-build'
|
||||
|
@ -314,7 +330,7 @@ SQLITE_SOURCE_PATH = DEPENDENCIES_PATH / 'sqlite-source'
|
|||
SQLITE_BUILD_PATH = DEPENDENCIES_PATH / 'sqlite-build'
|
||||
SQLITE_LIBRARY_PATH = SQLITE_BUILD_PATH
|
||||
SQLITE_INCLUDE_PATH = SQLITE_SOURCE_PATH
|
||||
SQLITE_LIB_PATH = SQLITE_BUILD_PATH / f'sqlite{LIB_EXT}'
|
||||
SQLITE_LIB_PATH = SQLITE_BUILD_PATH / f'{LIB_PREFIX}sqlite{LIB_EXT}'
|
||||
SQLITE_EXE_PATH = SQLITE_BUILD_PATH / f'sqlite{EXE_EXT}'
|
||||
# Proj
|
||||
PROJ_SOURCE_PATH = DEPENDENCIES_PATH / 'proj-source'
|
||||
|
@ -361,7 +377,13 @@ SUMO_LIBRARY_PATH = SUMO_INSTALL_PATH / 'lib'
|
|||
# Nvidia Omniverse
|
||||
NV_OMNIVERSE_PLUGIN_PATH = UNREAL_ENGINE_PATH / 'Engine' / 'Plugins' / 'Marketplace' / 'NVIDIA' / 'Omniverse'
|
||||
NV_OMNIVERSE_PATCH_PATH = PATCHES_PATH / 'omniverse_4.26'
|
||||
ENABLE_RSS = ARGV.rss
|
||||
|
||||
CARLA_UE_OPTIONAL_MODULES = (
|
||||
f'CarSim {"ON" if ENABLE_CARSIM else "OFF"}\n'
|
||||
f'Chrono {"ON" if ENABLE_CHRONO else "OFF"}\n'
|
||||
f'Ros2 {"ON" if ENABLE_ROS2 else "OFF"}\n'
|
||||
f'Unity {"ON" if ENABLE_UNITY_BUILD else "OFF"}\n'
|
||||
)
|
||||
|
||||
# Basic IO functions:
|
||||
|
||||
|
@ -784,23 +806,6 @@ def BuildLibCarlaMain(task_graph : TaskGraph):
|
|||
LIBCARLA_BUILD_PATH,
|
||||
LIBCARLA_INSTALL_PATH))
|
||||
|
||||
def BuildCarlaUEMain():
|
||||
assert UNREAL_ENGINE_PATH.exists()
|
||||
if os.name == 'nt':
|
||||
LaunchSubprocessImmediate([
|
||||
UNREAL_ENGINE_PATH / 'Engine' / 'Build' / 'BatchFiles' / 'Build.bat',
|
||||
'CarlaUE4', 'Win64', 'Development', '-WaitMutex', '-FromMsBuild',
|
||||
CARLA_UE_PATH / 'CarlaUE4.uproject'
|
||||
])
|
||||
else:
|
||||
pass
|
||||
|
||||
def BuildCarlaUE(task_graph : TaskGraph):
|
||||
Log('Building Carla Unreal Engine Editor')
|
||||
if ENABLE_NVIDIA_OMNIVERSE:
|
||||
task_graph.Add(Task('install-nv-omniverse', [], InstallNVIDIAOmniverse))
|
||||
task_graph.Add(Task('build-carla-ue', [], BuildCarlaUEMain))
|
||||
|
||||
def BuildPythonAPIMain():
|
||||
content = ''
|
||||
with open(PYTHON_API_PATH / 'setup.py.in', 'r') as file:
|
||||
|
@ -818,7 +823,47 @@ def BuildPythonAPI(task_graph : TaskGraph):
|
|||
task_graph.Add(Task('build-python-api', [ 'install-libcarla' ], BuildPythonAPIMain))
|
||||
|
||||
def SetupUnrealEngine(task_graph : TaskGraph):
|
||||
Log('Setting up Unreal Engine.')
|
||||
pass
|
||||
|
||||
def BuildCarlaUEMain():
|
||||
assert UNREAL_ENGINE_PATH.exists()
|
||||
unreal_build_tool_args = []
|
||||
if ENABLE_CARSIM:
|
||||
unreal_build_tool_args.append('-carsim')
|
||||
if ENABLE_CHRONO:
|
||||
unreal_build_tool_args.append('-chrono')
|
||||
if ENABLE_ROS2:
|
||||
unreal_build_tool_args.append('-ros2')
|
||||
if ENABLE_UNITY_BUILD:
|
||||
unreal_build_tool_args.append('-unity-build')
|
||||
if ENABLE_NVIDIA_OMNIVERSE:
|
||||
unreal_build_tool_args.append('-nv-omniverse')
|
||||
if os.name == 'nt':
|
||||
LaunchSubprocessImmediate([
|
||||
UNREAL_ENGINE_PATH / 'Engine' / 'Build' / 'BatchFiles' / 'Build.bat',
|
||||
'CarlaUE4Editor',
|
||||
'Win64',
|
||||
'Development',
|
||||
'-WaitMutex',
|
||||
'-FromMsBuild',
|
||||
CARLA_UE_PATH / 'CarlaUE4.uproject',
|
||||
], log_name = 'build-carla-ue-editor')
|
||||
LaunchSubprocessImmediate([
|
||||
UNREAL_ENGINE_PATH / 'Engine' / 'Build' / 'BatchFiles' / 'Build.bat',
|
||||
'CarlaUE4',
|
||||
'Win64',
|
||||
'Development',
|
||||
'-WaitMutex',
|
||||
'-FromMsBuild',
|
||||
CARLA_UE_PATH / 'CarlaUE4.uproject',
|
||||
], log_name = 'build-carla-ue')
|
||||
else:
|
||||
pass
|
||||
|
||||
def BuildCarlaUE(task_graph : TaskGraph):
|
||||
if ENABLE_NVIDIA_OMNIVERSE:
|
||||
task_graph.Add(Task('install-nv-omniverse', [], InstallNVIDIAOmniverse))
|
||||
task_graph.Add(Task('build-carla-ue', [ 'build-python-api' ], BuildCarlaUEMain))
|
||||
|
||||
def InstallNVIDIAOmniverse():
|
||||
filename = 'USDCarlaInterface'
|
||||
|
@ -967,7 +1012,7 @@ def BuildSQLite():
|
|||
LaunchSubprocessImmediate(cmd, log_name = 'build-sqlite-lib')
|
||||
|
||||
def FindXercesC():
|
||||
return glob.glob(f'{XERCESC_INSTALL_PATH}/**/xerces-c*{LIB_EXT}', recursive=True)[0]
|
||||
return glob.glob(f'{XERCESC_INSTALL_PATH}/**/{LIB_PREFIX}xerces-c*{LIB_EXT}', recursive=True)[0]
|
||||
|
||||
def ConfigureSUMO():
|
||||
cmd = Task.CreateCMakeConfigureDefaultCommandLine(
|
||||
|
@ -979,7 +1024,7 @@ def ConfigureSUMO():
|
|||
f'-DZLIB_INCLUDE_DIR={ZLIB_INCLUDE_PATH}',
|
||||
f'-DZLIB_LIBRARY={ZLIB_LIBRARY_PATH}',
|
||||
f'-DPROJ_INCLUDE_DIR={PROJ_INSTALL_PATH}/include',
|
||||
f'-DPROJ_LIBRARY={PROJ_INSTALL_PATH}/lib/proj{LIB_EXT}',
|
||||
f'-DPROJ_LIBRARY={PROJ_INSTALL_PATH}/lib/{LIB_PREFIX}proj{LIB_EXT}',
|
||||
f'-DXercesC_INCLUDE_DIR={XERCESC_INSTALL_PATH}/include',
|
||||
f'-DXercesC_LIBRARY={FindXercesC()}',
|
||||
'-DSUMO_LIBRARIES=OFF',
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
*.egg-info
|
||||
setup.py
|
||||
build
|
||||
dependencies
|
||||
dist
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"FileVersion": 3,
|
||||
"EngineAssociation": "4.26",
|
||||
"EngineAssociation": "{503B4C24-4B4B-4C8C-53F3-8AB2AC13D07B}",
|
||||
"Category": "",
|
||||
"Description": "",
|
||||
"Modules": [
|
||||
|
@ -10,7 +10,7 @@
|
|||
"LoadingPhase": "Default",
|
||||
"AdditionalDependencies": [
|
||||
"Engine",
|
||||
"PhysXVehicles",
|
||||
"ChaosVehicles",
|
||||
"Carla",
|
||||
"CoreUObject"
|
||||
]
|
||||
|
|
|
@ -98,7 +98,7 @@ MaxSubstepDeltaTime=0.010000
|
|||
MaxSubsteps=10
|
||||
SyncSceneSmoothingFactor=0.000000
|
||||
InitialAverageFrameRate=0.016667
|
||||
PhysXTreeRebuildRate=10
|
||||
# PhysXTreeRebuildRate=10
|
||||
DefaultBroadphaseSettings=(bUseMBPOnClient=False,bUseMBPOnServer=False,MBPBounds=(Min=(X=0.000000,Y=0.000000,Z=0.000000),Max=(X=0.000000,Y=0.000000,Z=0.000000),IsValid=0),MBPNumSubdivs=2)
|
||||
|
||||
[/Script/WindowsTargetPlatform.WindowsTargetSettings]
|
||||
|
|
|
@ -13,19 +13,22 @@
|
|||
"CanContainContent": true,
|
||||
"IsBetaVersion": true,
|
||||
"Installed": true,
|
||||
"Modules": [
|
||||
"Modules":
|
||||
[
|
||||
{
|
||||
"Name": "Carla",
|
||||
"Type": "Runtime",
|
||||
"LoadingPhase": "PreDefault",
|
||||
"AdditionalDependencies": [
|
||||
"AdditionalDependencies":
|
||||
[
|
||||
"Engine"
|
||||
]
|
||||
}
|
||||
],
|
||||
"Plugins": [
|
||||
"Plugins":
|
||||
[
|
||||
{
|
||||
"Name": "PhysXVehicles",
|
||||
"Name": "ChaosVehicles",
|
||||
"Enabled": true
|
||||
},
|
||||
{
|
||||
|
|
|
@ -2,80 +2,103 @@
|
|||
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using UnrealBuildTool;
|
||||
using EpicGames.Core;
|
||||
using System.Diagnostics;
|
||||
|
||||
public class Carla : ModuleRules
|
||||
public class Carla :
|
||||
ModuleRules
|
||||
{
|
||||
bool UsingCarSim = false;
|
||||
bool UsingChrono = false;
|
||||
bool UsingPytorch = false;
|
||||
bool UsingRos2 = false;
|
||||
private bool IsWindows(ReadOnlyTargetRules Target)
|
||||
[CommandLine("-carsim")]
|
||||
bool EnableCarSim = false;
|
||||
|
||||
[CommandLine("-chrono")]
|
||||
bool EnableChrono = false;
|
||||
|
||||
[CommandLine("-pytorch")]
|
||||
bool EnablePytorch = false;
|
||||
|
||||
[CommandLine("-ros2")]
|
||||
bool EnableRos2 = false;
|
||||
|
||||
[CommandLine("-carla-install-path")]
|
||||
string CarlaInstallPath = null;
|
||||
|
||||
[CommandLine("-carla-dependencies-path")]
|
||||
string CarlaDependenciesPath = null;
|
||||
|
||||
|
||||
|
||||
public static string FindLibrary(string SearchPath, params string[] Patterns)
|
||||
{
|
||||
return (Target.Platform == UnrealTargetPlatform.Win64) || (Target.Platform == UnrealTargetPlatform.Win32);
|
||||
foreach (var Pattern in Patterns)
|
||||
{
|
||||
var Candidates = Directory.GetFiles(SearchPath, Pattern);
|
||||
if (Candidates.Length == 0)
|
||||
continue;
|
||||
Array.Sort(Candidates);
|
||||
return Candidates[0];
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public Carla(ReadOnlyTargetRules Target) : base(Target)
|
||||
public Carla(ReadOnlyTargetRules Target) :
|
||||
base(Target)
|
||||
{
|
||||
var DirectoryInfo = new DirectoryInfo(ModuleDirectory);
|
||||
for (int i = 0; i != 6; ++i)
|
||||
DirectoryInfo = DirectoryInfo.Parent;
|
||||
var WorkspacePath = DirectoryInfo.ToString();
|
||||
Debug.Assert(Directory.Exists(WorkspacePath));
|
||||
|
||||
if (CarlaInstallPath == null)
|
||||
{
|
||||
Console.WriteLine("-carla-install-path was not specified, inferring...");
|
||||
CarlaInstallPath = Path.Combine(WorkspacePath, "Install", "libcarla");
|
||||
Debug.Assert(Directory.Exists(CarlaInstallPath), "Could not infer CARLA install directory.");
|
||||
}
|
||||
|
||||
if (CarlaDependenciesPath == null)
|
||||
{
|
||||
Console.WriteLine("-carla-dependencies-path was not specified, inferring...");
|
||||
CarlaDependenciesPath = Path.Combine(WorkspacePath, "Build", "Dependencies");
|
||||
Debug.Assert(Directory.Exists(CarlaDependenciesPath), "Could not infer CARLA dependencies directory.");
|
||||
}
|
||||
|
||||
bool IsWindows = Target.Platform == UnrealTargetPlatform.Win64;
|
||||
|
||||
bEnableExceptions = bEnableExceptions || IsWindows;
|
||||
PrivatePCHHeaderFile = "Carla.h";
|
||||
|
||||
if (IsWindows(Target))
|
||||
if (EnableCarSim)
|
||||
{
|
||||
bEnableExceptions = true;
|
||||
}
|
||||
|
||||
// Read config about carsim
|
||||
string CarlaPluginPath = Path.GetFullPath( ModuleDirectory );
|
||||
string ConfigDir = Path.GetFullPath(Path.Combine(CarlaPluginPath, "../../../../Config/"));
|
||||
string OptionalModulesFile = Path.Combine(ConfigDir, "OptionalModules.ini");
|
||||
string[] text = System.IO.File.ReadAllLines(OptionalModulesFile);
|
||||
foreach (string line in text)
|
||||
{
|
||||
if (line.Contains("CarSim ON"))
|
||||
{
|
||||
Console.WriteLine("Enabling carsim");
|
||||
UsingCarSim = true;
|
||||
PublicDefinitions.Add("WITH_CARSIM");
|
||||
PrivateDefinitions.Add("WITH_CARSIM");
|
||||
}
|
||||
if (line.Contains("Chrono ON"))
|
||||
|
||||
if (EnableChrono)
|
||||
{
|
||||
Console.WriteLine("Enabling chrono");
|
||||
UsingChrono = true;
|
||||
PublicDefinitions.Add("WITH_CHRONO");
|
||||
PrivateDefinitions.Add("WITH_CHRONO");
|
||||
}
|
||||
if (line.Contains("Pytorch ON"))
|
||||
|
||||
if (EnablePytorch)
|
||||
{
|
||||
Console.WriteLine("Enabling pytorch");
|
||||
UsingPytorch = true;
|
||||
PublicDefinitions.Add("WITH_PYTORCH");
|
||||
PrivateDefinitions.Add("WITH_PYTORCH");
|
||||
}
|
||||
|
||||
if (line.Contains("Ros2 ON"))
|
||||
if (EnableRos2)
|
||||
{
|
||||
Console.WriteLine("Enabling ros2");
|
||||
UsingRos2 = true;
|
||||
PublicDefinitions.Add("WITH_ROS2");
|
||||
PrivateDefinitions.Add("WITH_ROS2");
|
||||
}
|
||||
}
|
||||
|
||||
PublicIncludePaths.AddRange(
|
||||
new string[] {
|
||||
// ... add public include paths required here ...
|
||||
}
|
||||
);
|
||||
// PublicIncludePaths.AddRange(new string[] { });
|
||||
// PrivateIncludePaths.AddRange(new string[] { });
|
||||
|
||||
PrivateIncludePaths.AddRange(
|
||||
new string[] {
|
||||
// ... add other private include paths required here ...
|
||||
}
|
||||
);
|
||||
|
||||
PublicDependencyModuleNames.AddRange(
|
||||
new string[]
|
||||
PublicDependencyModuleNames.AddRange(new string[]
|
||||
{
|
||||
"Core",
|
||||
"RenderCore",
|
||||
|
@ -83,21 +106,19 @@ public class Carla : ModuleRules
|
|||
"Renderer",
|
||||
"ProceduralMeshComponent",
|
||||
"MeshDescription"
|
||||
// ... add other public dependencies that you statically link with here ...
|
||||
}
|
||||
);
|
||||
if (UsingCarSim)
|
||||
});
|
||||
|
||||
if (EnableCarSim)
|
||||
{
|
||||
PublicDependencyModuleNames.AddRange(new string[] { "CarSim" });
|
||||
PublicDependencyModuleNames.Add("CarSim");
|
||||
}
|
||||
|
||||
if (Target.Type == TargetType.Editor)
|
||||
{
|
||||
PublicDependencyModuleNames.AddRange(new string[] { "UnrealEd" });
|
||||
PublicDependencyModuleNames.Add("UnrealEd");
|
||||
}
|
||||
|
||||
PrivateDependencyModuleNames.AddRange(
|
||||
new string[]
|
||||
PrivateDependencyModuleNames.AddRange(new string[]
|
||||
{
|
||||
"AIModule",
|
||||
"AssetRegistry",
|
||||
|
@ -110,53 +131,120 @@ public class Carla : ModuleRules
|
|||
"Json",
|
||||
"JsonUtilities",
|
||||
"Landscape",
|
||||
"PhysX",
|
||||
"PhysXVehicles",
|
||||
"PhysXVehicleLib",
|
||||
"Chaos",
|
||||
"ChaosVehicles",
|
||||
"ChaosVehicleLib",
|
||||
"Slate",
|
||||
"SlateCore",
|
||||
"PhysicsCore"
|
||||
// ... add private dependencies that you statically link with here ...
|
||||
}
|
||||
);
|
||||
if (UsingCarSim)
|
||||
});
|
||||
|
||||
if (EnableCarSim)
|
||||
{
|
||||
PrivateDependencyModuleNames.AddRange(new string[] { "CarSim" });
|
||||
PrivateIncludePathModuleNames.AddRange(new string[] { "CarSim" });
|
||||
PrivateDependencyModuleNames.Add("CarSim");
|
||||
PrivateIncludePathModuleNames.Add("CarSim");
|
||||
}
|
||||
|
||||
// DynamicallyLoadedModuleNames.AddRange(new string[] { });
|
||||
|
||||
DynamicallyLoadedModuleNames.AddRange(
|
||||
new string[]
|
||||
{
|
||||
// ... add any modules that your module loads dynamically here ...
|
||||
}
|
||||
);
|
||||
var LibraryPrefix = IsWindows ? "" : "lib";
|
||||
var LibrarySuffix = IsWindows ? ".lib" : ".a";
|
||||
|
||||
AddCarlaServerDependency(Target);
|
||||
}
|
||||
Func<string, string> GetLibraryName = name =>
|
||||
{
|
||||
return LibraryPrefix + name + LibrarySuffix;
|
||||
};
|
||||
|
||||
private bool UseDebugLibs(ReadOnlyTargetRules Target)
|
||||
var LibCarlaInstallPath = CarlaInstallPath;
|
||||
var DependenciesInstallPath = CarlaDependenciesPath;
|
||||
// LibCarla
|
||||
var LibCarlaIncludePath = Path.Combine(LibCarlaInstallPath, "include");
|
||||
var LibCarlaLibPath = Path.Combine(LibCarlaInstallPath, "lib");
|
||||
var LibCarlaServerPath = Path.Combine(LibCarlaLibPath, GetLibraryName("carla-server"));
|
||||
var LibCarlaClientPath = Path.Combine(LibCarlaLibPath, GetLibraryName("carla-client"));
|
||||
// Boost
|
||||
var BoostInstallPath = Path.Combine(DependenciesInstallPath, "boost-install");
|
||||
var BoostLibPath = Path.Combine(BoostInstallPath, "lib");
|
||||
var BoostLibraryPatterns = new string[]
|
||||
{
|
||||
if (IsWindows(Target))
|
||||
GetLibraryName("*boost_asio*"),
|
||||
GetLibraryName("*boost_python*"),
|
||||
};
|
||||
var BoostLibraries =
|
||||
from Pattern in BoostLibraryPatterns
|
||||
select FindLibrary(BoostLibPath, Pattern);
|
||||
// Chrono
|
||||
var ChronoInstallPath = Path.Combine(DependenciesInstallPath, "chrono-install");
|
||||
var ChronoLibPath = Path.Combine(ChronoInstallPath, "lib");
|
||||
var ChronoLibraryNames = new string[]
|
||||
{
|
||||
// In Windows, Unreal uses the Release C++ Runtime (CRT) even in debug
|
||||
// mode, so unless we recompile the engine we cannot link the debug
|
||||
// libraries.
|
||||
return false;
|
||||
}
|
||||
else
|
||||
"ChronoEngine",
|
||||
"ChronoEngine_vehicle",
|
||||
"ChronoModels_vehicle",
|
||||
"ChronoModels_robot",
|
||||
};
|
||||
var ChronoLibraries =
|
||||
from Name in ChronoLibraryNames
|
||||
select FindLibrary(Name);
|
||||
// SQLite
|
||||
var SQLiteBuildPath = Path.Combine(DependenciesInstallPath, "sqlite-build");
|
||||
var SQLiteLibrary = FindLibrary(SQLiteBuildPath, GetLibraryName("sqlite*"));
|
||||
// RPCLib
|
||||
var RPCLibInstallPath = Path.Combine(DependenciesInstallPath, "rpclib-install");
|
||||
var RPCLibPath = Path.Combine(RPCLibInstallPath, "lib");
|
||||
var RPCLibraryPath = FindLibrary(RPCLibPath, "rpc");
|
||||
// Xerces-C
|
||||
var XercesCInstallPath = Path.Combine(DependenciesInstallPath, "xercesc-install");
|
||||
var XercesCLibPath = Path.Combine(XercesCInstallPath, "lib");
|
||||
var XercesCLibrary = FindLibrary(XercesCLibPath, "xercesc*");
|
||||
// Proj
|
||||
var ProjInstallPath = Path.Combine(DependenciesInstallPath, "proj-install");
|
||||
var ProjLibPath = Path.Combine(ProjInstallPath, "lib");
|
||||
var ProjLibrary = FindLibrary(ProjLibPath, "proj*");
|
||||
// SUMO (OSM2ODR)
|
||||
var SUMOInstallPath = Path.Combine(DependenciesInstallPath, "sumo-install");
|
||||
var SUMOLibPath = Path.Combine(SUMOInstallPath, "lib");
|
||||
var SUMOLibrary = FindLibrary(SUMOLibPath, "sumo*");
|
||||
// ZLib
|
||||
var ZLibInstallPath = Path.Combine(DependenciesInstallPath, "zlib-install");
|
||||
var ZLibLibPath = Path.Combine(ZLibInstallPath, "lib");
|
||||
var ZLibLibrary = FindLibrary(ZLibLibPath, "zlib*");
|
||||
|
||||
PublicAdditionalLibraries.AddRange(BoostLibraries);
|
||||
PublicAdditionalLibraries.AddRange(ChronoLibraries);
|
||||
PublicAdditionalLibraries.AddRange(new string[]
|
||||
{
|
||||
return false;
|
||||
SQLiteLibrary,
|
||||
RPCLibraryPath,
|
||||
XercesCLibrary,
|
||||
ProjLibrary,
|
||||
SUMOLibrary,
|
||||
ZLibLibrary,
|
||||
});
|
||||
|
||||
PublicIncludePaths.Add(LibCarlaIncludePath);
|
||||
|
||||
PrivateIncludePaths.Add(LibCarlaIncludePath);
|
||||
|
||||
PublicDefinitions.Add("BOOST_DISABLE_ABI_HEADERS");
|
||||
PublicDefinitions.Add("BOOST_TYPE_INDEX_FORCE_NO_RTTI_COMPATIBILITY");
|
||||
if (!bEnableExceptions)
|
||||
{
|
||||
PublicDefinitions.Add("ASIO_NO_EXCEPTIONS");
|
||||
PublicDefinitions.Add("BOOST_NO_EXCEPTIONS");
|
||||
PublicDefinitions.Add("LIBCARLA_NO_EXCEPTIONS");
|
||||
PublicDefinitions.Add("PUGIXML_NO_EXCEPTIONS");
|
||||
}
|
||||
}
|
||||
|
||||
#if false
|
||||
private void AddDynamicLibrary(string library)
|
||||
{
|
||||
PublicAdditionalLibraries.Add(library);
|
||||
RuntimeDependencies.Add(library);
|
||||
PublicDelayLoadDLLs.Add(library);
|
||||
}
|
||||
|
||||
private void AddDllDependency(string PathToFolder, string DllName)
|
||||
{
|
||||
string Source = Path.Combine(PathToFolder, DllName);
|
||||
|
@ -164,33 +252,16 @@ public class Carla : ModuleRules
|
|||
RuntimeDependencies.Add(Destination, Source);
|
||||
}
|
||||
|
||||
delegate string ADelegate(string s);
|
||||
|
||||
private void AddBoostLibs(string LibPath)
|
||||
{
|
||||
string [] files = Directory.GetFiles(LibPath, "*boost*.lib");
|
||||
foreach (string file in files) PublicAdditionalLibraries.Add(file);
|
||||
}
|
||||
|
||||
private void AddCarlaServerDependency(ReadOnlyTargetRules Target)
|
||||
{
|
||||
string LibCarlaInstallPath = Path.GetFullPath(Path.Combine(ModuleDirectory, "../../CarlaDependencies"));
|
||||
|
||||
ADelegate GetLibName = (string BaseName) => {
|
||||
if (IsWindows(Target))
|
||||
{
|
||||
return BaseName + ".lib";
|
||||
}
|
||||
else
|
||||
{
|
||||
return "lib" + BaseName + ".a";
|
||||
}
|
||||
};
|
||||
|
||||
// Link dependencies.
|
||||
if (IsWindows(Target))
|
||||
if (IsWindows)
|
||||
{
|
||||
AddBoostLibs(Path.Combine(LibCarlaInstallPath, "lib"));
|
||||
foreach (string file in Directory.GetFiles(Path.Combine(LibCarlaInstallPath, "lib"), "*boost*.lib"))
|
||||
PublicAdditionalLibraries.Add(file);
|
||||
|
||||
PublicAdditionalLibraries.Add(Path.Combine(LibCarlaInstallPath, "lib", GetLibName("rpc")));
|
||||
|
||||
if (UseDebugLibs(Target))
|
||||
|
@ -201,7 +272,7 @@ public class Carla : ModuleRules
|
|||
{
|
||||
PublicAdditionalLibraries.Add(Path.Combine(LibCarlaInstallPath, "lib", GetLibName("carla_server")));
|
||||
}
|
||||
if (UsingChrono)
|
||||
if (EnableChrono)
|
||||
{
|
||||
PublicAdditionalLibraries.Add(Path.Combine(LibCarlaInstallPath, "lib", GetLibName("ChronoEngine")));
|
||||
PublicAdditionalLibraries.Add(Path.Combine(LibCarlaInstallPath, "lib", GetLibName("ChronoEngine_vehicle")));
|
||||
|
@ -232,7 +303,7 @@ public class Carla : ModuleRules
|
|||
{
|
||||
PublicAdditionalLibraries.Add(Path.Combine(LibCarlaInstallPath, "lib", GetLibName("carla_server")));
|
||||
}
|
||||
if (UsingChrono)
|
||||
if (EnableChrono)
|
||||
{
|
||||
AddDynamicLibrary(Path.Combine(LibCarlaInstallPath, "lib", "libChronoEngine.so"));
|
||||
AddDynamicLibrary(Path.Combine(LibCarlaInstallPath, "lib", "libChronoEngine_vehicle.so"));
|
||||
|
@ -242,7 +313,7 @@ public class Carla : ModuleRules
|
|||
bUseRTTI = true;
|
||||
}
|
||||
|
||||
if (UsingPytorch)
|
||||
if (EnablePytorch)
|
||||
{
|
||||
PublicAdditionalLibraries.Add(Path.Combine(LibCarlaInstallPath, "lib", GetLibName("carla_pytorch")));
|
||||
|
||||
|
@ -316,7 +387,7 @@ public class Carla : ModuleRules
|
|||
PublicAdditionalLibraries.Add("/usr/lib/x86_64-linux-gnu/libpython3.9.so");
|
||||
}
|
||||
|
||||
if (UsingRos2)
|
||||
if (EnableRos2)
|
||||
{
|
||||
PublicAdditionalLibraries.Add(Path.Combine(LibCarlaInstallPath, "lib", GetLibName("carla_fastdds")));
|
||||
|
||||
|
@ -351,4 +422,5 @@ public class Carla : ModuleRules
|
|||
PublicDefinitions.Add("BOOST_DISABLE_ABI_HEADERS");
|
||||
PublicDefinitions.Add("BOOST_TYPE_INDEX_FORCE_NO_RTTI_COMPATIBILITY");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -13,8 +13,7 @@
|
|||
#include "DrawDebugHelpers.h"
|
||||
#include "Kismet/KismetSystemLibrary.h"
|
||||
|
||||
#include "PhysXPublic.h"
|
||||
#include "PhysXVehicleManager.h"
|
||||
#if 0 // @CARLAUE5
|
||||
#include "TireConfig.h"
|
||||
#include "VehicleWheel.h"
|
||||
|
||||
|
@ -1134,3 +1133,4 @@ void ACarlaWheeledVehicle::SetPhysicsConstraintAngle(
|
|||
{
|
||||
Component->ConstraintInstance.AngularRotationOffset = NewAngle;
|
||||
}
|
||||
#endif
|
|
@ -6,14 +6,12 @@
|
|||
|
||||
#include "WheeledVehicleMovementComponentNW.h"
|
||||
#include "PhysicsPublic.h"
|
||||
#include "PhysXPublic.h"
|
||||
#include "PhysXVehicleManager.h"
|
||||
#include "Components/PrimitiveComponent.h"
|
||||
#include "Logging/MessageLog.h"
|
||||
|
||||
UWheeledVehicleMovementComponentNW::UWheeledVehicleMovementComponentNW(const FObjectInitializer& ObjectInitializer) : Super(ObjectInitializer)
|
||||
{
|
||||
// grab default values from physx
|
||||
#if 0 // @CARLAUE5
|
||||
PxVehicleEngineData DefEngineData;
|
||||
EngineSetup.MOI = DefEngineData.mMOI;
|
||||
EngineSetup.MaxRPM = OmegaToRPM(DefEngineData.mMaxOmega);
|
||||
|
@ -65,11 +63,13 @@ UWheeledVehicleMovementComponentNW::UWheeledVehicleMovementComponentNW(const FOb
|
|||
DifferentialSetup.SetNum(NbrWheels);
|
||||
|
||||
IdleBrakeInput = 10;
|
||||
#endif
|
||||
}
|
||||
|
||||
#if WITH_EDITOR
|
||||
void UWheeledVehicleMovementComponentNW::PostEditChangeProperty(struct FPropertyChangedEvent& PropertyChangedEvent)
|
||||
{
|
||||
#if 0 // @CARLAUE5
|
||||
Super::PostEditChangeProperty(PropertyChangedEvent);
|
||||
const FName PropertyName = PropertyChangedEvent.Property ? PropertyChangedEvent.Property->GetFName() : NAME_None;
|
||||
|
||||
|
@ -99,9 +99,11 @@ void UWheeledVehicleMovementComponentNW::PostEditChangeProperty(struct FProperty
|
|||
SteeringCurve.GetRichCurve()->UpdateOrAddKey(SteerKeys[KeyIdx].Time, NewValue);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
#if 0 // @CARLAUE5
|
||||
static void GetVehicleDifferentialNWSetup(const TArray<FVehicleNWWheelDifferentialData>& Setup, PxVehicleDifferentialNWData& PxSetup)
|
||||
{
|
||||
for (int32 i = 0; i < Setup.Num(); ++i)
|
||||
|
@ -109,9 +111,11 @@ static void GetVehicleDifferentialNWSetup(const TArray<FVehicleNWWheelDifferenti
|
|||
PxSetup.setDrivenWheel(i, Setup[i].bDriven);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
float FVehicleNWEngineData::FindPeakTorque() const
|
||||
{
|
||||
#if 0 // @CARLAUE5
|
||||
// Find max torque
|
||||
float PeakTorque = 0.0f;
|
||||
TArray<FRichCurveKey> TorqueKeys = TorqueCurve.GetRichCurveConst()->GetCopyOfKeys();
|
||||
|
@ -121,8 +125,10 @@ float FVehicleNWEngineData::FindPeakTorque() const
|
|||
PeakTorque = FMath::Max(PeakTorque, Key.Value);
|
||||
}
|
||||
return PeakTorque;
|
||||
#endif
|
||||
}
|
||||
|
||||
#if 0 // @CARLAUE5
|
||||
static void GetVehicleEngineSetup(const FVehicleNWEngineData& Setup, PxVehicleEngineData& PxSetup)
|
||||
{
|
||||
PxSetup.mMOI = M2ToCm2(Setup.MOI);
|
||||
|
@ -169,12 +175,18 @@ static void GetVehicleAutoBoxSetup(const FVehicleNWTransmissionData& Setup, PxVe
|
|||
PxSetup.setLatency(Setup.GearAutoBoxLatency);
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
int32 UWheeledVehicleMovementComponentNW::GetCustomGearBoxNumForwardGears() const
|
||||
{
|
||||
#if 0 // @CARLAUE5
|
||||
return TransmissionSetup.ForwardGears.Num();
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
#if 0 // @CARLAUE5
|
||||
void SetupDriveHelper(const UWheeledVehicleMovementComponentNW* VehicleData, const PxVehicleWheelsSimData* PWheelsSimData, PxVehicleDriveSimDataNW& DriveData)
|
||||
{
|
||||
PxVehicleDifferentialNWData DifferentialSetup;
|
||||
|
@ -198,9 +210,11 @@ void SetupDriveHelper(const UWheeledVehicleMovementComponentNW* VehicleData, con
|
|||
GetVehicleAutoBoxSetup(VehicleData->TransmissionSetup, AutoBoxSetup);
|
||||
DriveData.setAutoBoxData(AutoBoxSetup);
|
||||
}
|
||||
#endif
|
||||
|
||||
void UWheeledVehicleMovementComponentNW::SetupVehicle()
|
||||
{
|
||||
#if 0 // @CARLAUE5
|
||||
if (!UpdatedPrimitive)
|
||||
{
|
||||
return;
|
||||
|
@ -267,11 +281,12 @@ void UWheeledVehicleMovementComponentNW::SetupVehicle()
|
|||
PVehicleDrive = PVehicleDriveNW;
|
||||
|
||||
SetUseAutoGears(TransmissionSetup.bUseGearAutoBox);
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
void UWheeledVehicleMovementComponentNW::UpdateSimulation(float DeltaTime)
|
||||
{
|
||||
#if 0 // @CARLAUE5
|
||||
if (PVehicleDrive == nullptr)
|
||||
return;
|
||||
|
||||
|
@ -309,10 +324,12 @@ void UWheeledVehicleMovementComponentNW::UpdateSimulation(float DeltaTime)
|
|||
PxVehicleDriveNW* PVehicleDriveNW = (PxVehicleDriveNW*)PVehicleDrive;
|
||||
PxVehicleDriveNWSmoothAnalogRawInputsAndSetAnalogInputs(SmoothData, SpeedSteerLookup, RawInputData, DeltaTime, false, *PVehicleDriveNW);
|
||||
});
|
||||
#endif
|
||||
}
|
||||
|
||||
void UWheeledVehicleMovementComponentNW::UpdateEngineSetup(const FVehicleNWEngineData& NewEngineSetup)
|
||||
{
|
||||
#if 0 // @CARLAUE5
|
||||
if (PVehicleDrive)
|
||||
{
|
||||
PxVehicleEngineData EngineData;
|
||||
|
@ -321,10 +338,12 @@ void UWheeledVehicleMovementComponentNW::UpdateEngineSetup(const FVehicleNWEngin
|
|||
PxVehicleDriveNW* PVehicleDriveNW = (PxVehicleDriveNW*)PVehicleDrive;
|
||||
PVehicleDriveNW->mDriveSimData.setEngineData(EngineData);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void UWheeledVehicleMovementComponentNW::UpdateDifferentialSetup(const TArray<FVehicleNWWheelDifferentialData>& NewDifferentialSetup)
|
||||
{
|
||||
#if 0 // @CARLAUE5
|
||||
if (PVehicleDrive)
|
||||
{
|
||||
PxVehicleDifferentialNWData DifferentialData;
|
||||
|
@ -333,10 +352,12 @@ void UWheeledVehicleMovementComponentNW::UpdateDifferentialSetup(const TArray<FV
|
|||
PxVehicleDriveNW* PVehicleDriveNW = (PxVehicleDriveNW*)PVehicleDrive;
|
||||
PVehicleDriveNW->mDriveSimData.setDiffData(DifferentialData);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void UWheeledVehicleMovementComponentNW::UpdateTransmissionSetup(const FVehicleNWTransmissionData& NewTransmissionSetup)
|
||||
{
|
||||
#if 0 // @CARLAUE5
|
||||
if (PVehicleDrive)
|
||||
{
|
||||
PxVehicleGearsData GearData;
|
||||
|
@ -349,8 +370,10 @@ void UWheeledVehicleMovementComponentNW::UpdateTransmissionSetup(const FVehicleN
|
|||
PVehicleDriveNW->mDriveSimData.setGearsData(GearData);
|
||||
PVehicleDriveNW->mDriveSimData.setAutoBoxData(AutoBoxData);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#if 0 // @CARLAUE5
|
||||
void BackwardsConvertCm2ToM2NW(float& val, float defaultValue)
|
||||
{
|
||||
if (val != defaultValue)
|
||||
|
@ -358,9 +381,11 @@ void BackwardsConvertCm2ToM2NW(float& val, float defaultValue)
|
|||
val = Cm2ToM2(val);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void UWheeledVehicleMovementComponentNW::Serialize(FArchive& Ar)
|
||||
{
|
||||
#if 0 // @CARLAUE5
|
||||
Super::Serialize(Ar);
|
||||
if (Ar.IsLoading() && Ar.UE4Ver() < VER_UE4_VEHICLES_UNIT_CHANGE)
|
||||
{
|
||||
|
@ -383,14 +408,18 @@ void UWheeledVehicleMovementComponentNW::Serialize(FArchive& Ar)
|
|||
BackwardsConvertCm2ToM2NW(EngineSetup.MOI, DefEngineData.mMOI);
|
||||
BackwardsConvertCm2ToM2NW(TransmissionSetup.ClutchStrength, DefClutchData.mStrength);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void UWheeledVehicleMovementComponentNW::ComputeConstants()
|
||||
{
|
||||
Super::ComputeConstants();
|
||||
#if 0 // @CARLAUE5
|
||||
MaxEngineRPM = EngineSetup.MaxRPM;
|
||||
#endif
|
||||
}
|
||||
|
||||
#if 0 // @CARLAUE5
|
||||
const void* UWheeledVehicleMovementComponentNW::GetTireData(physx::PxVehicleWheels* InWheels, UVehicleWheel* InWheel)
|
||||
{
|
||||
const void* realShaderData = &InWheels->mWheelsSimData.getTireData((PxU32)InWheel->WheelIndex);
|
||||
|
@ -408,3 +437,4 @@ const physx::PxVehicleWheelData UWheeledVehicleMovementComponentNW::GetWheelData
|
|||
const physx::PxVehicleWheelData WheelData = InWheels->mWheelsSimData.getWheelData((physx::PxU32)InWheel);
|
||||
return WheelData;
|
||||
}
|
||||
#endif
|
|
@ -9,11 +9,6 @@
|
|||
#include "Curves/CurveFloat.h"
|
||||
#include "WheeledVehicleMovementComponentNW.generated.h"
|
||||
|
||||
namespace physx
|
||||
{
|
||||
class PxVehicleWheelData;
|
||||
}
|
||||
|
||||
USTRUCT()
|
||||
struct FVehicleNWWheelDifferentialData
|
||||
{
|
||||
|
@ -145,9 +140,11 @@ class CARLA_API UWheeledVehicleMovementComponentNW : public UWheeledVehicleMovem
|
|||
|
||||
protected:
|
||||
|
||||
#if 0 // @CARLAUE5
|
||||
virtual const void* GetTireData(physx::PxVehicleWheels* Wheels, UVehicleWheel* Wheel);
|
||||
virtual const int32 GetWheelShapeMapping(physx::PxVehicleWheels* Wheels, uint32 Wheel);
|
||||
virtual const physx::PxVehicleWheelData GetWheelData(physx::PxVehicleWheels* Wheels, uint32 Wheel);
|
||||
#endif
|
||||
|
||||
/** Allocate and setup the PhysX vehicle */
|
||||
virtual void SetupVehicle() override;
|
||||
|
|
|
@ -6,37 +6,24 @@
|
|||
|
||||
using UnrealBuildTool;
|
||||
|
||||
public class CarlaExporter : ModuleRules
|
||||
public class CarlaExporter :
|
||||
ModuleRules
|
||||
{
|
||||
public CarlaExporter(ReadOnlyTargetRules Target) : base(Target)
|
||||
public CarlaExporter(ReadOnlyTargetRules Target) :
|
||||
base(Target)
|
||||
{
|
||||
PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
|
||||
PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;
|
||||
|
||||
PublicIncludePaths.AddRange(
|
||||
new string[] {
|
||||
// ... add public include paths required here ...
|
||||
}
|
||||
);
|
||||
// PublicIncludePaths.AddRange(new string[] { });
|
||||
|
||||
// PrivateIncludePaths.AddRange(new string[] { });
|
||||
|
||||
PrivateIncludePaths.AddRange(
|
||||
new string[] {
|
||||
// ... add other private include paths required here ...
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
PublicDependencyModuleNames.AddRange(
|
||||
new string[]
|
||||
PublicDependencyModuleNames.AddRange(new string[]
|
||||
{
|
||||
"Core",
|
||||
// ... add other public dependencies that you statically link with here ...
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
PrivateDependencyModuleNames.AddRange(
|
||||
new string[]
|
||||
PrivateDependencyModuleNames.AddRange(new string[]
|
||||
{
|
||||
"Projects",
|
||||
"InputCore",
|
||||
|
@ -46,18 +33,10 @@ public class CarlaExporter : ModuleRules
|
|||
"Engine",
|
||||
"Slate",
|
||||
"SlateCore",
|
||||
"Physx",
|
||||
"EditorStyle"
|
||||
// ... add private dependencies that you statically link with here ...
|
||||
}
|
||||
);
|
||||
"Chaos",
|
||||
"EditorStyle",
|
||||
});
|
||||
|
||||
|
||||
DynamicallyLoadedModuleNames.AddRange(
|
||||
new string[]
|
||||
{
|
||||
// ... add any modules that your module loads dynamically here ...
|
||||
}
|
||||
);
|
||||
// DynamicallyLoadedModuleNames.AddRange(new string[] { });
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,14 +15,9 @@
|
|||
#include "Components/InstancedStaticMeshComponent.h"
|
||||
#include "PhysicsEngine/BodySetup.h"
|
||||
#include "PhysicsEngine/ConvexElem.h"
|
||||
#include "PxTriangleMesh.h"
|
||||
#include "PxVec3.h"
|
||||
#include "LevelEditor.h"
|
||||
#include "EngineUtils.h"
|
||||
#include "PhysXPublic.h"
|
||||
#include "PhysicsPublic.h"
|
||||
#include "PhysXIncludes.h"
|
||||
#include "PxSimpleTypes.h"
|
||||
#include <fstream>
|
||||
#include <sstream>
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
"Enabled": true
|
||||
},
|
||||
{
|
||||
"Name": "PhysXVehicles",
|
||||
"Name": "ChaosVehicles",
|
||||
"Enabled": true
|
||||
},
|
||||
{
|
||||
|
|
|
@ -3,71 +3,81 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using UnrealBuildTool;
|
||||
using EpicGames.Core;
|
||||
using System.Linq;
|
||||
using System.Diagnostics;
|
||||
|
||||
public class CarlaTools : ModuleRules
|
||||
public class CarlaTools :
|
||||
ModuleRules
|
||||
{
|
||||
bool UsingHoudini = true;
|
||||
bool bUsingOmniverseConnector = false;
|
||||
private bool IsWindows(ReadOnlyTargetRules Target)
|
||||
[CommandLine("-houdini")]
|
||||
bool EnableHoudini = false;
|
||||
|
||||
[CommandLine("-nv-omniverse")]
|
||||
bool EnableNVIDIAOmniverse = false;
|
||||
|
||||
[CommandLine("-carla-install-path")]
|
||||
string CarlaInstallPath = null;
|
||||
|
||||
[CommandLine("-carla-dependencies-install-path")]
|
||||
string CarlaDependenciesPath = null;
|
||||
|
||||
|
||||
|
||||
public static string FindLibrary(string SearchPath, params string[] Patterns)
|
||||
{
|
||||
return (Target.Platform == UnrealTargetPlatform.Win64) || (Target.Platform == UnrealTargetPlatform.Win32);
|
||||
foreach (var Pattern in Patterns)
|
||||
{
|
||||
var Candidates = Directory.GetFiles(SearchPath, Pattern);
|
||||
if (Candidates.Length == 0)
|
||||
continue;
|
||||
Array.Sort(Candidates);
|
||||
return Candidates[0];
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public CarlaTools(ReadOnlyTargetRules Target) : base(Target)
|
||||
public CarlaTools(ReadOnlyTargetRules Target) :
|
||||
base(Target)
|
||||
{
|
||||
PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
|
||||
bool IsWindows = Target.Platform == UnrealTargetPlatform.Win64;
|
||||
var DirectoryInfo = new DirectoryInfo(ModuleDirectory);
|
||||
for (int i = 0; i != 6; ++i)
|
||||
DirectoryInfo = DirectoryInfo.Parent;
|
||||
var WorkspacePath = DirectoryInfo.ToString();
|
||||
Debug.Assert(Directory.Exists(WorkspacePath));
|
||||
|
||||
if (CarlaInstallPath == null)
|
||||
{
|
||||
Console.WriteLine("-carla-install-path was not specified, inferring...");
|
||||
CarlaInstallPath = Path.Combine(WorkspacePath, "Install", "libcarla");
|
||||
Debug.Assert(Directory.Exists(CarlaInstallPath), "Could not infer CARLA install directory.");
|
||||
}
|
||||
|
||||
if (CarlaDependenciesPath == null)
|
||||
{
|
||||
Console.WriteLine("-carla-dependencies-path was not specified, inferring...");
|
||||
CarlaDependenciesPath = Path.Combine(WorkspacePath, "Build", "Dependencies");
|
||||
Debug.Assert(Directory.Exists(CarlaDependenciesPath), "Could not infer CARLA dependencies directory.");
|
||||
}
|
||||
|
||||
bEnableExceptions = bEnableExceptions || IsWindows;
|
||||
PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;
|
||||
// PrivatePCHHeaderFile = "Carla.h";
|
||||
|
||||
if (IsWindows(Target))
|
||||
{
|
||||
bEnableExceptions = true;
|
||||
}
|
||||
// PublicIncludePaths.AddRange(new string[] { });
|
||||
// PrivateIncludePaths.AddRange(new string[] { });
|
||||
|
||||
string CarlaPluginPath = Path.GetFullPath( ModuleDirectory );
|
||||
string ConfigDir = Path.GetFullPath(Path.Combine(CarlaPluginPath, "../../../../Config/"));
|
||||
string OptionalModulesFile = Path.Combine(ConfigDir, "OptionalModules.ini");
|
||||
string[] text = System.IO.File.ReadAllLines(OptionalModulesFile);
|
||||
foreach (string line in text)
|
||||
{
|
||||
if (line.Contains("Omniverse ON"))
|
||||
{
|
||||
Console.WriteLine("Enabling OmniverseConnector");
|
||||
bUsingOmniverseConnector = true;
|
||||
PublicDefinitions.Add("WITH_OMNIVERSE");
|
||||
PrivateDefinitions.Add("WITH_OMNIVERSE");
|
||||
}
|
||||
}
|
||||
|
||||
PublicIncludePaths.AddRange(
|
||||
new string[] {
|
||||
// ... add public include paths required here ...
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
PrivateIncludePaths.AddRange(
|
||||
new string[] {
|
||||
// ... add other private include paths required here ...
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
PublicDependencyModuleNames.AddRange(
|
||||
new string[]
|
||||
PublicDependencyModuleNames.AddRange(new string[]
|
||||
{
|
||||
"Core",
|
||||
"ProceduralMeshComponent",
|
||||
"MeshDescription",
|
||||
"RawMesh",
|
||||
"AssetTools"
|
||||
// ... add other public dependencies that you statically link with here ...
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
PrivateDependencyModuleNames.AddRange(
|
||||
new string[]
|
||||
PrivateDependencyModuleNames.AddRange(new string[]
|
||||
{
|
||||
"CoreUObject",
|
||||
"Engine",
|
||||
|
@ -83,7 +93,7 @@ public class CarlaTools : ModuleRules
|
|||
"MeshMergeUtilities",
|
||||
"Carla",
|
||||
"StaticMeshDescription",
|
||||
"PhysXVehicles",
|
||||
"ChaosVehicles",
|
||||
"Json",
|
||||
"JsonUtilities",
|
||||
"Networking",
|
||||
|
@ -94,118 +104,107 @@ public class CarlaTools : ModuleRules
|
|||
"MeshMergeUtilities",
|
||||
"StreetMapImporting",
|
||||
"StreetMapRuntime"
|
||||
// ... add private dependencies that you statically link with here ...
|
||||
}
|
||||
);
|
||||
if(UsingHoudini)
|
||||
});
|
||||
|
||||
if (EnableHoudini)
|
||||
{
|
||||
PrivateDependencyModuleNames.AddRange(
|
||||
new string[]
|
||||
PrivateDependencyModuleNames.AddRange(new string[]
|
||||
{
|
||||
"HoudiniEngine",
|
||||
"HoudiniEngineEditor",
|
||||
"HoudiniEngineRuntime"
|
||||
});
|
||||
}
|
||||
if(bUsingOmniverseConnector)
|
||||
|
||||
if (EnableNVIDIAOmniverse)
|
||||
{
|
||||
PrivateDependencyModuleNames.AddRange(
|
||||
new string[]
|
||||
PrivateDependencyModuleNames.AddRange(new string[]
|
||||
{
|
||||
"OmniverseUSD",
|
||||
"OmniverseRuntime"
|
||||
});
|
||||
}
|
||||
|
||||
DynamicallyLoadedModuleNames.AddRange(
|
||||
new string[]
|
||||
{
|
||||
// ... add any modules that your module loads dynamically here ...
|
||||
}
|
||||
);
|
||||
AddCarlaServerDependency(Target);
|
||||
}
|
||||
// DynamicallyLoadedModuleNames.AddRange(new string[] { });
|
||||
|
||||
private bool UseDebugLibs(ReadOnlyTargetRules Target)
|
||||
{
|
||||
if (IsWindows(Target))
|
||||
{
|
||||
// In Windows, Unreal uses the Release C++ Runtime (CRT) even in debug
|
||||
// mode, so unless we recompile the engine we cannot link the debug
|
||||
// libraries.
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
var LibraryPrefix = IsWindows ? "" : "lib";
|
||||
var LibrarySuffix = IsWindows ? ".lib" : ".a";
|
||||
|
||||
delegate string ADelegate(string s);
|
||||
|
||||
private void AddBoostLibs(string LibPath)
|
||||
Func<string, string> GetLibraryName = name =>
|
||||
{
|
||||
string [] files = Directory.GetFiles(LibPath, "*boost*.lib");
|
||||
foreach (string file in files)
|
||||
{
|
||||
PublicAdditionalLibraries.Add(file);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void AddCarlaServerDependency(ReadOnlyTargetRules Target)
|
||||
{
|
||||
string LibCarlaInstallPath = Path.GetFullPath(Path.Combine(ModuleDirectory, "../../../Carla/CarlaDependencies"));
|
||||
|
||||
ADelegate GetLibName = (string BaseName) => {
|
||||
if (IsWindows(Target))
|
||||
{
|
||||
return BaseName + ".lib";
|
||||
}
|
||||
else
|
||||
{
|
||||
return "lib" + BaseName + ".a";
|
||||
}
|
||||
return LibraryPrefix + name + LibrarySuffix;
|
||||
};
|
||||
|
||||
// Link dependencies.
|
||||
if (IsWindows(Target))
|
||||
var LibCarlaInstallPath = CarlaInstallPath;
|
||||
var DependenciesInstallPath = CarlaDependenciesPath;
|
||||
// LibCarla
|
||||
var LibCarlaIncludePath = Path.Combine(LibCarlaInstallPath, "include");
|
||||
var LibCarlaLibPath = Path.Combine(LibCarlaInstallPath, "lib");
|
||||
var LibCarlaServerPath = Path.Combine(LibCarlaLibPath, GetLibraryName("carla-server"));
|
||||
var LibCarlaClientPath = Path.Combine(LibCarlaLibPath, GetLibraryName("carla-client"));
|
||||
// Boost
|
||||
var BoostInstallPath = Path.Combine(DependenciesInstallPath, "boost-install");
|
||||
var BoostLibPath = Path.Combine(BoostInstallPath, "lib");
|
||||
var BoostLibraryPatterns = new string[]
|
||||
{
|
||||
AddBoostLibs(Path.Combine(LibCarlaInstallPath, "lib"));
|
||||
PublicAdditionalLibraries.Add(Path.Combine(LibCarlaInstallPath, "lib", GetLibName("rpc")));
|
||||
GetLibraryName("*boost_asio*"),
|
||||
GetLibraryName("*boost_python*"),
|
||||
};
|
||||
var BoostLibraries =
|
||||
from Pattern in BoostLibraryPatterns
|
||||
select FindLibrary(BoostLibPath, Pattern);
|
||||
// Chrono
|
||||
var ChronoInstallPath = Path.Combine(DependenciesInstallPath, "chrono-install");
|
||||
var ChronoLibPath = Path.Combine(ChronoInstallPath, "lib");
|
||||
var ChronoLibraryNames = new string[]
|
||||
{
|
||||
"ChronoEngine",
|
||||
"ChronoEngine_vehicle",
|
||||
"ChronoModels_vehicle",
|
||||
"ChronoModels_robot",
|
||||
};
|
||||
var ChronoLibraries =
|
||||
from Name in ChronoLibraryNames
|
||||
select FindLibrary(Name);
|
||||
// SQLite
|
||||
var SQLiteBuildPath = Path.Combine(DependenciesInstallPath, "sqlite-build");
|
||||
var SQLiteLibrary = FindLibrary(SQLiteBuildPath, GetLibraryName("sqlite*"));
|
||||
// RPCLib
|
||||
var RPCLibInstallPath = Path.Combine(DependenciesInstallPath, "rpclib-install");
|
||||
var RPCLibPath = Path.Combine(RPCLibInstallPath, "lib");
|
||||
var RPCLibraryPath = FindLibrary(RPCLibPath, "rpc");
|
||||
// Xerces-C
|
||||
var XercesCInstallPath = Path.Combine(DependenciesInstallPath, "xercesc-install");
|
||||
var XercesCLibPath = Path.Combine(XercesCInstallPath, "lib");
|
||||
var XercesCLibrary = FindLibrary(XercesCLibPath, "xercesc*");
|
||||
// Proj
|
||||
var ProjInstallPath = Path.Combine(DependenciesInstallPath, "proj-install");
|
||||
var ProjLibPath = Path.Combine(ProjInstallPath, "lib");
|
||||
var ProjLibrary = FindLibrary(ProjLibPath, "proj*");
|
||||
// SUMO (OSM2ODR)
|
||||
var SUMOInstallPath = Path.Combine(DependenciesInstallPath, "sumo-install");
|
||||
var SUMOLibPath = Path.Combine(SUMOInstallPath, "lib");
|
||||
var SUMOLibrary = FindLibrary(SUMOLibPath, "sumo*");
|
||||
// ZLib
|
||||
var ZLibInstallPath = Path.Combine(DependenciesInstallPath, "zlib-install");
|
||||
var ZLibLibPath = Path.Combine(ZLibInstallPath, "lib");
|
||||
var ZLibLibrary = FindLibrary(ZLibLibPath, "zlib*");
|
||||
|
||||
if (UseDebugLibs(Target))
|
||||
{
|
||||
PublicAdditionalLibraries.Add(Path.Combine(LibCarlaInstallPath, "lib", GetLibName("carla_server_debug")));
|
||||
}
|
||||
else
|
||||
{
|
||||
PublicAdditionalLibraries.Add(Path.Combine(LibCarlaInstallPath, "lib", GetLibName("carla_server")));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
PublicAdditionalLibraries.Add(Path.Combine(LibCarlaInstallPath, "lib", GetLibName("rpc")));
|
||||
if (UseDebugLibs(Target))
|
||||
{
|
||||
PublicAdditionalLibraries.Add(Path.Combine(LibCarlaInstallPath, "lib", GetLibName("carla_server_debug")));
|
||||
}
|
||||
else
|
||||
{
|
||||
PublicAdditionalLibraries.Add(Path.Combine(LibCarlaInstallPath, "lib", GetLibName("carla_server")));
|
||||
}
|
||||
}
|
||||
// Include path.
|
||||
string LibCarlaIncludePath = Path.Combine(LibCarlaInstallPath, "include");
|
||||
PublicAdditionalLibraries.Add(LibCarlaServerPath);
|
||||
PublicAdditionalLibraries.Add(LibCarlaClientPath);
|
||||
PublicAdditionalLibraries.Add(RPCLibraryPath);
|
||||
PublicAdditionalLibraries.AddRange(BoostLibraries);
|
||||
|
||||
PublicIncludePaths.Add(LibCarlaIncludePath);
|
||||
PrivateIncludePaths.Add(LibCarlaIncludePath);
|
||||
|
||||
PublicDefinitions.Add("ASIO_NO_EXCEPTIONS");
|
||||
PublicDefinitions.Add("BOOST_NO_EXCEPTIONS");
|
||||
// PublicDefinitions.Add("LIBCARLA_NO_EXCEPTIONS");
|
||||
PublicDefinitions.Add("PUGIXML_NO_EXCEPTIONS");
|
||||
PublicDefinitions.Add("BOOST_DISABLE_ABI_HEADERS");
|
||||
PublicDefinitions.Add("BOOST_TYPE_INDEX_FORCE_NO_RTTI_COMPATIBILITY");
|
||||
if (!bEnableExceptions)
|
||||
{
|
||||
PublicDefinitions.Add("ASIO_NO_EXCEPTIONS");
|
||||
PublicDefinitions.Add("BOOST_NO_EXCEPTIONS");
|
||||
PublicDefinitions.Add("PUGIXML_NO_EXCEPTIONS");
|
||||
PublicDefinitions.Add("LIBCARLA_NO_EXCEPTIONS");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,32 +4,24 @@ using UnrealBuildTool;
|
|||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.IO;
|
||||
using EpicGames.Core;
|
||||
|
||||
public class CarlaUE4Target : TargetRules
|
||||
public class CarlaUE4Target :
|
||||
TargetRules
|
||||
{
|
||||
public CarlaUE4Target(TargetInfo Target) : base(Target)
|
||||
[CommandLine("-unity-build")]
|
||||
bool EnableUnityBuild = false;
|
||||
|
||||
public CarlaUE4Target(TargetInfo Target) :
|
||||
base(Target)
|
||||
{
|
||||
Type = TargetType.Game;
|
||||
|
||||
ExtraModuleNames.Add("CarlaUE4");
|
||||
|
||||
string ConfigDir = Path.GetDirectoryName(ProjectFile.ToString()) + "/Config/";
|
||||
string OptionalModulesFile = Path.Combine(ConfigDir, "OptionalModules.ini");
|
||||
string[] text = System.IO.File.ReadAllLines(OptionalModulesFile);
|
||||
|
||||
bool UnityOn = true;
|
||||
|
||||
foreach (string line in text) {
|
||||
if (line.Contains("Unity OFF"))
|
||||
{
|
||||
UnityOn = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (!UnityOn) {
|
||||
Console.WriteLine("Disabling unity");
|
||||
bUseUnityBuild = false;
|
||||
bForceUnityBuild = false;
|
||||
bUseAdaptiveUnityBuild = false;
|
||||
}
|
||||
Console.WriteLine("Unity build is disabled.");
|
||||
bUseUnityBuild = EnableUnityBuild;
|
||||
bForceUnityBuild = EnableUnityBuild;
|
||||
bUseAdaptiveUnityBuild = EnableUnityBuild;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,12 +8,16 @@ public class CarlaUE4 : ModuleRules
|
|||
{
|
||||
PrivatePCHHeaderFile = "CarlaUE4.h";
|
||||
|
||||
PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore" });
|
||||
PublicDependencyModuleNames.AddRange(new string[]
|
||||
{
|
||||
"Core",
|
||||
"CoreUObject",
|
||||
"Engine",
|
||||
"InputCore"
|
||||
});
|
||||
|
||||
if (Target.Type == TargetType.Editor)
|
||||
{
|
||||
PublicDependencyModuleNames.AddRange(new string[] { "UnrealEd" });
|
||||
}
|
||||
PublicDependencyModuleNames.Add("UnrealEd");
|
||||
|
||||
PrivateDependencyModuleNames.AddRange(new string[] { });
|
||||
|
||||
|
|
|
@ -4,32 +4,24 @@ using UnrealBuildTool;
|
|||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.IO;
|
||||
using EpicGames.Core;
|
||||
|
||||
public class CarlaUE4EditorTarget : TargetRules
|
||||
public class CarlaUE4EditorTarget :
|
||||
TargetRules
|
||||
{
|
||||
public CarlaUE4EditorTarget(TargetInfo Target) : base(Target)
|
||||
[CommandLine("-unity-build")]
|
||||
bool EnableUnityBuild = false;
|
||||
|
||||
public CarlaUE4EditorTarget(TargetInfo Target) :
|
||||
base(Target)
|
||||
{
|
||||
Type = TargetType.Editor;
|
||||
|
||||
ExtraModuleNames.Add("CarlaUE4");
|
||||
|
||||
string ConfigDir = Path.GetDirectoryName(ProjectFile.ToString()) + "/Config/";
|
||||
string OptionalModulesFile = Path.Combine(ConfigDir, "OptionalModules.ini");
|
||||
string[] text = System.IO.File.ReadAllLines(OptionalModulesFile);
|
||||
|
||||
bool UnityOn = true;
|
||||
|
||||
foreach (string line in text) {
|
||||
if (line.Contains("Unity OFF"))
|
||||
{
|
||||
UnityOn = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (!UnityOn) {
|
||||
Console.WriteLine("Disabling unity");
|
||||
bUseUnityBuild = false;
|
||||
bForceUnityBuild = false;
|
||||
bUseAdaptiveUnityBuild = false;
|
||||
}
|
||||
Console.WriteLine("Unity build is disabled.");
|
||||
bUseUnityBuild = EnableUnityBuild;
|
||||
bForceUnityBuild = EnableUnityBuild;
|
||||
bUseAdaptiveUnityBuild = EnableUnityBuild;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -53,6 +53,7 @@ TArray<FUSDCARLALight> UUSDCARLAInterface::GetUSDLights(const FString& Path)
|
|||
|
||||
TArray<FUSDCARLAWheelData> UUSDCARLAInterface::GetUSDWheelData(const FString& Path)
|
||||
{
|
||||
#if 0 // @CARLAUE5
|
||||
pxr::UsdStageRefPtr Stage =
|
||||
FOmniverseUSDHelper::LoadUSDStageFromPath(Path);
|
||||
|
||||
|
@ -171,4 +172,5 @@ TArray<FUSDCARLAWheelData> UUSDCARLAInterface::GetUSDWheelData(const FString& Pa
|
|||
ParseWheelData("wheel_3", Wheel3);
|
||||
|
||||
return {Wheel0, Wheel1, Wheel2, Wheel3};
|
||||
#endif
|
||||
}
|
Loading…
Reference in New Issue