Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Simox
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Florian Leander Singer
Simox
Commits
1add931c
Commit
1add931c
authored
9 years ago
by
Peter Kaiser
Browse files
Options
Downloads
Patches
Plain Diff
CMake: Added switch for NLOPT
parent
b1d7d253
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CMakeModules/FindNLOPT.cmake
+41
-0
41 additions, 0 deletions
CMakeModules/FindNLOPT.cmake
VirtualRobot/CMakeLists.txt
+14
-2
14 additions, 2 deletions
VirtualRobot/CMakeLists.txt
config.cmake
+13
-0
13 additions, 0 deletions
config.cmake
with
68 additions
and
2 deletions
CMakeModules/FindNLOPT.cmake
0 → 100644
+
41
−
0
View file @
1add931c
# Copyright (c) 2015, Georgia Tech Graphics Lab and Humanoid Robotics Lab
# This file is provided under the "BSD-style" License
# Find NLOPT
#
# This sets the following variables:
# NLOPT_FOUND
# NLOPT_INCLUDE_DIRS
# NLOPT_LIBRARIES
# NLOPT_DEFINITIONS
# NLOPT_VERSION
find_package
(
PkgConfig QUIET
)
# Check to see if pkgconfig is installed.
pkg_check_modules
(
PC_NLOPT nlopt QUIET
)
# Definitions
set
(
NLOPT_DEFINITIONS
${
PC_NLOPT_CFLAGS_OTHER
}
)
# Include directories
find_path
(
NLOPT_INCLUDE_DIRS
NAMES nlopt.h
HINTS
${
PC_NLOPT_INCLUDEDIR
}
PATHS
"
${
CMAKE_INSTALL_PREFIX
}
/include"
)
# Libraries
find_library
(
NLOPT_LIBRARIES
NAMES nlopt nlopt_cxx
HINTS
${
PC_NLOPT_LIBDIR
}
)
# Version
set
(
NLOPT_VERSION
${
PC_NLOPT_VERSION
}
)
# Set (NAME)_FOUND if all the variables and the version are satisfied.
include
(
FindPackageHandleStandardArgs
)
find_package_handle_standard_args
(
NLOPT
FAIL_MESSAGE DEFAULT_MSG
REQUIRED_VARS NLOPT_INCLUDE_DIRS NLOPT_LIBRARIES
VERSION_VAR NLOPT_VERSION
)
This diff is collapsed.
Click to expand it.
VirtualRobot/CMakeLists.txt
+
14
−
2
View file @
1add931c
...
...
@@ -19,6 +19,10 @@ if (Simox_USE_RBDL)
FIND_PACKAGE
(
RBDL
)
endif
()
if
(
Simox_USE_NLOPT
)
FIND_PACKAGE
(
NLOPT
)
endif
()
########################### TESTING #####################################
MACRO
(
ADD_VR_TEST TEST_NAME
)
INCLUDE_DIRECTORIES
(
${
Simox_EXTERNAL_INCLUDE_DIRS
}
)
...
...
@@ -86,7 +90,6 @@ IK/FeetPosture.cpp
IK/ConstrainedIK.cpp
IK/ConstrainedHierarchicalIK.cpp
IK/ConstrainedStackedIK.cpp
IK/ConstrainedOptimizationIK.cpp
IK/Constraint.cpp
IK/constraints/BalanceConstraint.cpp
IK/constraints/PoseConstraint.cpp
...
...
@@ -196,7 +199,6 @@ IK/FeetPosture.h
IK/ConstrainedIK.h
IK/ConstrainedHierarchicalIK.h
IK/ConstrainedStackedIK.h
IK/ConstrainedOptimizationIK.h
IK/Constraint.h
IK/constraints/BalanceConstraint.h
IK/constraints/PoseConstraint.h
...
...
@@ -246,6 +248,16 @@ ADD_SUBDIRECTORY(Visualization/tests)
ADD_SUBDIRECTORY
(
Workspace/tests
)
ADD_SUBDIRECTORY
(
Compression/tests
)
if
(
Simox_USE_NLOPT AND NLOPT_FOUND
)
SET
(
SOURCES
${
SOURCES
}
IK/ConstrainedOptimizationIK.cpp
)
SET
(
INCLUDES
${
INCLUDES
}
IK/ConstrainedOptimizationIK.h
)
endif
()
if
(
Simox_VISUALIZATION AND Simox_USE_COIN_VISUALIZATION
)
SET
(
SOURCES
...
...
This diff is collapsed.
Click to expand it.
config.cmake
+
13
−
0
View file @
1add931c
...
...
@@ -163,6 +163,19 @@ IF (NOT Simox_CONFIGURED)
#urdf
OPTION
(
Simox_USE_URDF
"Use URDF"
OFF
)
#### NLOPT
OPTION
(
Simox_USE_NLOPT
"Use NLOPT"
OFF
)
if
(
Simox_USE_NLOPT
)
FIND_PACKAGE
(
NLOPT
)
if
(
NLOPT_FOUND
)
MESSAGE
(
STATUS
"NLOPT found at:
${
NLOPT_INCLUDE_DIRS
}
"
)
SET
(
Simox_EXTERNAL_INCLUDE_DIRS
${
Simox_EXTERNAL_INCLUDE_DIRS
}
${
NLOPT_INCLUDE_DIRS
}
)
SET
(
Simox_EXTERNAL_LIBRARIES
${
Simox_EXTERNAL_LIBRARIES
}
${
NLOPT_LIBRARIES
}
)
else
()
MESSAGE
(
STATUS
"NLOPT not found"
)
endif
()
endif
()
#### Eigen
FIND_PACKAGE
(
Eigen3 REQUIRED
)
if
(
Eigen3_FOUND
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment