-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add driver.cpp.in template * Update clang-format * Update main CMakeLists.txt to use the driver.cpp.in template * Minor edit in RegisteMdl.cmake * Update CreateAutogeneratedCodeTargets.cmake.in template * fix block names for autogen * fixed also the model without Gazebo for autogen * modified installation path of +wbc library * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * models exported to 2017b Co-authored-by: Diego Ferigo <[email protected]>
- Loading branch information
1 parent
12ab05e
commit 1fa9a76
Showing
23 changed files
with
1,569 additions
and
1,392 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,29 @@ | ||
# Copyright (C) 2019 Istituto Italiano di Tecnologia (IIT). All rights reserved. | ||
# This software may be modified and distributed under the terms of the | ||
# GNU Lesser General Public License v2.1 or any later version. | ||
|
||
find_package(BlockFactory COMPONENTS SimulinkCoder REQUIRED) | ||
|
||
# =============================================== | ||
# Generate a library from the autogenerated class | ||
# =============================================== | ||
|
||
set(MDL_NAME @MDL_NAME@) | ||
add_generated_code_lib(MODELNAME ${MDL_NAME}) | ||
include(TargetFromGeneratedCode) | ||
set(SIMULINK_MODEL_NAME "@MDL_NAME@") | ||
|
||
# This macro creates a target named as the mdl file for the autogenerated class | ||
target_from_generated_code( | ||
MODELNAME ${SIMULINK_MODEL_NAME} | ||
SOURCE_FOLDER ${CMAKE_CURRENT_SOURCE_DIR}) | ||
|
||
# ================================ | ||
# Test executable with custom main | ||
# ================================ | ||
|
||
# Set the target name for the custom driver | ||
set(CODER_MAIN "CoderMain_${MDL_NAME}") | ||
|
||
configure_file( | ||
"${PROJECT_SOURCE_DIR}/src/driver.cpp.in" | ||
"${CMAKE_CURRENT_BINARY_DIR}/driver.cpp" | ||
@ONLY) | ||
set(CODER_MAIN "Run${SIMULINK_MODEL_NAME}") | ||
|
||
add_executable(${CODER_MAIN} | ||
"${CMAKE_CURRENT_BINARY_DIR}/driver.cpp" | ||
) | ||
"${CMAKE_CURRENT_SOURCE_DIR}/driver.cpp") | ||
|
||
target_link_libraries(${CODER_MAIN} PUBLIC ${MDL_NAME}_LIB) | ||
target_link_libraries(${CODER_MAIN} PUBLIC ${SIMULINK_MODEL_NAME}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/startup_WBC.m.in ${CMAKE_BINARY_DIR}/startup_WBC.m) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.