Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
anymal-rbprm
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
Humanoid Path Planner
anymal-rbprm
Commits
1e19605d
Commit
1e19605d
authored
6 years ago
by
Pierre Fernbach
Browse files
Options
Downloads
Patches
Plain Diff
update script for fullBody
parent
74c70de3
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
src/hpp/corbaserver/rbprm/anymal/robot.py
+39
-41
39 additions, 41 deletions
src/hpp/corbaserver/rbprm/anymal/robot.py
with
39 additions
and
41 deletions
src/hpp/corbaserver/rbprm/anymal/robot.py
+
39
−
41
View file @
1e19605d
...
...
@@ -24,67 +24,57 @@ class Robot (Parent):
##
# Information to retrieve urdf and srdf files.
packageName
=
"
hyq
_description
"
meshPackageName
=
"
hyq
_description
"
packageName
=
"
anymal_boxy
_description
"
meshPackageName
=
"
anymal_boxy
_description
"
rootJointType
=
"
freeflyer
"
urdfName
=
"
hyq
"
urdfName
=
"
anymal_reachability
"
urdfSuffix
=
""
srdfSuffix
=
""
## Information about the names of thes joints defining the limbs of the robot
rLegId
=
'
rf
leg
'
rleg
=
'
rf_haa_joint
'
rfoot
=
'
rf_foot_joint
'
lLegId
=
'
lf
leg
'
lleg
=
'
lf_haa_joint
'
lfoot
=
'
lf_foot_joint
'
lArmId
=
'
lh
leg
'
larm
=
'
lh_haa_joint
'
lhand
=
'
lh_foot_joint
'
rArmId
=
'
rh
leg
'
rarm
=
'
rh_haa_joint
'
rhand
=
'
rh_foot_joint
'
rLegId
=
'
RF
leg
'
rleg
=
'
RF_HAA
'
rfoot
=
'
RF_CONTACT_2
'
lLegId
=
'
LF
leg
'
lleg
=
'
LF_HAA
'
lfoot
=
'
LF_CONTACT_2
'
lArmId
=
'
LH
leg
'
larm
=
'
LH_HAA
'
lhand
=
'
LH_CONTACT_2
'
rArmId
=
'
RH
leg
'
rarm
=
'
RH_HAA
'
rhand
=
'
RH_CONTACT_2
'
referenceConfig
=
[
0.
,
0.
,
0.6
,
0.
,
0.
,
0.
,
1.
,
0
,
# LF
0.7853981633974483
,
-
1.5707963267948966
,
0
,
# LH
-
0.7853981633974483
,
1.5707963267948966
,
0
,
# RF
0.7853981633974483
,
-
1.5707963267948966
,
0
,
# RH
-
0.7853981633974483
,
1.5707963267948966
,
]
referenceConfig
=
[
0.
,
0.
,
0.444
,
0.
,
0.
,
0.
,
1.
,
# FF
0.04
,
0.74
,
-
1.08
,
0.34
,
-
0.04
,
0.04
,
-
0.74
,
1.08
,
-
0.34
,
-
0.04
,
-
0.04
,
0.74
,
-
1.08
,
0.34
,
0.04
,
-
0.04
,
-
0.74
,
1.08
,
-
0.34
,
0.04
]
# informations required to generate the limbs databases the limbs :
offset
=
[
0.
,
0.
,
-
0.021
]
nbSamples
=
50000
octreeSize
=
0.01
cType
=
"
_3_DOF
"
offset
=
[
0.
,
0.
,
0.
]
normal
=
[
0
,
0
,
1
]
legx
=
0.02
;
legy
=
0.02
kinematicConstraintsPath
=
"
package://
hyq
-rbprm/com_inequalities/
"
kinematicConstraintsPath
=
"
package://
anymal
-rbprm/com_inequalities/
"
rLegKinematicConstraints
=
kinematicConstraintsPath
+
rleg
+
"
_com_constraints.obj
"
lLegKinematicConstraints
=
kinematicConstraintsPath
+
lleg
+
"
_com_constraints.obj
"
rArmKinematicConstraints
=
kinematicConstraintsPath
+
rarm
+
"
_com_constraints.obj
"
lArmKinematicConstraints
=
kinematicConstraintsPath
+
larm
+
"
_com_constraints.obj
"
minDist
=
0.2
# data used by scripts :
limbs_names
=
[
rLegId
,
lLegId
,
rArmId
,
lArmId
]
limbs_names
=
[
rLegId
,
lArmId
,
lLegId
,
rArmId
]
# default order to try to remove contacts at the beginning of the contact plan
dict_limb_rootJoint
=
{
rLegId
:
rleg
,
lLegId
:
lleg
,
rArmId
:
rarm
,
lArmId
:
larm
}
dict_limb_joint
=
{
rLegId
:
rfoot
,
lLegId
:
lfoot
,
rArmId
:
rhand
,
lArmId
:
lhand
}
dict_limb_color_traj
=
{
rfoot
:[
0
,
1
,
0
,
1
],
lfoot
:[
1
,
0
,
0
,
1
],
rhand
:[
0
,
0
,
1
,
1
],
lhand
:[
0.9
,
0.5
,
0
,
1
]}
FOOT_SAFETY_SIZE
=
0.01
# size of the contact surface (x,y)
dict_size
=
{
rfoot
:[
0.0
2
,
0.0
2
],
lfoot
:[
0.0
2
,
0.0
2
],
rhand
:[
0.0
2
,
0.0
2
],
lhand
:[
0.0
2
,
0.0
2
]}
dict_size
=
{
rfoot
:[
0.0
31
,
0.0
31
],
lfoot
:[
0.0
31
,
0.0
31
],
rhand
:[
0.0
31
,
0.0
31
],
lhand
:[
0.0
31
,
0.0
31
]}
#various offset used by scripts
MRsole_offset
=
SE3
.
Identity
()
...
...
@@ -93,7 +83,7 @@ class Robot (Parent):
MRhand_offset
=
MRsole_offset
.
copy
()
MLhand_offset
=
MRsole_offset
.
copy
()
dict_offset
=
{
rfoot
:
MRsole_offset
,
lfoot
:
MLsole_offset
,
rhand
:
MRhand_offset
,
lhand
:
MLhand_offset
}
dict_normal
=
{
rfoot
:
normal
,
lfoot
:
normal
,
rhand
:
normal
,
lhand
:
normal
}
# display transform :
MRsole_display
=
SE3
.
Identity
()
MLsole_display
=
SE3
.
Identity
()
...
...
@@ -107,3 +97,11 @@ class Robot (Parent):
self
.
loadFullBodyModel
(
self
.
urdfName
,
self
.
rootJointType
,
self
.
meshPackageName
,
self
.
packageName
,
self
.
urdfSuffix
,
self
.
srdfSuffix
)
if
name
!=
None
:
self
.
name
=
name
def
loadAllLimbs
(
self
,
heuristic
,
analysis
=
None
,
nbSamples
=
nbSamples
,
octreeSize
=
octreeSize
):
for
id
in
self
.
limbs_names
:
eff
=
self
.
dict_limb_joint
[
id
]
self
.
addLimb
(
id
,
self
.
dict_limb_rootJoint
[
id
],
eff
,
self
.
dict_offset
[
eff
].
translation
.
T
.
tolist
(),
self
.
dict_normal
[
eff
],
self
.
dict_size
[
eff
][
0
],
self
.
dict_size
[
eff
][
1
],
nbSamples
,
heuristic
,
octreeSize
,
self
.
cType
,
kinematicConstraintsPath
=
self
.
kinematicConstraintsPath
+
self
.
dict_limb_rootJoint
[
id
]
+
"
_com_constraints.obj
"
,
kinematicConstraintsMin
=
self
.
minDist
)
if
analysis
:
self
.
runLimbSampleAnalysis
(
id
,
analysis
,
True
)
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