Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Guilhem Saurel
hpp-rbprm-corba
Commits
992f9b98
Commit
992f9b98
authored
Oct 16, 2019
by
Teguh Santoso Lembono
Committed by
Pierre Fernbach
Jan 17, 2020
Browse files
Add navBauzil and mazeEasy
parent
1ac429b8
Changes
5
Hide whitespace changes
Inline
Side-by-side
script/scenarios/demos/talos_flatGround.py
View file @
992f9b98
...
...
@@ -27,7 +27,7 @@ q_init = q_ref[::]
fullBody
.
setReferenceConfig
(
q_ref
)
fullBody
.
setCurrentConfig
(
q_init
)
fullBody
.
setPostureWeights
(
fullBody
.
postureWeights
[::]
+
[
0
]
*
6
)
fullBody
.
usePosturalTaskContactCreation
(
True
)
#
fullBody.usePosturalTaskContactCreation(True)
print
"Generate limb DB ..."
tStart
=
time
.
time
()
...
...
script/scenarios/demos/talos_flatGround_path.py
View file @
992f9b98
...
...
@@ -3,8 +3,6 @@ from hpp.gepetto import Viewer
from
hpp.corbaserver
import
ProblemSolver
import
time
vMax
=
0.3
# linear velocity bound for the root
aMax
=
0.1
# linear acceleration bound for the root
extraDof
=
6
...
...
script/scenarios/demos/talos_navBauzil_path.py
View file @
992f9b98
...
...
@@ -4,8 +4,7 @@ from hpp.corbaserver import Client
from
hpp.corbaserver
import
ProblemSolver
import
time
Robot
.
urdfName
+=
"_large"
vMax
=
0.3
# linear velocity bound for the root
aMax
=
0.1
# linear acceleration bound for the root
extraDof
=
6
...
...
@@ -38,7 +37,7 @@ ps = ProblemSolver( rbprmBuilder )
ps
.
setParameter
(
"Kinodynamic/velocityBound"
,
vMax
)
ps
.
setParameter
(
"Kinodynamic/accelerationBound"
,
aMax
)
# force the orientation of the trunk to match the direction of the motion
ps
.
setParameter
(
"Kinodynamic/forceYawOrientation"
,
True
)
#
ps.setParameter("Kinodynamic/forceYawOrientation",True)
ps
.
setParameter
(
"DynamicPlanner/sizeFootX"
,
0.2
)
ps
.
setParameter
(
"DynamicPlanner/sizeFootY"
,
0.12
)
ps
.
setParameter
(
"DynamicPlanner/friction"
,
mu
)
...
...
@@ -56,7 +55,7 @@ afftool = AffordanceTool ()
afftool
.
setAffordanceConfig
(
'Support'
,
[
0.5
,
0.03
,
0.00005
])
afftool
.
loadObstacleModel
(
"hpp_environments"
,
"multicontact/floor_bauzil"
,
"planning"
,
vf
)
v
=
vf
.
createViewer
(
displayArrows
=
True
)
#
afftool.visualiseAffordances('Support', v, v.color.lightBrown)
afftool
.
visualiseAffordances
(
'Support'
,
v
,
v
.
color
.
lightBrown
)
v
.
addLandmark
(
v
.
sceneName
,
1
)
# Setting initial configuration
...
...
script/scenarios/memmo/talos_moveEffector_flat.py
View file @
992f9b98
...
...
@@ -8,8 +8,6 @@ import random
import
time
statusFilename
=
"/res/infos.log"
fullBody
=
Robot
()
# Set the bounds for the root
fullBody
.
setJointBounds
(
"root_joint"
,
[
-
0.3
,
0.3
,
-
0.3
,
0.3
,
0.85
,
1.05
])
...
...
@@ -74,9 +72,9 @@ tStart = time.time()
nbSamples
=
10
fullBody
.
addLimb
(
fullBody
.
rLegId
,
fullBody
.
rleg
,
fullBody
.
rfoot
,
fullBody
.
rLegOffset
,
fullBody
.
rLegNormal
,
fullBody
.
rLegx
,
fullBody
.
rLegy
,
nbSamples
,
"static"
,
0.01
,
kinematicConstraintsPath
=
fullBody
.
rLegKinematicConstraints
,
kinematicConstraintsMin
=
0.7
)
fullBody
.
runLimbSampleAnalysis
(
fullBody
.
rLegId
,
"ReferenceConfiguration"
,
True
)
#
fullBody.runLimbSampleAnalysis(fullBody.rLegId, "ReferenceConfiguration", True)
fullBody
.
addLimb
(
fullBody
.
lLegId
,
fullBody
.
lleg
,
fullBody
.
lfoot
,
fullBody
.
lLegOffset
,
fullBody
.
rLegNormal
,
fullBody
.
lLegx
,
fullBody
.
lLegy
,
nbSamples
,
"static"
,
0.01
,
kinematicConstraintsPath
=
fullBody
.
lLegKinematicConstraints
,
kinematicConstraintsMin
=
0.7
)
fullBody
.
runLimbSampleAnalysis
(
fullBody
.
lLegId
,
"ReferenceConfiguration"
,
True
)
#
fullBody.runLimbSampleAnalysis(fullBody.lLegId, "ReferenceConfiguration", True)
tGenerate
=
time
.
time
()
-
tStart
...
...
@@ -108,12 +106,12 @@ else:
print
"Contact generation failed."
f
=
open
(
statusFilename
,
"w"
)
f
.
write
(
"q_init= "
+
str
(
s0
.
q
())
+
"
\n
"
)
f
.
write
(
"q_goal= "
+
str
(
s1
.
q
())
+
"
\n
"
)
f
.
write
(
"cg_success: "
+
str
(
cg_success
)
+
"
\n
"
)
f
.
write
(
"cg_reach_goal: "
+
str
(
cg_reach_goal
)
+
"
\n
"
)
f
.
close
()
#
f = open(statusFilename,"w")
#
f.write("q_init= "+str(s0.q())+"\n")
#
f.write("q_goal= "+str(s1.q())+"\n")
#
f.write("cg_success: "+str(cg_success)+"\n")
#
f.write("cg_reach_goal: "+str(cg_reach_goal)+"\n")
#
f.close()
# put back original bounds for wholebody methods
...
...
script/scenarios/memmo/talos_randomMove_flat.py
View file @
992f9b98
...
...
@@ -108,6 +108,7 @@ floor_Z = 0.
s0
=
sampleRandomStateFlatFloor
(
fullBody
,
limbsInContact
,
floor_Z
)
q_init
=
s0
.
q
()
q_goal
=
q_ref
[::]
q_goal
[
0
:
7
]
=
tp
.
ps
.
configAtParam
(
pId
,
tp
.
ps
.
pathLength
(
pId
))[
0
:
7
]
q_goal
[
2
]
=
q_ref
[
2
]
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment