Skip to content

Commit 93fc2c0

Browse files
committed
[Python 3]
1 parent a574543 commit 93fc2c0

File tree

12 files changed

+33
-24
lines changed

12 files changed

+33
-24
lines changed

doc/sphinx/conf.py.in

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,21 @@
1111
# All configuration values have a default; values that are commented out
1212
# serve to show the default.
1313

14-
import sys, os
14+
import os
15+
import sys
1516

1617
# If extensions (or modules to document with autodoc) are in another directory,
1718
# add these directories to sys.path here. If the directory is relative to the
1819
# documentation root, use os.path.abspath to make it absolute, like shown here.
19-
sys.path = [os.path.abspath('@CMAKE_INSTALL_PREFIX@/@PYTHON_SITELIB@')]+sys.path
20-
sys.path = [os.path.abspath('@CMAKE_BINARY_DIR@/src')]+sys.path
21-
sys.path = [os.path.abspath('@CMAKE_SOURCE_DIR@/src')]+sys.path
20+
sys.path = [os.path.abspath('@CMAKE_INSTALL_PREFIX@/@PYTHON_SITELIB@')] + sys.path
21+
sys.path = [os.path.abspath('@CMAKE_BINARY_DIR@/src')] + sys.path
22+
sys.path = [os.path.abspath('@CMAKE_SOURCE_DIR@/src')] + sys.path
2223

2324
# -- General configuration -----------------------------------------------------
2425

2526
# Add any Sphinx extension module names here, as strings. They can be extensions
2627
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
27-
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.intersphinx', 'sphinx.ext.todo', 'sphinx.ext.pngmath']
28+
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.intersphinx', 'sphinx.ext.todo']
2829

2930
# Add any paths that contain templates here, relative to this directory.
3031
templates_path = ['_templates']
@@ -88,7 +89,6 @@ pygments_style = 'sphinx'
8889
# A list of ignored prefixes for module index sorting.
8990
#modindex_common_prefix = []
9091

91-
9292
# -- Options for HTML output ---------------------------------------------------
9393

9494
# The theme to use for HTML and HTML Help pages. Major themes that come with
@@ -162,7 +162,6 @@ html_static_path = ['_static']
162162
# Output file base name for HTML help builder.
163163
htmlhelp_basename = '@PROJECT_NAME@doc'
164164

165-
166165
# -- Options for LaTeX output --------------------------------------------------
167166

168167
# The paper size ('letter' or 'a4').
@@ -174,8 +173,7 @@ htmlhelp_basename = '@PROJECT_NAME@doc'
174173
# Grouping the document tree into LaTeX files. List of tuples
175174
# (source start file, target name, title, author, documentclass [howto/manual]).
176175
latex_documents = [
177-
('index', '@[email protected]', u'@PROJECT_NAME@ Documentation',
178-
u'Florent Lamiraux', 'manual'),
176+
('index', '@[email protected]', u'@PROJECT_NAME@ Documentation', u'Florent Lamiraux', 'manual'),
179177
]
180178

