Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
sot-hrp2
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
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-hrp2
Commits
25d5b3cf
Commit
25d5b3cf
authored
5 years ago
by
Olivier Stasse
Browse files
Options
Downloads
Patches
Plain Diff
[python] Initialization script for new device scheme.
parent
ab6263d4
Branches
topic/limits
No related tags found
No related merge requests found
Pipeline
#3038
failed with stages
Stage: build
Stage: test
in 59 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/dynamic_graph/sot/hrp2/hrp2.py
+23
-9
23 additions, 9 deletions
src/dynamic_graph/sot/hrp2/hrp2.py
src/dynamic_graph/sot/hrp2_14/robot.py
+1
-0
1 addition, 0 deletions
src/dynamic_graph/sot/hrp2_14/robot.py
with
24 additions
and
9 deletions
src/dynamic_graph/sot/hrp2/hrp2.py
+
23
−
9
View file @
25d5b3cf
...
...
@@ -67,13 +67,35 @@ class Hrp2(AbstractHumanoidRobot):
def
__init__
(
self
,
name
,
robotnumber
,
device
=
None
,
tracer
=
None
):
rospack
=
RosPack
()
self
.
urdfPath
=
rospack
.
get_path
(
'
hrp2_{0}_description
'
.
format
(
robotnumber
))
+
'
/urdf/hrp2_{0}_reduced.urdf
'
.
format
(
robotnumber
)
self
.
pinocchioModel
=
se3
.
buildModelFromUrdf
(
self
.
urdfPath
,
se3
.
JointModelFreeFlyer
())
self
.
pinocchioData
=
self
.
pinocchioModel
.
createData
()
self
.
dynamic
.
setModel
(
self
.
pinocchioModel
)
self
.
dynamic
.
setData
(
self
.
pinocchioData
)
self
.
dimension
=
self
.
dynamic
.
getDimension
()
# TODO For position limit, we remove the first value to get
# a vector of the good size because SoT use euler angles and not
# quaternions...
self
.
device
.
setPositionBounds
(
self
.
pinocchioModel
.
lowerPositionLimit
.
T
.
tolist
()[
0
][
1
:],
self
.
pinocchioModel
.
upperPositionLimit
.
T
.
tolist
()[
0
][
1
:])
self
.
device
.
setVelocityBounds
(
(
-
self
.
pinocchioModel
.
velocityLimit
).
T
.
tolist
()[
0
],
self
.
pinocchioModel
.
velocityLimit
.
T
.
tolist
()[
0
])
self
.
device
.
setTorqueBounds
(
(
-
self
.
pinocchioModel
.
effortLimit
).
T
.
tolist
()[
0
],
self
.
pinocchioModel
.
effortLimit
.
T
.
tolist
()[
0
])
AbstractHumanoidRobot
.
__init__
(
self
,
name
,
tracer
)
self
.
OperationalPoints
.
append
(
'
waist
'
)
self
.
OperationalPoints
.
append
(
'
chest
'
)
self
.
device
=
device
self
.
device
.
resize
(
self
.
dynamic
.
getDimension
())
self
.
AdditionalFrames
.
append
(
(
"
accelerometer
"
,
matrixToTuple
(
self
.
accelerometerPosition
),
"
chest
"
))
...
...
@@ -98,14 +120,6 @@ class Hrp2(AbstractHumanoidRobot):
rospack
=
RosPack
()
self
.
urdfPath
=
rospack
.
get_path
(
'
hrp2_{0}_description
'
.
format
(
robotnumber
))
+
'
/urdf/hrp2_{0}_reduced.urdf
'
.
format
(
robotnumber
)
self
.
pinocchioModel
=
se3
.
buildModelFromUrdf
(
self
.
urdfPath
,
se3
.
JointModelFreeFlyer
())
self
.
pinocchioData
=
self
.
pinocchioModel
.
createData
()
self
.
dynamic
.
setModel
(
self
.
pinocchioModel
)
self
.
dynamic
.
setData
(
self
.
pinocchioData
)
self
.
dimension
=
self
.
dynamic
.
getDimension
()
self
.
plugVelocityFromDevice
=
True
if
self
.
dimension
!=
len
(
self
.
halfSitting
):
raise
RuntimeError
(
"
Dimension of half-sitting: {0} differs from dimension of robot: {1}
"
.
format
(
len
(
self
.
halfSitting
),
self
.
dimension
))
...
...
This diff is collapsed.
Click to expand it.
src/dynamic_graph/sot/hrp2_14/robot.py
+
1
−
0
View file @
25d5b3cf
# -*- coding: utf-8 -*-
# Copyright 2011, Florent Lamiraux, Thomas Moulard, JRL, CNRS/AIST
#
...
...
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