Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 74 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,89 @@
cmake_minimum_required(VERSION 3.8)
project(simulation)

# Find required packages
find_package(ament_cmake REQUIRED)
find_package(ignition-plugin1 REQUIRED COMPONENTS register)
find_package(ignition-gazebo6 REQUIRED)
find_package(ignition-physics5 REQUIRED)
find_package(ignition-common4 REQUIRED)
find_package(ignition-rendering6 REQUIRED)

# Set Gazebo plugin and sim versions
set(IGNITION_PLUGIN_VER ${ignition-plugin1_VERSION_MAJOR})
set(IGNITION_SIM_VER ${ignition-gazebo6_VERSION_MAJOR})
set(IGNITION_COMMON_VER ${ignition-common4_VERSION_MAJOR})
set(IGNITION_RENDERING_VER ${ignition-rendering6_VERSION_MAJOR})
set(IGNITION_SENSORS_VER ${ignition-sensors6_VERSION_MAJOR})

# Add the plugins directory to the include path
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/Plugins)

# Add the SolarPanelPlugin library
add_library(SolarPanelPlugin SHARED
plugins/SolarPanelPlugin.cc
)

# Link the SolarPanelPlugin library with required dependencies
target_link_libraries(SolarPanelPlugin
PRIVATE ignition-plugin${IGNITION_PLUGIN_VER}::ignition-plugin${IGNITION_PLUGIN_VER}
PRIVATE ignition-common${IGNITION_COMMON_VER}::ignition-common${IGNITION_COMMON_VER}
PRIVATE ignition-rendering${IGNITION_RENDERING_VER}::ignition-rendering${IGNITION_RENDERING_VER}
PRIVATE ignition-gazebo${IGNITION_SIM_VER}::core
)

# Add the RadioisotopeThermalGeneratorPlugin library
add_library(RadioisotopeThermalGeneratorPlugin SHARED
plugins/RadioisotopeThermalGeneratorPlugin.cc
)

# Link the RadioisotopeThermalGeneratorPlugin library with required dependencies
target_link_libraries(RadioisotopeThermalGeneratorPlugin
PRIVATE ignition-plugin${IGNITION_PLUGIN_VER}::ignition-plugin${IGNITION_PLUGIN_VER}
PRIVATE ignition-gazebo${IGNITION_SIM_VER}::core
)

# Add the RechargeableBatteryPlugin library
add_library(RechargeableBatteryPlugin SHARED
plugins/RechargeableBatteryPlugin.cc
)

# Link the RechargeableBatteryPlugin library with required dependencies
target_link_libraries(RechargeableBatteryPlugin
PRIVATE ignition-plugin${IGNITION_PLUGIN_VER}::ignition-plugin${IGNITION_PLUGIN_VER}
PRIVATE ignition-gazebo${IGNITION_SIM_VER}::core
)

# add the SensorPowerSystemPlugin library
add_library(SensorPowerSystemPlugin SHARED
plugins/SensorPowerSystemPlugin.cc
)

# Link the SensorPowerSystemPlugin library with required dependencies
target_link_libraries(SensorPowerSystemPlugin
PRIVATE ignition-plugin${IGNITION_PLUGIN_VER}::ignition-plugin${IGNITION_PLUGIN_VER}
PRIVATE ignition-gazebo${IGNITION_SIM_VER}::core
PRIVATE ignition-gazebo${IGNITION_SIM_VER}::ignition-gazebo${IGNITION_SIM_VER}
PRIVATE ignition-sensors${IGNITION_SENSORS_VER}::ignition-sensors${IGNITION_SENSORS_VER}
)

# Create the models directory
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/models/curiosity_path)

# Install directories
install(DIRECTORY
models
${CMAKE_CURRENT_BINARY_DIR}/models
DESTINATION share/${PROJECT_NAME}/
)

# Install the plugin library
install(TARGETS SolarPanelPlugin RadioisotopeThermalGeneratorPlugin RechargeableBatteryPlugin SensorPowerSystemPlugin
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin
)

ament_environment_hooks("${CMAKE_CURRENT_SOURCE_DIR}/hooks/${PROJECT_NAME}.dsv.in")

ament_package()
3 changes: 3 additions & 0 deletions models/lunar_pole_exploration_rover/meshes/body.dae
Git LFS file not shown
3 changes: 3 additions & 0 deletions models/lunar_pole_exploration_rover/meshes/chassis.dae
Git LFS file not shown
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions models/lunar_pole_exploration_rover/meshes/mast_camera.dae
Git LFS file not shown
Git LFS file not shown
3 changes: 3 additions & 0 deletions models/lunar_pole_exploration_rover/meshes/solar_panel.dae
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
3 changes: 3 additions & 0 deletions models/lunar_pole_exploration_rover/meshes/wheel_left.dae
Git LFS file not shown
3 changes: 3 additions & 0 deletions models/lunar_pole_exploration_rover/meshes/wheel_right.dae
Git LFS file not shown
Loading
Loading