181179
# The name of an image file (relative to this directory) to place at the top of
@@ -195,6 +193,5 @@ latex_documents = [
195193
# If false, no module index is generated.
196194
#latex_use_modindex = True
197195

198-
199196
# Example configuration for intersphinx: refer to the Python standard library.
200197
intersphinx_mapping = {'http://docs.python.org/': None}

include/sot/core/gain-adaptive.hh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public: /* --- INIT --- */
9090
*
9191
* To visualize the curve of the gain versus the error, use
9292
* \code{.py}
93-
* from dynamic_graph.sot.core import GainAdaptive
93+
* from dynamic_graph.sot.core.gain_adaptive import GainAdaptive
9494
* import numpy, matplotlib.pyplot as plt
9595
* g = GainAdaptive('g')
9696
* g.setByPoint(4.9, 0.001, 0.01, 0.1)

src/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ ENDIF(WIN32)
8181

8282
set(feature-task_deps feature-generic task)
8383
set(feature-point6d-relative_deps feature-point6d)
84-
set(sot_deps task)
84+
set(sot_deps task feature-posture)
8585
set(sequencer_deps sot)
8686
set(task-conti_deps task)
8787
set(task-pd_deps task)

src/dynamic_graph/sot/core/feature_position.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
from dynamic_graph import plug
66
from dynamic_graph.entity import Entity
7-
from dynamic_graph.sot.core import FeaturePoint6d
7+
from dynamic_graph.sot.core.feature_point6d import FeaturePoint6d
88

99

1010
class FeaturePosition(Entity):

src/dynamic_graph/sot/core/meta_task_6d.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
from dynamic_graph import plug
2-
from dynamic_graph.sot.core import FeaturePoint6d, GainAdaptive, OpPointModifier, Task
2+
from dynamic_graph.sot.core.feature_point6d import FeaturePoint6d
3+
from dynamic_graph.sot.core.gain_adaptive import GainAdaptive
4+
from dynamic_graph.sot.core.op_point_modifier import OpPointModifier
5+
from dynamic_graph.sot.core.sot import Task
36

47

58
def toFlags(arr):
@@ -26,8 +29,8 @@ class MetaTask6d(object):
2629
featureDes = 0
2730

2831
def opPointExist(self, opPoint):
29-
sigsP = filter(lambda x: x.getName().split(':')[-1] == opPoint, self.dyn.signals())
30-
sigsJ = filter(lambda x: x.getName().split(':')[-1] == 'J' + opPoint, self.dyn.signals())
32+
sigsP = [x for x in self.dyn.signals() if x.getName().split(':')[-1] == opPoint]
33+
sigsJ = [x for x in self.dyn.signals() if x.getName().split(':')[-1] == 'J' + opPoint]
3134
return len(sigsP) == 1 & len(sigsJ) == 1
3235

3336
def defineDynEntities(self, dyn):

src/dynamic_graph/sot/core/meta_task_posture.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
from dynamic_graph import plug
2-
from dynamic_graph.sot.core import FeatureGeneric, GainAdaptive, Task
2+
from dynamic_graph.sot.core.feature_generic import FeatureGeneric
3+
from dynamic_graph.sot.core.gain_adaptive import GainAdaptive
34
from dynamic_graph.sot.core.matrix_util import matrixToTuple, vectorToTuple
45
from dynamic_graph.sot.core.meta_task_6d import toFlags
56
from dynamic_graph.sot.core.meta_tasks import setGain
7+
from dynamic_graph.sot.core.sot import Task
68
from numpy import identity, matrix, zeros
79

810

src/dynamic_graph/sot/core/meta_task_visual_point.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
from dynamic_graph import plug
2-
from dynamic_graph.sot.core import FeatureVisualPoint, GainAdaptive, OpPointModifier, Task, VisualPointProjecter
2+
from dynamic_graph.sot.core.feature_visual_point import FeatureVisualPoint
3+
from dynamic_graph.sot.core.gain_adaptive import GainAdaptive
34
from dynamic_graph.sot.core.meta_tasks import setGain
5+
from dynamic_graph.sot.core.op_point_modifier import OpPointModifier
6+
from dynamic_graph.sot.core.sot import Task
7+
from dynamic_graph.sot.core.visual_point_projecter import VisualPointProjecter
48

59

610
class MetaTaskVisualPoint(object):

src/dynamic_graph/sot/core/meta_tasks.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from dynamic_graph import plug
2-
from dynamic_graph.sot.core import FeatureGeneric, GainAdaptive
2+
from dynamic_graph.sot.core.feature_generic import FeatureGeneric
3+
from dynamic_graph.sot.core.gain_adaptive import GainAdaptive
34
from dynamic_graph.sot.core.matrix_util import matrixToTuple, rpy2tr
45
from dynamic_graph.sot.core.meta_task_6d import toFlags
56
from numpy import array, eye, matrix, ndarray

src/dynamic_graph/sot/core/meta_tasks_kine.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
from dynamic_graph import plug
2-
from dynamic_graph.sot.core import GainAdaptive, Task
2+
from dynamic_graph.sot.core.gain_adaptive import GainAdaptive
33
from dynamic_graph.sot.core.meta_task_6d import MetaTask6d
44
# TODO: this function is imported from meta_tasks_kine in several places, whereas it is defined in meta_tasks
55
from dynamic_graph.sot.core.meta_tasks import gotoNd # noqa
66
from dynamic_graph.sot.core.meta_tasks import MetaTaskCom
7+
from dynamic_graph.sot.core.sot import Task
78

89

910
class MetaTaskKine6d(MetaTask6d):

src/dynamic_graph/sot/core/meta_tasks_kine_relative.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
from dynamic_graph import plug
2-
from dynamic_graph.sot.core import OpPointModifier
3-
from dynamic_graph.sot.core.feature_point6d_relative import FeaturePoint6dRelative
2+
from dynamic_graph.sot.core.feature_point6d_relative import \
3+
FeaturePoint6dRelative
44
from dynamic_graph.sot.core.matrix_util import matrixToTuple
55
from dynamic_graph.sot.core.meta_task_6d import MetaTask6d, toFlags
66
from dynamic_graph.sot.core.meta_tasks import generic6dReference, setGain
7+
from dynamic_graph.sot.core.op_point_modifier import OpPointModifier
78

89

910
class MetaTaskKine6dRel(MetaTask6d):

0 commit comments

Comments
 (0)