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
f37edaab
Commit
f37edaab
authored
11 years ago
by
Francois Keith
Browse files
Options
Downloads
Patches
Plain Diff
Complete ros-walkromeo.py script
Remove useseless dependency in sot-dyninv. Add the two missing tasks.
parent
1b9ac966
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
python/ros/ros-walkromeo.py
+21
-3
21 additions, 3 deletions
python/ros/ros-walkromeo.py
with
21 additions
and
3 deletions
python/ros/ros-walkromeo.py
+
21
−
3
View file @
f37edaab
...
...
@@ -11,7 +11,6 @@ from dynamic_graph.sot.core.matrix_util import matrixToTuple, vectorToTuple,rota
from
dynamic_graph.sot.core.meta_tasks_kine
import
*
from
dynamic_graph.sot.core.utils.thread_interruptible_loop
import
loopInThread
,
loopShortcuts
from
dynamic_graph.sot.core.utils.viewer_helper
import
addRobotViewer
,
VisualPinger
,
updateComDisplay
from
dynamic_graph.sot.dyninv
import
SolverKine
from
numpy
import
*
def
totuple
(
a
):
...
...
@@ -90,11 +89,13 @@ taskLF.task.controlGain.value = 40
taskHead
=
MetaTask6d
(
'
head
'
,
robot
.
dynamic
,
'
gaze
'
,
'
gaze
'
)
# 2\ Link the orientation of the right foot to the desired position of the head.
plug
(
taskRF
.
featureDes
.
position
,
taskHead
.
featureDes
.
position
)
# 3\ Only constraint the rotation of the head.
taskHead
.
feature
.
selec
.
value
=
'
111000
'
# 4\ set the gain
taskHead
.
task
.
controlGain
.
value
=
5
# ---- ARMS ---
...
...
@@ -105,10 +106,24 @@ taskHead=MetaTask6d('head',robot.dynamic,'gaze','gaze')
# * the reference position is the position given by the entity dyn,
# * the jacobian is the identity: ... = totuple( identity(robot.dimension) )
# * the joint controlled are those of the two arms [12,25] sur 39.
featurePosition
=
FeatureGeneric
(
'
featurePosition
'
)
featurePositionDes
=
FeatureGeneric
(
'
featurePositionDes
'
)
featurePosition
.
setReference
(
'
featurePositionDes
'
)
plug
(
robot
.
dynamic
.
position
,
featurePosition
.
errorIN
)
featurePositionDes
.
errorIN
.
value
=
robot
.
halfSitting
featurePosition
.
jacobianIN
.
value
=
totuple
(
identity
(
robot
.
dimension
)
)
# 2\ Define the task. Associate to the task the position feature.
taskPosition
=
Task
(
'
taskPosition
'
)
taskPosition
.
add
(
'
featurePosition
'
)
# 3\ (Optional) attach an adaptive gain (entity GainAdaptive) to the task created.
gainPosition
=
GainAdaptive
(
'
gainPosition
'
)
gainPosition
.
set
(
0.1
,
0.1
,
125e3
)
gainPosition
.
gain
.
value
=
5
plug
(
taskPosition
.
error
,
gainPosition
.
error
)
plug
(
gainPosition
.
gain
,
taskPosition
.
controlGain
)
featurePosition
.
selec
.
value
=
'
000000000000001111111111111100000000000
'
############################################################################
...
...
@@ -121,7 +136,10 @@ solver.push(taskWaist.task)
solver
.
push
(
taskRF
.
task
)
solver
.
push
(
taskLF
.
task
)
solver
.
push
(
taskCom
.
task
)
# Activate your new tasks.
# Stun the upper part of the body.
sot
.
push
(
taskHead
.
task
.
name
)
# constraint the head orientation: look straight ahead
sot
.
push
(
'
taskPosition
'
)
# stun the arms.
# --- HERDT PG AND START -------------------------------------------------------
# Set the algorithm generating the ZMP reference trajectory to Herdt's one.
...
...
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