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
6c24fae6
Commit
6c24fae6
authored
Nov 18, 2020
by
Guilhem Saurel
Browse files
update for dynamic-graph-python v4
parent
22e1f28d
Changes
7
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
6c24fae6
...
...
@@ -33,15 +33,14 @@ 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
)
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
)
ADD_PROJECT_DEPENDENCY
(
dynamic-graph-python 4.0.0 REQUIRED
)
SEARCH_FOR_BOOST_PYTHON
(
REQUIRED
)
ENDIF
(
BUILD_PYTHON_INTERFACE
)
...
...
@@ -70,7 +69,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
)
ADD_SUBDIRECTORY
(
doc
)
IF
(
NOT INSTALL_PYTHON_INTERFACE_ONLY
)
...
...
cmake
@
59d817dc
Compare
91f97c1c
...
59d817dc
Subproject commit
91f97c1c31608f48d697a6b11037f13e878b9837
Subproject commit
59d817dca29527e98bdbef555e09f25358810cae
include/dynamic-graph/tutorial/feedback-controller.hh
View file @
6c24fae6
...
...
@@ -54,7 +54,7 @@ class FeedbackController : public Entity {
@}
*/
p
rotected
:
p
ublic
:
/*
\brief Class name
*/
...
...
include/dynamic-graph/tutorial/inverted-pendulum.hh
View file @
6c24fae6
...
...
@@ -125,7 +125,7 @@ class InvertedPendulum : public Entity {
@}
*/
p
rotected
:
p
ublic
:
/*
\brief Class name
*/
...
...
src/CMakeLists.txt
View file @
6c24fae6
IF
(
BUILD_PYTHON_INTERFACE
)
PYTHON_INSTALL_ON_SITE
(
"dynamic_graph/tutorial"
simu.py
)
DYNAMIC_GRAPH_PYTHON_MODULE
(
"tutorial"
${
PROJECT_NAME
}
tutorial-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 @
6c24fae6
...
...
@@ -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 @
6c24fae6
#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
;
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