Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Stack Of Tasks
sot-torque-control
Commits
7483990d
Commit
7483990d
authored
Mar 12, 2021
by
Guilhem Saurel
Browse files
[Tests] use example-robot-data
parent
1e9e3fa2
Changes
2
Hide whitespace changes
Inline
Side-by-side
tests/CMakeLists.txt
View file @
7483990d
# Make Boost.Test generates the main function in test cases.
ADD_DEFINITIONS
(
-DBOOST_TEST_DYN_LINK -DBOOST_TEST_MAIN
)
SET
(
urdfpath
${
SIMPLE_HUMANOID_DESCRIPTION_PKGDATAROOTDIR
}
/simple_humanoid_description/urdf/simple_humanoid.urdf
)
# Add unit tests for validation
MACRO
(
SOT_TOR_CTR_TEST NAME
)
ADD_UNIT_TEST
(
test-
${
NAME
}
test-
${
NAME
}
.cpp
)
TARGET_LINK_LIBRARIES
(
test-
${
NAME
}
PRIVATE
${
PROJECT_NAME
}
Boost::unit_test_framework
${
NAME
}
dynamic-graph::dynamic-graph pinocchio::pinocchio
)
TARGET_COMPILE_DEFINITIONS
(
test-
${
NAME
}
PUBLIC URDF_FULL_PATH=
"
${
urdfpath
}
"
)
dynamic-graph::dynamic-graph pinocchio::pinocchio example-robot-data::example-robot-data
)
ENDMACRO
(
SOT_TOR_CTR_TEST
)
SOT_TOR_CTR_TEST
(
control-manager
)
...
...
tests/test-control-manager.cpp
View file @
7483990d
...
...
@@ -7,6 +7,8 @@
#include <sstream>
#include <iostream>
#include <example-robot-data/path.hpp>
#include <dynamic-graph/factory.h>
// Needed for sendMsg.
...
...
@@ -35,7 +37,7 @@ BOOST_AUTO_TEST_CASE(testControlManager) {
a_control_manager
.
setLoggerVerbosityLevel
(
dynamicgraph
::
VERBOSITY_ALL
);
std
::
string
robotRef
(
"simple_humanoid_description"
);
a_control_manager
.
init
(
0.001
,
URDF_FULL_PATH
,
robotRef
);
a_control_manager
.
init
(
0.001
,
EXAMPLE_ROBOT_DATA_MODEL_DIR
"/simple_humanoid_description/urdf/simple_humanoid.urdf"
,
robotRef
);
dynamicgraph
::
Vector
av
;
a_control_manager
.
m_uSOUT
.
needUpdate
(
6
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment