Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
sot-dyninv
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Stack Of Tasks
sot-dyninv
Commits
082b7f78
Commit
082b7f78
authored
12 years ago
by
Nicolas Mansard
Browse files
Options
Downloads
Patches
Plain Diff
Minor modifs in the meta tasks.
parent
e496b99c
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
python/meta_task_dyn_6d.py
+15
-15
15 additions, 15 deletions
python/meta_task_dyn_6d.py
python/meta_tasks_dyn.py
+6
-3
6 additions, 3 deletions
python/meta_tasks_dyn.py
with
21 additions
and
18 deletions
python/meta_task_dyn_6d.py
+
15
−
15
View file @
082b7f78
...
...
@@ -21,20 +21,20 @@ class MetaTaskDyn6d(MetaTask6d):
def
__init__
(
self
,
*
args
):
MetaTask6d
.
__init__
(
self
,
*
args
)
self
.
opPointModif
=
OpPointModifier
(
'
opmodif
'
+
self
.
name
)
plug
(
self
.
dyn
.
signal
(
self
.
opPoint
),
self
.
opPointModif
.
signal
(
'
positionIN
'
))
plug
(
self
.
dyn
.
signal
(
'
J
'
+
self
.
opPoint
),
self
.
opPointModif
.
signal
(
'
jacobianIN
'
))
self
.
opPointModif
.
activ
=
False
#
self.opPointModif = OpPointModifier('opmodif'+self.name)
#
plug(self.dyn.signal(self.opPoint),self.opPointModif.signal('positionIN'))
#
plug(self.dyn.signal('J'+self.opPoint),self.opPointModif.signal('jacobianIN'))
#
self.opPointModif.activ = False
@property
def
opmodif
(
self
):
if
not
self
.
opPointModif
.
activ
:
return
False
else
:
return
self
.
opPointModif
.
getTransformation
()
#
@property
#
def opmodif(self):
#
if not self.opPointModif.activ: return False
#
else: return self.opPointModif.getTransformation()
@opmodif.setter
def
opmodif
(
self
,
m
):
if
not
self
.
opPointModif
.
activ
:
plug
(
self
.
opPointModif
.
signal
(
'
position
'
),
self
.
feature
.
position
)
plug
(
self
.
opPointModif
.
signal
(
'
jacobian
'
),
self
.
feature
.
Jq
)
self
.
opPointModif
.
activ
=
True
self
.
opPointModif
.
setTransformation
(
m
)
#
@opmodif.setter
#
def opmodif(self,m):
#
if not self.opPointModif.activ:
#
plug(self.opPointModif.signal('position'),self.feature.position )
#
plug(self.opPointModif.signal('jacobian'),self.feature.Jq)
#
self.opPointModif.activ = True
#
self.opPointModif.setTransformation(m)
This diff is collapsed.
Click to expand it.
python/meta_tasks_dyn.py
+
6
−
3
View file @
082b7f78
...
...
@@ -8,7 +8,10 @@ from numpy import matrix, identity, zeros, eye
def
setGain
(
gain
,
val
):
if
val
!=
None
:
if
isinstance
(
val
,
int
)
or
len
(
val
)
==
1
:
gain
.
setConstant
(
val
)
if
isinstance
(
val
,
int
)
or
isinstance
(
val
,
float
):
gain
.
setConstant
(
val
)
if
len
(
val
)
==
1
:
gain
.
setConstant
(
val
[
0
])
elif
len
(
val
)
==
3
:
gain
.
set
(
val
[
0
],
val
[
1
],
val
[
2
])
elif
len
(
val
)
==
4
:
gain
.
setByPoint
(
val
[
0
],
val
[
1
],
val
[
2
],
val
[
3
])
...
...
@@ -22,7 +25,7 @@ def goto6d(task,position,gain=None):
task
.
featureDes
.
position
.
value
=
matrixToTuple
(
M
)
task
.
task
.
resetJacobianDerivative
()
def
gotoNd
(
task
,
position
,
selec
,
gain
=
None
):
def
gotoNd
(
task
,
position
,
selec
,
gain
=
None
,
resetJacobian
=
True
):
M
=
eye
(
4
)
if
isinstance
(
position
,
matrix
):
position
=
vectorToTuple
(
position
)
if
(
len
(
position
)
==
3
):
M
[
0
:
3
,
3
]
=
position
...
...
@@ -30,7 +33,7 @@ def gotoNd(task,position,selec,gain=None):
if
isinstance
(
selec
,
str
):
task
.
feature
.
selec
.
value
=
selec
else
:
task
.
feature
.
selec
.
value
=
toFlags
(
selec
)
task
.
featureDes
.
position
.
value
=
matrixToTuple
(
M
)
task
.
task
.
resetJacobianDerivative
()
if
resetJacobian
:
task
.
task
.
resetJacobianDerivative
()
setGain
(
task
.
gain
,
gain
)
def
addContactFromMetaTask
(
sot
,
contact
,
task
=
None
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment