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
sot-core
Commits
ee127dd2
Commit
ee127dd2
authored
Feb 09, 2021
by
Guilhem Saurel
Browse files
flake8
parent
0dca82c9
Changes
8
Hide whitespace changes
Inline
Side-by-side
src/dynamic_graph/sot/core/__init__.py
View file @
ee127dd2
from
.
import
wrap
from
.wrap
import
Flags
from
.
import
wrap
# noqa
from
.wrap
import
Flags
# noqa
src/dynamic_graph/sot/core/meta_task_6d.py
View file @
ee127dd2
...
...
@@ -11,6 +11,7 @@ def toFlags(arr):
warn
(
"This function is deprecated. Please, use Flags directly."
)
return
Flags
(
arr
)
class
MetaTask6d
(
object
):
name
=
''
opPoint
=
''
...
...
src/dynamic_graph/sot/core/meta_task_posture.py
View file @
ee127dd2
from
dynamic_graph
import
plug
from
dynamic_graph.sot.core
import
Flags
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
#
kept for backward compatibility
from
dynamic_graph.sot.core.meta_task_6d
import
toFlags
# noqa
kept for backward compatibility
from
dynamic_graph.sot.core.meta_tasks
import
setGain
from
dynamic_graph.sot.core.task
import
Task
from
numpy
import
identity
,
matrix
,
zeros
...
...
@@ -67,7 +68,9 @@ class MetaTaskPosture(object):
MetaTaskPosture
.
nbDof
=
len
(
self
.
feature
.
errorIN
.
value
)
qdes
=
zeros
((
MetaTaskPosture
.
nbDof
,
1
))
act
=
[
False
,
]
*
MetaTaskPosture
.
nbDof
act
=
[
False
,
]
*
MetaTaskPosture
.
nbDof
for
limbName
,
jointValues
in
kwargs
.
items
():
limbRange
=
self
.
postureRange
[
limbName
]
for
i
in
limbRange
:
...
...
src/dynamic_graph/sot/core/meta_tasks.py
View file @
ee127dd2
...
...
@@ -4,8 +4,8 @@ from dynamic_graph import plug
from
dynamic_graph.sot.core
import
Flags
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
#
kept for backward compatibility
from
dynamic_graph.sot.core.matrix_util
import
rpy2tr
from
dynamic_graph.sot.core.meta_task_6d
import
toFlags
# noqa
kept for backward compatibility
class
MetaTaskCom
(
object
):
...
...
src/dynamic_graph/sot/core/meta_tasks_kine_relative.py
View file @
ee127dd2
...
...
@@ -2,7 +2,7 @@ from dynamic_graph import plug
from
dynamic_graph.sot.core
import
Flags
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
#
kept for backward compatibility
from
dynamic_graph.sot.core.meta_task_6d
import
MetaTask6d
,
toFlags
# noqa
kept for backward compatibility
from
dynamic_graph.sot.core.meta_tasks
import
generic6dReference
,
setGain
from
dynamic_graph.sot.core.op_point_modifier
import
OpPointModifier
...
...
tests/python/initialize-euler.py
View file @
ee127dd2
...
...
@@ -2,7 +2,6 @@
import
unittest
import
dynamic_graph
as
dgpy
import
dynamic_graph.sot.core.integrator_euler
as
ie
...
...
tests/python/python_imports.py
View file @
ee127dd2
...
...
@@ -2,98 +2,99 @@
import
unittest
class
PythonImportTest
(
unittest
.
TestCase
):
def
test_math_small_entities
(
self
):
try
:
import
dynamic_graph.sot.core.math_small_entities
import
dynamic_graph.sot.core.math_small_entities
# noqa
except
ImportError
as
ie
:
self
.
fail
(
str
(
ie
))
def
test_feature_position_relative
(
self
):
try
:
import
dynamic_graph.sot.core.feature_position_relative
import
dynamic_graph.sot.core.feature_position_relative
# noqa
except
ImportError
as
ie
:
self
.
fail
(
str
(
ie
))
def
test_feature_position
(
self
):
try
:
import
dynamic_graph.sot.core.feature_position
import
dynamic_graph.sot.core.feature_position
# noqa
except
ImportError
as
ie
:
self
.
fail
(
str
(
ie
))
def
test_matrix_util
(
self
):
try
:
import
dynamic_graph.sot.core.matrix_util
import
dynamic_graph.sot.core.matrix_util
# noqa
except
ImportError
as
ie
:
self
.
fail
(
str
(
ie
))
def
test_meta_task_6d
(
self
):
try
:
import
dynamic_graph.sot.core.meta_task_6d
import
dynamic_graph.sot.core.meta_task_6d
# noqa
except
ImportError
as
ie
:
self
.
fail
(
str
(
ie
))
def
test_meta_task_posture
(
self
):
try
:
import
dynamic_graph.sot.core.meta_task_posture
import
dynamic_graph.sot.core.meta_task_posture
# noqa
except
ImportError
as
ie
:
self
.
fail
(
str
(
ie
))
def
test_meta_task_visual_point
(
self
):
try
:
import
dynamic_graph.sot.core.meta_task_visual_point
import
dynamic_graph.sot.core.meta_task_visual_point
# noqa
except
ImportError
as
ie
:
self
.
fail
(
str
(
ie
))
def
test_meta_tasks_kine_relative
(
self
):
try
:
import
dynamic_graph.sot.core.meta_tasks_kine_relative
import
dynamic_graph.sot.core.meta_tasks_kine_relative
# noqa
except
ImportError
as
ie
:
self
.
fail
(
str
(
ie
))
def
test_meta_tasks_kine
(
self
):
try
:
import
dynamic_graph.sot.core.meta_tasks_kine
import
dynamic_graph.sot.core.meta_tasks_kine
# noqa
except
ImportError
as
ie
:
self
.
fail
(
str
(
ie
))
def
test_meta_tasks
(
self
):
try
:
import
dynamic_graph.sot.core.meta_tasks
import
dynamic_graph.sot.core.meta_tasks
# noqa
except
ImportError
as
ie
:
self
.
fail
(
str
(
ie
))
def
test_attime
(
self
):
try
:
import
dynamic_graph.sot.core.utils.attime
import
dynamic_graph.sot.core.utils.attime
# noqa
except
ImportError
as
ie
:
self
.
fail
(
str
(
ie
))
def
test_history
(
self
):
try
:
import
dynamic_graph.sot.core.utils.history
import
dynamic_graph.sot.core.utils.history
# noqa
except
ImportError
as
ie
:
self
.
fail
(
str
(
ie
))
@
unittest
.
skip
(
"Fail on 'import dynamic_graph.matlab'"
)
def
test_thread_interruptible_loop
(
self
):
try
:
import
dynamic_graph.sot.core.utils.thread_interruptible_loop
import
dynamic_graph.sot.core.utils.thread_interruptible_loop
# noqa
except
ImportError
as
ie
:
self
.
fail
(
str
(
ie
))
def
test_viewer_helper
(
self
):
try
:
import
dynamic_graph.sot.core.utils.viewer_helper
import
dynamic_graph.sot.core.utils.viewer_helper
# noqa
except
ImportError
as
ie
:
self
.
fail
(
str
(
ie
))
def
test_viewer_loger
(
self
):
try
:
import
dynamic_graph.sot.core.utils.viewer_loger
import
dynamic_graph.sot.core.utils.viewer_loger
# noqa
except
ImportError
as
ie
:
self
.
fail
(
str
(
ie
))
if
__name__
==
'__main__'
:
unittest
.
main
()
tests/python/test-smooth-reach.py
View file @
ee127dd2
...
...
@@ -3,6 +3,7 @@
import
unittest
from
dynamic_graph.sot.core.smooth_reach
import
SmoothReach
class
SmoothReachTest
(
unittest
.
TestCase
):
def
test_smooth_reach
(
self
):
sr
=
SmoothReach
(
"banana"
)
...
...
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