Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Humanoid Path Planner
hpp-affordance
Commits
ea0d56b9
Commit
ea0d56b9
authored
May 03, 2016
by
Akseppal
Browse files
get rid of dependency to hpp-util
parent
f3d4324a
Changes
3
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
ea0d56b9
...
...
@@ -53,7 +53,6 @@ SET(${PROJECT_NAME}_HEADERS
SEARCH_FOR_BOOST
()
ADD_REQUIRED_DEPENDENCY
(
"eigen3 >= 3.2"
)
ADD_REQUIRED_DEPENDENCY
(
"hpp-util >= 0.7"
)
ADD_REQUIRED_DEPENDENCY
(
"hpp-fcl >= 0.2.9"
)
## Add dependency toward hpp-affordance library in pkg-config file.
...
...
include/hpp/affordance/fwd.hh
View file @
ea0d56b9
...
...
@@ -21,19 +21,19 @@
#include
<vector>
#include
<map>
#include
<
hpp/util/pointe
r.h
h
>
#include
<
boost/smart_pt
r.h
pp
>
#include
<hpp/fcl/fwd.hh>
#include
<hpp/fcl/BVH/BVH_model.h>
#include
<hpp/fcl/math/vec_3f.h>
namespace
hpp
{
namespace
affordance
{
HPP_PREDEF_CLASS
(
AffordanceExtraction
)
;
HPP_PREDEF_CLASS
(
SemanticsData
)
;
HPP_PREDEF_CLASS
(
Affordance
)
;
HPP_PREDEF_CLASS
(
OperationBase
)
;
HPP_PREDEF_CLASS
(
SupportOperation
)
;
HPP_PREDEF_CLASS
(
LeanOperation
)
;
class
AffordanceExtraction
;
class
SemanticsData
;
class
Affordance
;
class
OperationBase
;
class
SupportOperation
;
class
LeanOperation
;
typedef
fcl
::
BVHModel
<
fcl
::
OBBRSS
>
BVHModelOB
;
typedef
boost
::
shared_ptr
<
BVHModelOB
>
BVHModelOB_Ptr_t
;
...
...
tests/test4.py
0 → 100644
View file @
ea0d56b9
# Importing helper class for setting up a reachability planning problem
from
hpp.corbaserver.rbprm.rbprmbuilder
import
Builder
from
hpp.gepetto
import
Viewer
rootJointType
=
'freeflyer'
packageName
=
'hpp-rbprm-corba'
meshPackageName
=
'hpp-rbprm-corba'
urdfName
=
'hyq_trunk_large'
urdfNameRom
=
[
'hyq_lhleg_rom'
,
'hyq_lfleg_rom'
,
'hyq_rfleg_rom'
,
'hyq_rhleg_rom'
]
urdfSuffix
=
""
srdfSuffix
=
""
rbprmBuilder
=
Builder
()
rbprmBuilder
.
loadModel
(
urdfName
,
urdfNameRom
,
rootJointType
,
meshPackageName
,
packageName
,
urdfSuffix
,
srdfSuffix
)
rbprmBuilder
.
setJointBounds
(
"base_joint_xyz"
,
[
-
2
,
5
,
-
1
,
1
,
0.3
,
4
])
rbprmBuilder
.
setFilter
([
'hyq_lhleg_rom'
,
'hyq_lfleg_rom'
,
'hyq_rfleg_rom'
,
'hyq_rhleg_rom'
])
rbprmBuilder
.
setAffordanceFilter
(
'hyq_rhleg_rom'
,
[
'Support'
,
'Lean'
])
rbprmBuilder
.
setAffordanceFilter
(
'hyq_rfleg_rom'
,
[
'Support'
,])
rbprmBuilder
.
setAffordanceFilter
(
'hyq_lhleg_rom'
,
[
'Support'
,
'Lean'
])
rbprmBuilder
.
setAffordanceFilter
(
'hyq_lfleg_rom'
,
[
'Support'
,])
# We also bound the rotations of the torso.
rbprmBuilder
.
boundSO3
([
-
0.4
,
0.4
,
-
3
,
3
,
-
3
,
3
])
# Creating an instance of HPP problem solver and the viewer
from
hpp.corbaserver.rbprm.problem_solver
import
ProblemSolver
ps
=
ProblemSolver
(
rbprmBuilder
)
r
=
Viewer
(
ps
)
# Setting initial and goal configurations
q_init
=
rbprmBuilder
.
getCurrentConfig
();
q_init
[
0
:
3
]
=
[
-
2
,
0
,
0.63
];
rbprmBuilder
.
setCurrentConfig
(
q_init
);
r
(
q_init
)
q_goal
=
q_init
[::]
q_goal
[
0
:
3
]
=
[
3
,
0
,
0.63
];
r
(
q_goal
)
ps
.
setInitialConfig
(
q_init
)
ps
.
addGoalConfig
(
q_goal
)
import
random
from
hpp.corbaserver.affordance.affordance
import
AffordanceTool
afftool
=
AffordanceTool
()
afftool
.
loadObstacleModel
(
packageName
,
"darpa"
,
"planning"
,
r
)
afftool
.
visualiseAffordances
(
'Support'
,
r
,
'planning'
,
[
0.25
,
0.5
,
0.5
])
# Choosing RBPRM shooter and path validation methods.
# Note that the standard RRT algorithm is used.
ps
.
client
.
problem
.
selectConFigurationShooter
(
"RbprmShooter"
)
ps
.
client
.
problem
.
selectPathValidation
(
"RbprmPathValidation"
,
0.05
)
# Solve the problem
t
=
ps
.
solve
()
# Playing the computed path
from
hpp.gepetto
import
PathPlayer
pp
=
PathPlayer
(
rbprmBuilder
.
client
.
basic
,
r
)
pp
(
0
)
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment