Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NASA_Challenge_[@RBinsonB]_[Lunar Pole Exploration Rover & Plugins] #25

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
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
79 changes: 78 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,92 @@
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
# PRIVATE ignition-common${IGN_COMMON_VER}::ignition-common${IGNITION_COMMON_VER}
)


# 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()
ament_package()
29 changes: 29 additions & 0 deletions models/curiosity_path/urdf/curiosity_mars_rover.gazebo
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,35 @@
<render_engine>ogre2</render_engine>
<background_color>0.9 0.753 0.66 1</background_color>
</plugin>

<plugin filename="libSolarPanelPlugin.so" name="simulation::SolarPanelPlugin">
<link_name>arm_tools</link_name>
<nominal_power>100.0</nominal_power>
</plugin>
<plugin filename="libRadioisotopeThermalGeneratorPlugin.so" name="simulation::RadioisotopeThermalGeneratorPlugin">
<link_name>chassis</link_name>
<nominal_power>100.0</nominal_power>
<plugin filename="libRechargeableBatteryPlugin.so" name="simulation::RechargeableBatteryPlugin">
<!-- https://ntrs.nasa.gov/api/citations/20080015793/downloads/20080015793.pdf -->
<battery_name>rechargeable_battery</battery_name>
<voltage>30.0</voltage>
<open_circuit_voltage>30.0</open_circuit_voltage>
<open_circuit_voltage_constant_coef>30.0</open_circuit_voltage_constant_coef>
<open_circuit_voltage_linear_coef>-3.0</open_circuit_voltage_linear_coef>
<initial_charge>9.0</initial_charge>
<capacity>10.0</capacity>
<resistance>0.1</resistance>
<smooth_current_tau>1.0</smooth_current_tau>

<!-- power source -->
<power_source>chassis/radioisotope_thermal_generator_output</power_source>

<!-- Power load without movement -->
<!-- this needs to revised with the actual power consumption of the robot -->
<power_load>11.0</power_load>


</plugin>
</gazebo>

<gazebo reference="lidar_link">
Expand Down
307 changes: 307 additions & 0 deletions models/lunar_pole_exploration_rover/meshes/body.dae

Large diffs are not rendered by default.

145 changes: 145 additions & 0 deletions models/lunar_pole_exploration_rover/meshes/chassis.dae

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
306 changes: 306 additions & 0 deletions models/lunar_pole_exploration_rover/meshes/mast_camera.dae

Large diffs are not rendered by default.

114 changes: 114 additions & 0 deletions models/lunar_pole_exploration_rover/meshes/mast_head_pivot.dae

Large diffs are not rendered by default.

306 changes: 306 additions & 0 deletions models/lunar_pole_exploration_rover/meshes/solar_panel.dae

Large diffs are not rendered by default.

243 changes: 243 additions & 0 deletions models/lunar_pole_exploration_rover/meshes/suspension_left.dae

Large diffs are not rendered by default.

306 changes: 306 additions & 0 deletions models/lunar_pole_exploration_rover/meshes/suspension_right.dae

Large diffs are not rendered by default.

180 changes: 180 additions & 0 deletions models/lunar_pole_exploration_rover/meshes/wheel_axle_left.dae

Large diffs are not rendered by default.

180 changes: 180 additions & 0 deletions models/lunar_pole_exploration_rover/meshes/wheel_axle_right.dae

Large diffs are not rendered by default.

369 changes: 369 additions & 0 deletions models/lunar_pole_exploration_rover/meshes/wheel_left.dae

Large diffs are not rendered by default.

306 changes: 306 additions & 0 deletions models/lunar_pole_exploration_rover/meshes/wheel_right.dae

Large diffs are not rendered by default.

Loading