diff --git a/doc/sphinx/conf.py.in b/doc/sphinx/conf.py.in index 52c449ff827cfafa033a7e2db9b1278fe2607c01..a629c7e3bfaa85a91be95809b5d75bd6db4e038c 100644 --- a/doc/sphinx/conf.py.in +++ b/doc/sphinx/conf.py.in @@ -11,20 +11,21 @@ # All configuration values have a default; values that are commented out # serve to show the default. -import sys, os +import os +import sys # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. -sys.path = [os.path.abspath('@CMAKE_INSTALL_PREFIX@/@PYTHON_SITELIB@')]+sys.path -sys.path = [os.path.abspath('@CMAKE_BINARY_DIR@/src')]+sys.path -sys.path = [os.path.abspath('@CMAKE_SOURCE_DIR@/src')]+sys.path +sys.path = [os.path.abspath('@CMAKE_INSTALL_PREFIX@/@PYTHON_SITELIB@')] + sys.path +sys.path = [os.path.abspath('@CMAKE_BINARY_DIR@/src')] + sys.path +sys.path = [os.path.abspath('@CMAKE_SOURCE_DIR@/src')] + sys.path # -- General configuration ----------------------------------------------------- # Add any Sphinx extension module names here, as strings. They can be extensions # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. -extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.intersphinx', 'sphinx.ext.todo', 'sphinx.ext.pngmath'] +extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.intersphinx', 'sphinx.ext.todo'] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] @@ -88,7 +89,6 @@ pygments_style = 'sphinx' # A list of ignored prefixes for module index sorting. #modindex_common_prefix = [] - # -- Options for HTML output --------------------------------------------------- # The theme to use for HTML and HTML Help pages. Major themes that come with @@ -162,7 +162,6 @@ html_static_path = ['_static'] # Output file base name for HTML help builder. htmlhelp_basename = '@PROJECT_NAME@doc' - # -- Options for LaTeX output -------------------------------------------------- # The paper size ('letter' or 'a4'). @@ -174,8 +173,7 @@ htmlhelp_basename = '@PROJECT_NAME@doc' # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, author, documentclass [howto/manual]). latex_documents = [ - ('index', '@PROJECT_NAME@.tex', u'@PROJECT_NAME@ Documentation', - u'Florent Lamiraux', 'manual'), + ('index', '@PROJECT_NAME@.tex', u'@PROJECT_NAME@ Documentation', u'Florent Lamiraux', 'manual'), ] # The name of an image file (relative to this directory) to place at the top of @@ -195,6 +193,5 @@ latex_documents = [ # If false, no module index is generated. #latex_use_modindex = True - # Example configuration for intersphinx: refer to the Python standard library. intersphinx_mapping = {'http://docs.python.org/': None} diff --git a/include/sot/core/gain-adaptive.hh b/include/sot/core/gain-adaptive.hh index 8209044b66a747bcd0acd4c5119816f392d63d55..e778242d8b54bc7ce42d2d4e5c626f89dddb6a4e 100644 --- a/include/sot/core/gain-adaptive.hh +++ b/include/sot/core/gain-adaptive.hh @@ -90,7 +90,7 @@ public: /* --- INIT --- */ * * To visualize the curve of the gain versus the error, use * \code{.py} - * from dynamic_graph.sot.core import GainAdaptive + * from dynamic_graph.sot.core.gain_adaptive import GainAdaptive * import numpy, matplotlib.pyplot as plt * g = GainAdaptive('g') * g.setByPoint(4.9, 0.001, 0.01, 0.1) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 517f2f39d7abd96a52fa13790514389eb604a301..9b71bd102a3cadfdfff1f42fcea06912e521d0fb 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -81,7 +81,7 @@ ENDIF(WIN32) set(feature-task_deps feature-generic task) set(feature-point6d-relative_deps feature-point6d) -set(sot_deps task) +set(sot_deps task feature-posture) set(sequencer_deps sot) set(task-conti_deps task) set(task-pd_deps task) diff --git a/src/dynamic_graph/sot/core/feature_position.py b/src/dynamic_graph/sot/core/feature_position.py index 711bf3c1d74dc1f8927f26af5503eb0e7e520a1d..c873f19efb3c2c3cfd42b199cddeda0163e2f0e1 100644 --- a/src/dynamic_graph/sot/core/feature_position.py +++ b/src/dynamic_graph/sot/core/feature_position.py @@ -4,7 +4,7 @@ from dynamic_graph import plug from dynamic_graph.entity import Entity -from dynamic_graph.sot.core import FeaturePoint6d +from dynamic_graph.sot.core.feature_point6d import FeaturePoint6d class FeaturePosition(Entity): diff --git a/src/dynamic_graph/sot/core/meta_task_6d.py b/src/dynamic_graph/sot/core/meta_task_6d.py index 4d51cfb21086544f48f6974a96b7b3c4377bb521..3e74db293c3796deb5186b5185fb33ac669b3d98 100644 --- a/src/dynamic_graph/sot/core/meta_task_6d.py +++ b/src/dynamic_graph/sot/core/meta_task_6d.py @@ -1,5 +1,8 @@ from dynamic_graph import plug -from dynamic_graph.sot.core import FeaturePoint6d, GainAdaptive, OpPointModifier, Task +from dynamic_graph.sot.core.feature_point6d import FeaturePoint6d +from dynamic_graph.sot.core.gain_adaptive import GainAdaptive +from dynamic_graph.sot.core.op_point_modifier import OpPointModifier +from dynamic_graph.sot.core.sot import Task def toFlags(arr): @@ -26,8 +29,8 @@ class MetaTask6d(object): featureDes = 0 def opPointExist(self, opPoint): - sigsP = filter(lambda x: x.getName().split(':')[-1] == opPoint, self.dyn.signals()) - sigsJ = filter(lambda x: x.getName().split(':')[-1] == 'J' + opPoint, self.dyn.signals()) + sigsP = [x for x in self.dyn.signals() if x.getName().split(':')[-1] == opPoint] + sigsJ = [x for x in self.dyn.signals() if x.getName().split(':')[-1] == 'J' + opPoint] return len(sigsP) == 1 & len(sigsJ) == 1 def defineDynEntities(self, dyn): diff --git a/src/dynamic_graph/sot/core/meta_task_posture.py b/src/dynamic_graph/sot/core/meta_task_posture.py index 02db373bae3b6e65bceaa3db05156c2e515492de..8e21c11ac8a9f5395b51cf846a1c0ebbcc585e6f 100644 --- a/src/dynamic_graph/sot/core/meta_task_posture.py +++ b/src/dynamic_graph/sot/core/meta_task_posture.py @@ -1,8 +1,10 @@ from dynamic_graph import plug -from dynamic_graph.sot.core import FeatureGeneric, GainAdaptive, Task +from dynamic_graph.sot.core.feature_generic import FeatureGeneric +from dynamic_graph.sot.core.gain_adaptive import GainAdaptive from dynamic_graph.sot.core.matrix_util import matrixToTuple, vectorToTuple from dynamic_graph.sot.core.meta_task_6d import toFlags from dynamic_graph.sot.core.meta_tasks import setGain +from dynamic_graph.sot.core.sot import Task from numpy import identity, matrix, zeros diff --git a/src/dynamic_graph/sot/core/meta_task_visual_point.py b/src/dynamic_graph/sot/core/meta_task_visual_point.py index 00712fec74fcaf77937baf712d88849e6c3d6e4f..24befbbbee495ddfd9680300a05dae4c8f3749a7 100644 --- a/src/dynamic_graph/sot/core/meta_task_visual_point.py +++ b/src/dynamic_graph/sot/core/meta_task_visual_point.py @@ -1,6 +1,10 @@ from dynamic_graph import plug -from dynamic_graph.sot.core import FeatureVisualPoint, GainAdaptive, OpPointModifier, Task, VisualPointProjecter +from dynamic_graph.sot.core.feature_visual_point import FeatureVisualPoint +from dynamic_graph.sot.core.gain_adaptive import GainAdaptive from dynamic_graph.sot.core.meta_tasks import setGain +from dynamic_graph.sot.core.op_point_modifier import OpPointModifier +from dynamic_graph.sot.core.sot import Task +from dynamic_graph.sot.core.visual_point_projecter import VisualPointProjecter class MetaTaskVisualPoint(object): diff --git a/src/dynamic_graph/sot/core/meta_tasks.py b/src/dynamic_graph/sot/core/meta_tasks.py index 88ad444953494852e3d6827bf62fb8dc69d882b5..d261a193ceb03bbda272b1100fb7b5bcccd8b515 100644 --- a/src/dynamic_graph/sot/core/meta_tasks.py +++ b/src/dynamic_graph/sot/core/meta_tasks.py @@ -1,5 +1,6 @@ from dynamic_graph import plug -from dynamic_graph.sot.core import FeatureGeneric, GainAdaptive +from dynamic_graph.sot.core.feature_generic import FeatureGeneric +from dynamic_graph.sot.core.gain_adaptive import GainAdaptive from dynamic_graph.sot.core.matrix_util import matrixToTuple, rpy2tr from dynamic_graph.sot.core.meta_task_6d import toFlags from numpy import array, eye, matrix, ndarray diff --git a/src/dynamic_graph/sot/core/meta_tasks_kine.py b/src/dynamic_graph/sot/core/meta_tasks_kine.py index 4bb19969f4bbc185b5b55f405f518e1b9d552b95..e6d82a195e4e8e70375cb0380f73f7ffe3067c20 100644 --- a/src/dynamic_graph/sot/core/meta_tasks_kine.py +++ b/src/dynamic_graph/sot/core/meta_tasks_kine.py @@ -1,9 +1,10 @@ from dynamic_graph import plug -from dynamic_graph.sot.core import GainAdaptive, Task +from dynamic_graph.sot.core.gain_adaptive import GainAdaptive from dynamic_graph.sot.core.meta_task_6d import MetaTask6d # TODO: this function is imported from meta_tasks_kine in several places, whereas it is defined in meta_tasks from dynamic_graph.sot.core.meta_tasks import gotoNd # noqa from dynamic_graph.sot.core.meta_tasks import MetaTaskCom +from dynamic_graph.sot.core.sot import Task class MetaTaskKine6d(MetaTask6d): diff --git a/src/dynamic_graph/sot/core/meta_tasks_kine_relative.py b/src/dynamic_graph/sot/core/meta_tasks_kine_relative.py index 9f7cfd5eb43ee295c2e80bd392ffc148caa8b530..db7decec194d4623c372ef1668c39574345b32d8 100644 --- a/src/dynamic_graph/sot/core/meta_tasks_kine_relative.py +++ b/src/dynamic_graph/sot/core/meta_tasks_kine_relative.py @@ -1,9 +1,10 @@ from dynamic_graph import plug -from dynamic_graph.sot.core import OpPointModifier -from dynamic_graph.sot.core.feature_point6d_relative import FeaturePoint6dRelative +from dynamic_graph.sot.core.feature_point6d_relative import \ + FeaturePoint6dRelative from dynamic_graph.sot.core.matrix_util import matrixToTuple from dynamic_graph.sot.core.meta_task_6d import MetaTask6d, toFlags from dynamic_graph.sot.core.meta_tasks import generic6dReference, setGain +from dynamic_graph.sot.core.op_point_modifier import OpPointModifier class MetaTaskKine6dRel(MetaTask6d): diff --git a/tests/python/matrix-util.py b/tests/python/matrix-util.py index 4617c708ae5b801e2bdc72f19569ccea0e0edb7a..d364f73262f5596ed94fb3443c51bfd59ed41569 100644 --- a/tests/python/matrix-util.py +++ b/tests/python/matrix-util.py @@ -3,7 +3,7 @@ import unittest import numpy as np -from dynamic_graph.sot.core import matrix_util as mod +import dynamic_graph.sot.core.matrix_util as mod class MatrixUtilTest(unittest.TestCase): diff --git a/tests/python/op-point-modifier.py b/tests/python/op-point-modifier.py index cfea8cd2ec69fc2256651eddc1a322919d1f91ff..3a13f680a0b8471ba626d9428d9bfecab26c922c 100755 --- a/tests/python/op-point-modifier.py +++ b/tests/python/op-point-modifier.py @@ -5,7 +5,7 @@ import unittest import numpy as np -from dynamic_graph.sot.core import OpPointModifier +from dynamic_graph.sot.core.op_point_modifier import OpPointModifier gaze = tuple(((1.0, 0.0, 0.0, 0.025000000000000001), (0.0, 1.0, 0.0, 0.0), (0.0, 0.0, 1.0, 0.64800000000000002), (0.0, 0.0, 0.0, 1.0)))