Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
hpp-rbprm-corba
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
hpp-rbprm-corba
Commits
7e83fa93
Commit
7e83fa93
authored
9 years ago
by
Steve Tonneau
Browse files
Options
Downloads
Patches
Plain Diff
python binding to bound so3
parent
378a1b0e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/hpp/corbaserver/rbprm/rbprmbuilder.py
+6
-0
6 additions, 0 deletions
src/hpp/corbaserver/rbprm/rbprmbuilder.py
src/rbprmbuilder.impl.cc
+22
-0
22 additions, 0 deletions
src/rbprmbuilder.impl.cc
src/rbprmbuilder.impl.hh
+7
-1
7 additions, 1 deletion
src/rbprmbuilder.impl.hh
with
35 additions
and
1 deletion
src/hpp/corbaserver/rbprm/rbprmbuilder.py
+
6
−
0
View file @
7e83fa93
...
...
@@ -86,6 +86,12 @@ class Builder (object):
def
initshooter
(
self
):
return
self
.
client
.
rbprm
.
rbprm
.
initshooter
()
## Sets limits on robot orientation, described according to Euler's ZYX rotation order
#
# \param bounds 6D vector with the lower and upperBound for each rotation axis in sequence
def
boundSO3
(
self
,
bounds
):
return
self
.
client
.
rbprm
.
rbprm
.
boundSO3
(
bounds
)
## Specifies a preferred normal direction for a given rom.
# This constrains the planner to accept a rom configuration only if
# it collides with a surface the normal of which has these properties.
...
...
This diff is collapsed.
Click to expand it.
src/rbprmbuilder.impl.cc
+
22
−
0
View file @
7e83fa93
...
...
@@ -221,6 +221,17 @@ namespace hpp {
return
res
;
}
std
::
vector
<
double
>
doubleConversion
(
const
hpp
::
floatSeq
&
dofArray
)
{
std
::
vector
<
double
>
res
;
std
::
size_t
dim
=
(
std
::
size_t
)
dofArray
.
length
();
for
(
std
::
size_t
iDof
=
0
;
iDof
<
dim
;
iDof
++
)
{
res
.
push_back
(
dofArray
[
iDof
]);
}
return
res
;
}
void
RbprmBuilder
::
setFilter
(
const
hpp
::
Names_t
&
roms
)
throw
(
hpp
::
Error
)
{
...
...
@@ -241,6 +252,17 @@ namespace hpp {
bindShooter_
.
normalFilter_
.
insert
(
std
::
make_pair
(
name
,
filter
));
}
void
RbprmBuilder
::
boundSO3
(
const
hpp
::
floatSeq
&
limitszyx
)
throw
(
hpp
::
Error
)
{
std
::
vector
<
double
>
limits
=
doubleConversion
(
limitszyx
);
if
(
limits
.
size
()
!=
6
)
{
throw
Error
(
"Can not bound SO3, array of 6 double required"
);
}
bindShooter_
.
so3Bounds_
=
limits
;
}
hpp
::
floatSeq
*
RbprmBuilder
::
generateContacts
(
const
hpp
::
floatSeq
&
configuration
,
const
hpp
::
floatSeq
&
direction
)
throw
(
hpp
::
Error
)
{
if
(
!
fullBodyLoaded_
)
...
...
This diff is collapsed.
Click to expand it.
src/rbprmbuilder.impl.hh
+
7
−
1
View file @
7e83fa93
...
...
@@ -44,8 +44,11 @@ namespace hpp {
hpp
::
rbprm
::
RbPrmShooterPtr_t
create
(
const
hpp
::
model
::
DevicePtr_t
&
robot
)
{
hpp
::
model
::
RbPrmDevicePtr_t
robotcast
=
boost
::
static_pointer_cast
<
hpp
::
model
::
RbPrmDevice
>
(
robot
);
r
eturn
hpp
::
rbprm
::
RbPrmShooter
::
create
r
bprm
::
RbPrmShooterPtr_t
shooter
=
hpp
::
rbprm
::
RbPrmShooter
::
create
(
robotcast
,
problemSolver_
->
problem
()
->
collisionObstacles
(),
romFilter_
,
normalFilter_
,
shootLimit_
,
displacementLimit_
);
if
(
!
so3Bounds_
.
empty
())
shooter
->
BoundSO3
(
so3Bounds_
);
return
shooter
;
}
hpp
::
core
::
PathValidationPtr_t
createPathValidation
(
const
hpp
::
model
::
DevicePtr_t
&
robot
,
const
hpp
::
model
::
value_type
&
val
)
...
...
@@ -61,6 +64,7 @@ namespace hpp {
std
::
map
<
std
::
string
,
NormalFilter
>
normalFilter_
;
std
::
size_t
shootLimit_
;
std
::
size_t
displacementLimit_
;
std
::
vector
<
double
>
so3Bounds_
;
};
class
RbprmBuilder
:
public
virtual
POA_hpp
::
corbaserver
::
rbprm
::
RbprmBuilder
...
...
@@ -92,6 +96,8 @@ namespace hpp {
virtual
void
setFilter
(
const
hpp
::
Names_t
&
roms
)
throw
(
hpp
::
Error
);
virtual
void
setNormalFilter
(
const
char
*
romName
,
const
hpp
::
floatSeq
&
normal
,
double
range
)
throw
(
hpp
::
Error
);
virtual
void
boundSO3
(
const
hpp
::
floatSeq
&
limitszyx
)
throw
(
hpp
::
Error
);
virtual
hpp
::
floatSeq
*
getSampleConfig
(
const
char
*
limb
,
unsigned
short
sampleId
)
throw
(
hpp
::
Error
);
virtual
hpp
::
floatSeq
*
getSamplePosition
(
const
char
*
limb
,
unsigned
short
sampleId
)
throw
(
hpp
::
Error
);
...
...
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