simulation organization and cleanup

- new modules/simulation directory to collect all simulators and related modules
 - new Tools/simulation directory to collect and organize scattered simulation submodules, scripts, etc
 - simulation module renamed to simulator_mavlink
 - sih renamed to simulator_sih (not a great name, but I wanted to be clear it was a simulator)
 - ignition_simulator renamed to simulator_ignition_bridge
 - large sitl_target.cmake split by simulation option and in some cases pushed to appropriate modules
 - sitl targets broken down to what's actually available (eg jmavsim only has 1 model and 1 world)
 - new Gazebo consistently referred to as Ignition for now (probably the least confusing thing until we fully drop Gazebo classic support someday)
This commit is contained in:
Daniel Agar
2022-08-22 11:00:03 -04:00
parent 6b2509cbba
commit 4040e4cdf2
200 changed files with 1778 additions and 2806 deletions
+22 -1
View File
@@ -161,7 +161,28 @@ if(EXISTS ${BOARD_DEFCONFIG})
string(REPLACE "CONFIG_MODULES_" "" module ${Name})
string(TOLOWER ${module} module)
list(APPEND config_module_list modules/${module})
string(REPLACE "_" "/" module_path ${module})
# Pattern 1 XXX / XXX_XXX
string(REGEX REPLACE "(^[a-z]+)_([a-z0-9]+_[a-z0-9]+).*$" "\\1" module_p1_folder ${module})
string(REGEX REPLACE "(^[a-z]+)_([a-z0-9]+_[a-z0-9]+).*$" "\\2" module_p1_subfolder ${module})
# Pattern 2 XXX / XXX_XXX_XXX
string(REGEX REPLACE "(^[a-z]+)_([a-z0-9]+_[a-z0-9]+_[a-z0-9]+).*$" "\\1" module_p2_folder ${module})
string(REGEX REPLACE "(^[a-z]+)_([a-z0-9]+_[a-z0-9]+_[a-z0-9]+).*$" "\\2" module_p2_subfolder ${module})
# Trick circumvent PX4 src naming problem with underscores and slashes
if(EXISTS ${PX4_SOURCE_DIR}/src/modules/${module})
list(APPEND config_module_list modules/${module})
elseif(EXISTS ${PX4_SOURCE_DIR}/src/modules/${module_path})
list(APPEND config_module_list modules/${module_path})
elseif(EXISTS ${PX4_SOURCE_DIR}/src/modules/${module_p1_folder}/${module_p1_subfolder})
list(APPEND config_module_list modules/${module_p1_folder}/${module_p1_subfolder})
elseif(EXISTS ${PX4_SOURCE_DIR}/src/modules/${module_p2_folder}/${module_p2_subfolder})
list(APPEND config_module_list modules/${module_p2_folder}/${module_p2_subfolder})
else()
message(FATAL_ERROR "Couldn't find path for ${module}")
endif()
endif()
# Find variable name