Skip to content
GitLab
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
dynamic-graph-tutorial
Commits
305bd4be
Commit
305bd4be
authored
Nov 18, 2020
by
Guilhem Saurel
Browse files
Merge tag 'v1.3.0'
Release of version 1.3.0.
parents
2e8fbac3
4e650998
Pipeline
#12295
passed with stage
in 5 minutes and 35 seconds
Changes
9
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
305bd4be
...
...
@@ -32,18 +32,17 @@ COMPUTE_PROJECT_ARGS(PROJECT_ARGS LANGUAGES CXX)
PROJECT
(
${
PROJECT_NAME
}
${
PROJECT_ARGS
}
)
# Project dependencies
ADD_PROJECT_DEPENDENCY
(
dynamic-graph REQUIRED PKG_CONFIG_REQUIRES dynamic-graph
)
SET
(
BOOST_COMPONENTS unit_test_framework
)
ADD_PROJECT_DEPENDENCY
(
dynamic-graph REQUIRED
)
IF
(
BUILD_TESTING
)
FIND_PACKAGE
(
Boost REQUIRED COMPONENTS unit_test_framework
)
ENDIF
(
BUILD_TESTING
)
IF
(
BUILD_PYTHON_INTERFACE
)
FINDPYTHON
()
ADD_PROJECT_DEPENDENCY
(
dynamic-graph-python REQUIRED
PKG_CONFIG_REQUIRES dynamic-graph-python
)
SET
(
BOOST_COMPONENTS
${
BOOST_COMPONENTS
}
python
)
ADD_PROJECT_DEPENDENCY
(
dynamic-graph-python 4.0.0 REQUIRED
)
SEARCH_FOR_BOOST_PYTHON
(
REQUIRED
)
ENDIF
(
BUILD_PYTHON_INTERFACE
)
SEARCH_FOR_BOOST
()
# Main Library
SET
(
${
PROJECT_NAME
}
_HEADERS
include/
${
CUSTOM_HEADER_DIR
}
/inverted-pendulum.hh
...
...
@@ -58,8 +57,7 @@ SET(${PROJECT_NAME}_SOURCES
ADD_LIBRARY
(
${
PROJECT_NAME
}
SHARED
${${
PROJECT_NAME
}
_SOURCES
}
${${
PROJECT_NAME
}
_HEADERS
}
)
TARGET_INCLUDE_DIRECTORIES
(
${
PROJECT_NAME
}
PUBLIC $<INSTALL_INTERFACE:include>
)
TARGET_LINK_LIBRARIES
(
${
PROJECT_NAME
}
${
Boost_LIBRARIES
}
dynamic-graph::dynamic-graph
)
TARGET_LINK_LIBRARIES
(
${
PROJECT_NAME
}
PUBLIC dynamic-graph::dynamic-graph
)
IF
(
SUFFIX_SO_VERSION
)
SET_TARGET_PROPERTIES
(
${
PROJECT_NAME
}
PROPERTIES SOVERSION
${
PROJECT_VERSION
}
)
...
...
@@ -70,7 +68,9 @@ IF(NOT INSTALL_PYTHON_INTERFACE_ONLY)
ENDIF
(
NOT INSTALL_PYTHON_INTERFACE_ONLY
)
ADD_SUBDIRECTORY
(
src
)
ADD_SUBDIRECTORY
(
tests
)
IF
(
BUILD_TESTING
)
ADD_SUBDIRECTORY
(
tests
)
ENDIF
(
BUILD_TESTING
)
IF
(
NOT INSTALL_PYTHON_INTERFACE_ONLY
)
INSTALL
(
FILES package.xml DESTINATION share/
${
PROJECT_NAME
}
)
...
...
cmake
@
59d817dc
Compare
51be0c4d
...
59d817dc
Subproject commit 5
1be0c4d7a335a3b1927b80822ecdd037e84a8e5
Subproject commit 5
9d817dca29527e98bdbef555e09f25358810cae
include/dynamic-graph/tutorial/feedback-controller.hh
View file @
305bd4be
...
...
@@ -54,7 +54,7 @@ class FeedbackController : public Entity {
@}
*/
p
rotected
:
p
ublic
:
/*
\brief Class name
*/
...
...
include/dynamic-graph/tutorial/inverted-pendulum.hh
View file @
305bd4be
...
...
@@ -125,7 +125,7 @@ class InvertedPendulum : public Entity {
@}
*/
p
rotected
:
p
ublic
:
/*
\brief Class name
*/
...
...
package.xml
View file @
305bd4be
<?xml version="1.0"?>
<package
format=
"3"
>
<name>
dynamic-graph-tutorial
</name>
<version>
1.
2.2
</version>
<version>
1.
3.0
</version>
<description>
Dynamic graph tutorial
</description>
...
...
src/CMakeLists.txt
View file @
305bd4be
IF
(
BUILD_PYTHON_INTERFACE
)
PYTHON_INSTALL_ON_SITE
(
"dynamic_graph/tutorial"
simu.py
)
DYNAMIC_GRAPH_PYTHON_MODULE
(
"tutorial"
${
PROJECT_NAME
}
wrap
)
DYNAMIC_GRAPH_PYTHON_MODULE
(
"tutorial"
${
PROJECT_NAME
}
tutorial-wrap
MODULE_HEADER
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/tutorial-python.h"
)
ENDIF
(
BUILD_PYTHON_INTERFACE
)
src/dynamic_graph/tutorial/simu.py
View file @
305bd4be
...
...
@@ -26,14 +26,9 @@ def build_graph():
s
=
stateOut
f
=
forceIn
s
.
value
=
(
0.0
,
0.1
,
0.0
,
0.0
)
gain
=
((
0.0
,
27.0
,
0.001
,
0.001
,
),
)
s
.
value
=
np
.
array
((
0.0
,
0.1
,
0.0
,
0.0
))
gain
=
np
.
array
((
0.0
,
27.0
,
0.001
,
0.001
))
b
.
setGain
(
gain
,
)
return
s
,
f
,
a
...
...
src/tutorial-python.h
0 → 100644
View file @
305bd4be
#include
"dynamic-graph/tutorial/feedback-controller.hh"
#include
"dynamic-graph/tutorial/inverted-pendulum.hh"
typedef
boost
::
mpl
::
vector
<
dynamicgraph
::
tutorial
::
FeedbackController
,
dynamicgraph
::
tutorial
::
InvertedPendulum
>
entities_t
;
tests/CMakeLists.txt
View file @
305bd4be
ADD_DEFINITIONS
(
-DBOOST_TEST_DYN_LINK -DBOOST_TEST_MAIN
)
ADD_UNIT_TEST
(
pendulum pendulum.cpp
)
TARGET_LINK_LIBRARIES
(
pendulum
${
PROJECT_NAME
}
${
Boost_UNIT_TEST_FRAMEWORK_LIBRARY
}
dynamic-graph::dynamic-graph
)
TARGET_INCLUDE_DIRECTORIES
(
pendulum PUBLIC dynamic-graph::dynamic-graph
)
TARGET_LINK_LIBRARIES
(
pendulum PRIVATE
${
PROJECT_NAME
}
Boost::unit_test_framework
)
ADD_UNIT_TEST
(
controller controller.cpp
)
TARGET_LINK_LIBRARIES
(
controller
${
PROJECT_NAME
}
${
Boost_UNIT_TEST_FRAMEWORK_LIBRARY
}
dynamic-graph::dynamic-graph
)
TARGET_INCLUDE_DIRECTORIES
(
controller PUBLIC dynamic-graph::dynamic-graph
)
TARGET_LINK_LIBRARIES
(
controller PRIVATE
${
PROJECT_NAME
}
Boost::unit_test_framework
)
IF
(
BUILD_PYTHON_INTERFACE
)
ADD_PYTHON_UNIT_TEST
(
simu
"tests/simu.py"
src
)
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment