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
Guilhem Saurel
hpp-rbprm-corba
Commits
76ef67fc
Commit
76ef67fc
authored
Apr 15, 2019
by
Pierre Fernbach
Browse files
[API] add python API to access fullBody.postureWeights
parent
4da93bb2
Changes
4
Hide whitespace changes
Inline
Side-by-side
idl/hpp/corbaserver/rbprm/rbprmbuilder.idl
View file @
76ef67fc
...
...
@@ -106,6 +106,10 @@ module hpp
void setReferenceConfig(in floatSeq referenceConfig)
raises (Error);
/// set the weights used when computing a postural task
void setPostureWeights(in floatSeq postureWeights)
raises (Error);
/// set a reference position of the end effector for the given ROM
void setReferenceEndEffector(in string romName, in floatSeq ref)
raises (Error);
...
...
src/hpp/corbaserver/rbprm/rbprmfullbody.py
View file @
76ef67fc
...
...
@@ -843,6 +843,11 @@ class FullBody (Robot):
def
setReferenceConfig
(
self
,
referenceConfig
):
return
self
.
clientRbprm
.
rbprm
.
setReferenceConfig
(
referenceConfig
)
## set the weights used when computing a postural task
# \param postureWeights dofArray, must be of same size as device->numberDof
def
setPostureWeights
(
self
,
postureWeights
):
return
self
.
clientRbprm
.
rbprm
.
setPostureWeights
(
postureWeights
)
## return the time at the given state index (in the path computed during the first phase)
# \param stateId : index of the state
def
getTimeAtState
(
self
,
stateId
):
...
...
src/rbprmbuilder.impl.cc
View file @
76ef67fc
...
...
@@ -633,6 +633,13 @@ namespace hpp {
fullBody
()
->
referenceConfig
(
config
);
}
void
RbprmBuilder
::
setPostureWeights
(
const
hpp
::
floatSeq
&
postureWeights
)
throw
(
hpp
::
Error
){
if
(
!
fullBodyLoaded_
)
throw
Error
(
"No full body robot was loaded"
);
Configuration_t
config
(
dofArrayToConfig
(
fullBody
()
->
device_
->
numberDof
(),
postureWeights
));
fullBody
()
->
postureWeights
(
config
);
}
void
RbprmBuilder
::
setReferenceEndEffector
(
const
char
*
romName
,
const
hpp
::
floatSeq
&
ref
)
throw
(
hpp
::
Error
){
std
::
string
name
(
romName
);
hpp
::
pinocchio
::
RbPrmDevicePtr_t
device
=
boost
::
dynamic_pointer_cast
<
hpp
::
pinocchio
::
RbPrmDevice
>
(
problemSolver
()
->
robot
());
...
...
src/rbprmbuilder.impl.hh
View file @
76ef67fc
...
...
@@ -196,6 +196,7 @@ namespace hpp {
void
setStaticStability
(
const
bool
staticStability
)
throw
(
hpp
::
Error
);
void
setReferenceConfig
(
const
hpp
::
floatSeq
&
referenceConfig
)
throw
(
hpp
::
Error
);
void
setPostureWeights
(
const
hpp
::
floatSeq
&
postureWeights
)
throw
(
hpp
::
Error
);
void
setReferenceEndEffector
(
const
char
*
romName
,
const
hpp
::
floatSeq
&
ref
)
throw
(
hpp
::
Error
);
virtual
void
setFilter
(
const
hpp
::
Names_t
&
roms
)
throw
(
hpp
::
Error
);
...
...
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