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
13215417
Commit
13215417
authored
Mar 31, 2016
by
Steve Tonneau
Browse files
can choose not to load all computed values for a limb database
parent
8824abb9
Changes
4
Hide whitespace changes
Inline
Side-by-side
idl/hpp/corbaserver/rbprm/rbprmbuilder.idl
View file @
13215417
...
...
@@ -187,7 +187,8 @@ module hpp
/// \param databasepath filepath to the database
/// \param id user given name of the new limb
/// \param heuristicName heuristic used to bias sample selection
void addLimbDatabase(in string databasepath, in string id, in string heuristicName) raises (Error);
/// \param loadValues whether other values computed for the limb database should be loaded
void addLimbDatabase(in string databasepath, in string id, in string heuristicName, in double loadValues) raises (Error);
/// Set the start state of a contact generation problem
/// environment, ordered by their efficiency
...
...
src/hpp/corbaserver/rbprm/rbprmfullbody.py
View file @
13215417
...
...
@@ -100,8 +100,12 @@ class FullBody (object):
# \param limbId: user defined id for the limb. Must be unique.
# The id is used if several contact points are defined for the same limb (ex: the knee and the foot)
# \param heuristicName: name of the selected heuristic for configuration evaluation
def
addLimbDatabase
(
self
,
databasepath
,
limbId
,
heuristicName
):
self
.
client
.
rbprm
.
rbprm
.
addLimbDatabase
(
databasepath
,
limbId
,
heuristicName
)
# \param loadValues: whether values computed, other than the static ones, should be loaded in memory
def
addLimbDatabase
(
self
,
databasepath
,
limbId
,
heuristicName
,
loadValues
=
True
):
boolVal
=
0.
if
(
loadValues
):
boolVal
=
1.
self
.
client
.
rbprm
.
rbprm
.
addLimbDatabase
(
databasepath
,
limbId
,
heuristicName
,
boolVal
)
## Add a limb to the model
#
...
...
src/rbprmbuilder.impl.cc
View file @
13215417
...
...
@@ -477,14 +477,14 @@ namespace hpp {
}
void
RbprmBuilder
::
addLimbDatabase
(
const
char
*
databasePath
,
const
char
*
id
,
const
char
*
heuristicName
)
throw
(
hpp
::
Error
)
void
RbprmBuilder
::
addLimbDatabase
(
const
char
*
databasePath
,
const
char
*
id
,
const
char
*
heuristicName
,
double
loadValues
)
throw
(
hpp
::
Error
)
{
if
(
!
fullBodyLoaded_
)
throw
Error
(
"No full body robot was loaded"
);
try
{
std
::
string
fileName
(
databasePath
);
fullBody_
->
AddLimb
(
fileName
,
std
::
string
(
id
),
problemSolver_
->
collisionObstacles
(),
heuristicName
);
fullBody_
->
AddLimb
(
fileName
,
std
::
string
(
id
),
problemSolver_
->
collisionObstacles
(),
heuristicName
,
loadValues
>
0.5
);
}
catch
(
std
::
runtime_error
&
e
)
{
...
...
src/rbprmbuilder.impl.hh
View file @
13215417
...
...
@@ -119,7 +119,7 @@ namespace hpp {
virtual
void
addLimb
(
const
char
*
id
,
const
char
*
limb
,
const
char
*
effector
,
const
hpp
::
floatSeq
&
offset
,
const
hpp
::
floatSeq
&
normal
,
double
x
,
double
y
,
unsigned
short
samples
,
const
char
*
heuristicName
,
double
resolution
,
const
char
*
contactType
)
throw
(
hpp
::
Error
);
virtual
void
addLimbDatabase
(
const
char
*
databasePath
,
const
char
*
id
,
const
char
*
heuristicName
)
throw
(
hpp
::
Error
);
virtual
void
addLimbDatabase
(
const
char
*
databasePath
,
const
char
*
id
,
const
char
*
heuristicName
,
double
loadValues
)
throw
(
hpp
::
Error
);
virtual
void
setStartState
(
const
hpp
::
floatSeq
&
configuration
,
const
hpp
::
Names_t
&
contactLimbs
)
throw
(
hpp
::
Error
);
virtual
void
setEndState
(
const
hpp
::
floatSeq
&
configuration
,
const
hpp
::
Names_t
&
contactLimbs
)
throw
(
hpp
::
Error
);
...
...
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