Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
hpp-manipulation
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Guilhem Saurel
hpp-manipulation
Commits
4fba2fa0
Commit
4fba2fa0
authored
4 years ago
by
Florent Lamiraux
Committed by
Florent Lamiraux florent@laas.fr
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[Test] Use standard option BUILD_TESTING for test.
parent
c26b0491
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
CMakeLists.txt
+8
-6
8 additions, 6 deletions
CMakeLists.txt
src/CMakeLists.txt
+0
-2
0 additions, 2 deletions
src/CMakeLists.txt
tests/CMakeLists.txt
+3
-28
3 additions, 28 deletions
tests/CMakeLists.txt
tests/test-constraintgraph.cc
+3
-8
3 additions, 8 deletions
tests/test-constraintgraph.cc
with
14 additions
and
44 deletions
CMakeLists.txt
+
8
−
6
View file @
4fba2fa0
...
@@ -25,15 +25,13 @@ SET(PROJECT_DESCRIPTION "Classes for manipulation planning.")
...
@@ -25,15 +25,13 @@ SET(PROJECT_DESCRIPTION "Classes for manipulation planning.")
SET
(
CXX_DISABLE_WERROR TRUE
)
SET
(
CXX_DISABLE_WERROR TRUE
)
INCLUDE
(
cmake/hpp.cmake
)
INCLUDE
(
cmake/hpp.cmake
)
INCLUDE
(
cmake/boost.cmake
)
INCLUDE
(
cmake/boost.cmake
)
INCLUDE
(
cmake/test.cmake
)
COMPUTE_PROJECT_ARGS
(
PROJECT_ARGS LANGUAGES CXX
)
COMPUTE_PROJECT_ARGS
(
PROJECT_ARGS LANGUAGES CXX
)
PROJECT
(
${
PROJECT_NAME
}
${
PROJECT_ARGS
}
)
PROJECT
(
${
PROJECT_NAME
}
${
PROJECT_ARGS
}
)
LIST
(
APPEND PKG_CONFIG_ADDITIONAL_VARIABLES cmake_plugin
)
LIST
(
APPEND PKG_CONFIG_ADDITIONAL_VARIABLES cmake_plugin
)
# Activate test using UR5 if requested
SET
(
TEST_UR5 FALSE CACHE BOOL
"Activate tests using ur5"
)
# Ask Doxygen to create a tree view in html documentation
# Ask Doxygen to create a tree view in html documentation
SET
(
DOXYGEN_TREEVIEW
"NO"
CACHE STRING
"Set to YES to generate a tree view in the html documentation"
)
SET
(
DOXYGEN_TREEVIEW
"NO"
CACHE STRING
"Set to YES to generate a tree view in the html documentation"
)
...
@@ -53,8 +51,8 @@ ADD_REQUIRED_DEPENDENCY("hpp-statistics >= 1.1")
...
@@ -53,8 +51,8 @@ ADD_REQUIRED_DEPENDENCY("hpp-statistics >= 1.1")
IF
(
HPP_MANIPULATION_HAS_WHOLEBODY_STEP
)
IF
(
HPP_MANIPULATION_HAS_WHOLEBODY_STEP
)
ADD_REQUIRED_DEPENDENCY
(
"hpp-wholebody-step >= 4"
)
ADD_REQUIRED_DEPENDENCY
(
"hpp-wholebody-step >= 4"
)
ENDIF
()
ENDIF
()
IF
(
TEST_UR5
)
IF
(
BUILD_TESTING
)
ADD_REQUIRED_DEPENDENCY
(
"
hpp_universal_robot
"
)
ADD_REQUIRED_DEPENDENCY
(
"
example-robot-data >= 3
"
)
ENDIF
()
ENDIF
()
CONFIG_FILES
(
doc/main.hh
CONFIG_FILES
(
doc/main.hh
...
@@ -103,9 +101,13 @@ SET (${PROJECT_NAME}_HEADERS
...
@@ -103,9 +101,13 @@ SET (${PROJECT_NAME}_HEADERS
include/hpp/manipulation/steering-method/end-effector-trajectory.hh
include/hpp/manipulation/steering-method/end-effector-trajectory.hh
)
)
SET
(
LIBRARY_NAME
${
PROJECT_NAME
}
)
ADD_SUBDIRECTORY
(
src
)
ADD_SUBDIRECTORY
(
src
)
ADD_SUBDIRECTORY
(
plugins
)
ADD_SUBDIRECTORY
(
plugins
)
ADD_SUBDIRECTORY
(
tests
)
IF
(
BUILD_TESTING
)
ADD_SUBDIRECTORY
(
tests
)
ENDIF
()
# Add dependency toward hpp-manipulation library in pkg-config file.
# Add dependency toward hpp-manipulation library in pkg-config file.
PKG_CONFIG_APPEND_LIBS
(
"hpp-manipulation"
)
PKG_CONFIG_APPEND_LIBS
(
"hpp-manipulation"
)
...
...
This diff is collapsed.
Click to expand it.
src/CMakeLists.txt
+
0
−
2
View file @
4fba2fa0
...
@@ -17,8 +17,6 @@
...
@@ -17,8 +17,6 @@
# hpp-manipulation If not, see
# hpp-manipulation If not, see
# <http://www.gnu.org/licenses/>.
# <http://www.gnu.org/licenses/>.
SET
(
LIBRARY_NAME
${
PROJECT_NAME
}
)
SET
(
SOURCES
SET
(
SOURCES
handle.cc
handle.cc
manipulation-planner.cc
manipulation-planner.cc
...
...
This diff is collapsed.
Click to expand it.
tests/CMakeLists.txt
+
3
−
28
View file @
4fba2fa0
...
@@ -20,32 +20,7 @@ INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
...
@@ -20,32 +20,7 @@ INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
# Make Boost.Test generates the main function in test cases.
# Make Boost.Test generates the main function in test cases.
ADD_DEFINITIONS
(
-DBOOST_TEST_DYN_LINK -DBOOST_TEST_MAIN
)
ADD_DEFINITIONS
(
-DBOOST_TEST_DYN_LINK -DBOOST_TEST_MAIN
)
# ADD_TESTCASE(NAME)
ADD_UNIT_TEST
(
test-constraintgraph test-constraintgraph.cc
)
# ------------------------
PKG_CONFIG_USE_DEPENDENCY
(
test-constraintgraph hpp-core
)
#
TARGET_LINK_LIBRARIES
(
test-constraintgraph
${
LIBRARY_NAME
}
)
# Define a test named `NAME'.
#
# This macro will create a binary from `NAME.cc', link it against
# Boost and add it to the test suite.
#
MACRO
(
ADD_TESTCASE NAME GENERATED
)
IF
(
${
GENERATED
}
STREQUAL TRUE
)
ADD_EXECUTABLE
(
${
NAME
}
${
CMAKE_CURRENT_BINARY_DIR
}
/
${
NAME
}
.cc
)
ELSE
()
ADD_EXECUTABLE
(
${
NAME
}
${
NAME
}
.cc
)
ENDIF
()
ADD_TEST
(
${
NAME
}
${
RUNTIME_OUTPUT_DIRECTORY
}
/
${
NAME
}
)
PKG_CONFIG_USE_DEPENDENCY
(
${
NAME
}
hpp-constraints
)
# Link against Boost and project library.
TARGET_LINK_LIBRARIES
(
${
NAME
}
${
PROJECT_NAME
}
${
Boost_LIBRARIES
}
)
ENDMACRO
(
ADD_TESTCASE
)
IF
(
TEST_UR5
)
ADD_TESTCASE
(
test-constraintgraph FALSE
)
SET
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-DTEST_UR5"
)
ENDIF
()
This diff is collapsed.
Click to expand it.
tests/test-constraintgraph.cc
+
3
−
8
View file @
4fba2fa0
...
@@ -14,7 +14,6 @@
...
@@ -14,7 +14,6 @@
// received a copy of the GNU Lesser General Public License along with
// received a copy of the GNU Lesser General Public License along with
// hpp-manipulation. If not, see <http://www.gnu.org/licenses/>.
// hpp-manipulation. If not, see <http://www.gnu.org/licenses/>.
#include
<hpp/util/pointer.hh>
#include
<hpp/pinocchio/urdf/util.hh>
#include
<hpp/pinocchio/urdf/util.hh>
#include
<hpp/pinocchio/liegroup-element.hh>
#include
<hpp/pinocchio/liegroup-element.hh>
...
@@ -70,15 +69,11 @@ namespace hpp_test {
...
@@ -70,15 +69,11 @@ namespace hpp_test {
void
initialize
(
bool
ur5
)
void
initialize
(
bool
ur5
)
{
{
robot
=
hpp
::
manipulation
::
Device
::
create
(
"test-robot"
);
robot
=
hpp
::
manipulation
::
Device
::
create
(
"test-robot"
);
hpp
::
manipulation
::
ProblemPtr_t
problem
hpp
::
manipulation
::
ProblemPtr_t
problem
(
hpp
::
manipulation
::
Problem
::
create
(
new
hpp
::
manipulation
::
Problem
(
robot
));
(
robot
));
if
(
ur5
)
{
if
(
ur5
)
{
#ifdef TEST_UR5
hpp
::
pinocchio
::
urdf
::
loadUrdfModel
(
robot
,
"anchor"
,
"ur_description"
,
hpp
::
pinocchio
::
urdf
::
loadUrdfModel
(
robot
,
"anchor"
,
"ur_description"
,
"ur5_joint_limited_robot"
);
"ur5_joint_limited_robot"
);
#else // TEST_UR5
BOOST_ERROR
(
"Set TEST_UR5 in cmake to activate this."
);
#endif // TEST_UR5
}
}
SteeringMethodPtr_t
sm
SteeringMethodPtr_t
sm
(
hpp
::
manipulation
::
steeringMethod
::
Graph
::
create
(
*
problem
));
(
hpp
::
manipulation
::
steeringMethod
::
Graph
::
create
(
*
problem
));
...
@@ -89,7 +84,7 @@ namespace hpp_test {
...
@@ -89,7 +84,7 @@ namespace hpp_test {
components
.
push_back
(
graph_
);
components
.
push_back
(
graph_
);
graph_
->
maxIterations
(
20
);
graph_
->
maxIterations
(
20
);
graph_
->
errorThreshold
(
1e-4
);
graph_
->
errorThreshold
(
1e-4
);
ns
=
graph_
->
createStateSelector
(
"node-selector"
);
components
.
push_back
(
ns
);
ns
=
graph_
->
createStateSelector
(
"node-selector"
);
n1
=
ns
->
createState
(
"node 1"
);
components
.
push_back
(
n1
);
n1
=
ns
->
createState
(
"node 1"
);
components
.
push_back
(
n1
);
n2
=
ns
->
createState
(
"node 2"
);
components
.
push_back
(
n2
);
n2
=
ns
->
createState
(
"node 2"
);
components
.
push_back
(
n2
);
e11
=
n1
->
linkTo
(
"edge 11"
,
n1
);
components
.
push_back
(
e11
);
e11
=
n1
->
linkTo
(
"edge 11"
,
n1
);
components
.
push_back
(
e11
);
...
...
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