forked from epfl-lasa/control-libraries
-
Notifications
You must be signed in to change notification settings - Fork 0
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
fix: refactor cmake project to deal with robot model dependencies #178
Merged
Changes from 5 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
8d0a14b
fix: update versions
domire8 47ff4f4
wip
domire8 a171b4b
make Dockerfile more readable and configurable
LouisBrunner 08b6cb2
Revert "wip"
LouisBrunner d06b2b2
revamp source/control_librariesConfig.cmake.in to avoid issues at bui…
LouisBrunner c7da350
feat: use pinocchio 2.6.20
domire8 2773831
7.3.12 -> 7.3.13
domire8 d716a51
docs: changelog
domire8 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,58 @@ | ||
@PACKAGE_INIT@ | ||
|
||
set(_control_libraries_supported_components state_representation dynamical_systems robot_model controllers) | ||
set(control_libraries_LIBRARIES "@INSTALL_INTERFACE_LINK_LIBRARIES@") | ||
set(_control_libraries_namespace "control_libraries::") | ||
set(_control_libraries_supported_components "@INSTALL_SUPPORTED_COMPONENTS@") | ||
|
||
include(CMakeFindDependencyMacro) | ||
find_dependency(Eigen3) | ||
|
||
# Find robot model dependencies if it is in the interface library list and no components are explicitly listed | ||
if ("robot_model" IN_LIST control_libraries_LIBRARIES AND NOT control_libraries_FIND_COMPONENTS) | ||
find_dependency(pinocchio) | ||
find_dependency(OsqpEigen) | ||
find_dependency(osqp) | ||
set(_control_libraries_to_find ${control_libraries_FIND_COMPONENTS}) | ||
if (NOT control_libraries_FIND_COMPONENTS) | ||
set(_control_libraries_to_find ${_control_libraries_supported_components}) | ||
endif() | ||
|
||
foreach(_comp ${control_libraries_FIND_COMPONENTS}) | ||
set(control_libraries_LIBRARIES "") | ||
while(_control_libraries_to_find) | ||
list(POP_FRONT _control_libraries_to_find _comp) | ||
|
||
if (${_comp} IN_LIST _control_libraries_supported_components) | ||
set(control_libraries_${_comp}_FOUND True) | ||
else() | ||
set_and_check(control_libraries_FOUND False) | ||
set_and_check(control_libraries_NOT_FOUND_MESSAGE "Unsupported component: ${_comp}") | ||
endif() | ||
|
||
# Find robot model dependencies if the corresponding components are explicitly listed | ||
if (${_comp} STREQUAL "controllers" OR ${_comp} STREQUAL "robot_model") | ||
# Find robot model dependencies if the corresponding component is needed | ||
# FIXME: this should be done automatically | ||
if (${_comp} STREQUAL "robot_model") | ||
find_dependency(pinocchio) | ||
find_dependency(OsqpEigen) | ||
find_dependency(osqp) | ||
endif() | ||
|
||
include("${CMAKE_CURRENT_LIST_DIR}/control_libraries_${_comp}_targets.cmake") | ||
endforeach() | ||
|
||
list(APPEND control_libraries_LIBRARIES "${_control_libraries_namespace}${_comp}") | ||
|
||
get_property(_comp_link_libraries TARGET "${_control_libraries_namespace}${_comp}" PROPERTY INTERFACE_LINK_LIBRARIES) | ||
foreach(_dep ${_comp_link_libraries}) | ||
if (_dep MATCHES "^${_control_libraries_namespace}") | ||
string(REPLACE "${_control_libraries_namespace}" "" _dep ${_dep}) | ||
if (NOT _dep IN_LIST _control_libraries_to_find) | ||
list(APPEND _control_libraries_to_find ${_dep}) | ||
endif() | ||
else() | ||
list(APPEND control_libraries_LIBRARIES ${_dep}) | ||
endif() | ||
endforeach() | ||
endwhile() | ||
|
||
list(REMOVE_DUPLICATES control_libraries_LIBRARIES) | ||
|
||
unset(_dep) | ||
unset(_comp) | ||
unset(_comp_link_libraries) | ||
unset(_control_libraries_to_find) | ||
unset(_control_libraries_supported_components) | ||
|
||
check_required_components(control_libraries) |
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need hpp-fcl here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure. It built and ran correctly for me so I imagine
pinocchio
might be pulling it itself?