Commit 93fc2c0e authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

[Python 3]

parent a5745435
......@@ -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}
......@@ -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)
......
......@@ -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)
......
......@@ -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):
......
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):
......
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
......
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):
......
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
......
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):
......
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):
......
......@@ -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):
......
......@@ -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)))
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment