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
Gabriele Buondonno
pinocchio
Commits
585cc406
Commit
585cc406
authored
Jun 25, 2017
by
Nicolas Mansard
Committed by
Nicolas Mansard
Jun 25, 2017
Browse files
[Python] Added static method in geometry API to create a capsule object and add it to GeomModel.
parent
a4454e84
Changes
2
Hide whitespace changes
Inline
Side-by-side
bindings/python/multibody/geometry-model.hpp
View file @
585cc406
...
...
@@ -80,6 +80,8 @@ namespace se3
;
}
/* --- Expose --------------------------------------------------------- */
static
void
expose
()
{
...
...
bindings/python/multibody/geometry-object.hpp
View file @
585cc406
...
...
@@ -55,9 +55,20 @@ namespace se3
.
def_readonly
(
"meshPath"
,
&
GeometryObject
::
meshPath
,
"Absolute path to the mesh file"
)
.
def_readonly
(
"overrideMaterial"
,
&
GeometryObject
::
overrideMaterial
,
"Boolean that tells whether material information is stored in Geometry object"
)
.
def_readonly
(
"meshTexturePath"
,
&
GeometryObject
::
meshTexturePath
,
"Absolute path to the mesh texture file"
)
.
def
(
"CreateCapsule"
,
&
GeometryObjectPythonVisitor
::
maker_capsule
)
.
staticmethod
(
"CreateCapsule"
)
;
}
static
GeometryObject
maker_capsule
(
const
double
radius
,
const
double
length
)
{
return
GeometryObject
(
""
,
FrameIndex
(
0
),
JointIndex
(
0
),
boost
::
shared_ptr
<
fcl
::
CollisionGeometry
>
(
new
fcl
::
Capsule
(
radius
,
length
)),
SE3
::
Identity
());
}
static
void
expose
()
{
bp
::
class_
<
GeometryObject
>
(
"GeometryObject"
,
...
...
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