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
Show more breadcrumbs
Guilhem Saurel
sot-dyninv
Commits
a25df243
Commit
a25df243
authored
12 years ago
by
Francois Keith
Browse files
Options
Downloads
Patches
Plain Diff
Clean and comment the kine script with romeo.
parent
7dd80eaa
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
python/ros/ros-kineromeo.py
+17
-4
17 additions, 4 deletions
python/ros/ros-kineromeo.py
with
17 additions
and
4 deletions
python/ros/ros-kineromeo.py
+
17
−
4
View file @
a25df243
...
...
@@ -18,18 +18,24 @@ from dynamic_graph.sot.core.matrix_util import matrixToTuple, vectorToTuple,rota
from
dynamic_graph.sot.core.meta_tasks_kine
import
*
from
numpy
import
*
# Create the robot romeo.
from
dynamic_graph.sot.romeo.romeo
import
*
robot
=
Robot
(
'
robot
'
)
robot
=
Robot
(
'
romeo
'
,
device
=
RobotSimu
(
'
romeo
'
))
plug
(
robot
.
device
.
state
,
robot
.
dynamic
.
position
)
# Binds with ROS. assert that roscore is running.
from
dynamic_graph.ros
import
*
ros
=
Ros
(
robot
)
# Create a solver.
# Create a simple kinematic solver.
from
dynamic_graph.sot.dynamics.solver
import
Solver
solver
=
Solver
(
robot
)
# Alternate visualization tool
from
dynamic_graph.sot.core.utils.viewer_helper
import
addRobotViewer
addRobotViewer
(
robot
.
device
,
small
=
True
,
small_extra
=
24
,
verbose
=
False
)
#-------------------------------------------------------------------------------
#----- MAIN LOOP ---------------------------------------------------------------
#-------------------------------------------------------------------------------
...
...
@@ -47,9 +53,10 @@ runner=inc()
# ---- TASKS -------------------------------------------------------------------
# ---- TASKS -------------------------------------------------------------------
# ---- TASK GRIP ---
# Defines a task for the right hand.
taskRH
=
MetaTaskKine6d
(
'
rh
'
,
robot
.
dynamic
,
'
right-wrist
'
,
'
right-wrist
'
)
# Move the operational point.
handMgrip
=
eye
(
4
);
handMgrip
[
0
:
3
,
3
]
=
(
0.1
,
0
,
0
)
taskRH
.
opmodif
=
matrixToTuple
(
handMgrip
)
taskRH
.
feature
.
frame
(
'
desired
'
)
...
...
@@ -73,9 +80,15 @@ for name,joint in [ ['LF','left-ankle'], ['RF','right-ankle' ] ]:
# --- RUN ----------------------------------------------------------------------
# Move the desired position of the right hand
# 1st param: task concerned
# 2st param: objective
# 3rd param: selected parameters
# 4th param: gain
target
=
(
0.5
,
-
0.2
,
0.8
)
gotoNd
(
taskRH
,
target
,
'
111
'
,(
4.9
,
0.9
,
0.01
,
0.9
))
# Fill the stack with some tasks.
solver
.
push
(
contactRF
.
task
)
solver
.
push
(
contactLF
.
task
)
solver
.
push
(
robot
.
comTask
)
...
...
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