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
pinocchio
Commits
4e08213c
Commit
4e08213c
authored
Jan 24, 2017
by
jcarpent
Browse files
[Python] Clean code
parent
b766901e
Changes
3
Hide whitespace changes
Inline
Side-by-side
bindings/python/module.cpp
View file @
4e08213c
//
// Copyright (c) 2015 CNRS
// Copyright (c) 2015
-2017
CNRS
// Copyright (c) 2015 Wandercraft, 86 rue de Paris 91400 Orsay, France.
//
// This file is part of Pinocchio
...
...
@@ -23,6 +23,7 @@
#include
<iostream>
namespace
bp
=
boost
::
python
;
using
namespace
se3
::
python
;
BOOST_PYTHON_MODULE
(
libpinocchio_pywrap
)
{
...
...
@@ -40,19 +41,20 @@ BOOST_PYTHON_MODULE(libpinocchio_pywrap)
eigenpy
::
enableEigenPySpecific
<
Matrix6x
,
Matrix6x
>
();
eigenpy
::
enableEigenPySpecific
<
Matrix3x
,
Matrix3x
>
();
se3
::
python
::
exposeSE3
();
se3
::
python
::
exposeForce
();
se3
::
python
::
exposeMotion
();
se3
::
python
::
exposeInertia
();
se3
::
python
::
exposeJoints
();
se3
::
python
::
exposeExplog
();
exposeSE3
();
exposeForce
();
exposeMotion
();
exposeInertia
();
exposeJoints
();
exposeExplog
();
se3
::
python
::
exposeModel
();
se3
::
python
::
exposeFrame
();
se3
::
python
::
exposeData
();
se3
::
python
::
exposeGeometry
();
exposeModel
();
exposeFrame
();
exposeData
();
exposeGeometry
();
exposeAlgorithms
();
exposeParsers
();
se3
::
python
::
exposeAlgorithms
();
se3
::
python
::
exposeParsers
();
}
bindings/python/multibody/geometry-model.hpp
View file @
4e08213c
...
...
@@ -18,7 +18,6 @@
#ifndef __se3_python_geometry_model_hpp__
#define __se3_python_geometry_model_hpp__
#include
<boost/python/suite/indexing/vector_indexing_suite.hpp>
#include
<eigenpy/memory.hpp>
#include
"pinocchio/bindings/python/utils/eigen_container.hpp"
...
...
bindings/python/multibody/geometry-object.hpp
View file @
4e08213c
...
...
@@ -39,23 +39,23 @@ namespace se3
void
visit
(
PyClass
&
cl
)
const
{
cl
.
add_property
(
"meshScale"
,
bp
::
make_getter
(
&
GeometryObject
::
meshScale
,
bp
::
return_value_policy
<
bp
::
return_by_value
>
()),
bp
::
make_setter
(
&
GeometryObject
::
meshScale
),
"Scaling parameter for the mesh"
)
.
add_property
(
"meshColor"
,
bp
::
make_getter
(
&
GeometryObject
::
meshColor
,
bp
::
return_value_policy
<
bp
::
return_by_value
>
()),
bp
::
make_setter
(
&
GeometryObject
::
meshColor
),
"Color rgba for the mesh"
)
.
def_readwrite
(
"name"
,
&
GeometryObject
::
name
,
"Name of the GeometryObject"
)
.
def_readwrite
(
"parentJoint"
,
&
GeometryObject
::
parentJoint
,
"Index of the parent joint"
)
.
def_readwrite
(
"parentFrame"
,
&
GeometryObject
::
parentFrame
,
"Index of the parent frame"
)
.
def_readwrite
(
"placement"
,
&
GeometryObject
::
placement
,
"Position of geometry object in parent joint's frame"
)
.
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"
)
;
.
add_property
(
"meshScale"
,
bp
::
make_getter
(
&
GeometryObject
::
meshScale
,
bp
::
return_value_policy
<
bp
::
return_by_value
>
()),
bp
::
make_setter
(
&
GeometryObject
::
meshScale
),
"Scaling parameter for the mesh"
)
.
add_property
(
"meshColor"
,
bp
::
make_getter
(
&
GeometryObject
::
meshColor
,
bp
::
return_value_policy
<
bp
::
return_by_value
>
()),
bp
::
make_setter
(
&
GeometryObject
::
meshColor
),
"Color rgba for the mesh"
)
.
def_readwrite
(
"name"
,
&
GeometryObject
::
name
,
"Name of the GeometryObject"
)
.
def_readwrite
(
"parentJoint"
,
&
GeometryObject
::
parentJoint
,
"Index of the parent joint"
)
.
def_readwrite
(
"parentFrame"
,
&
GeometryObject
::
parentFrame
,
"Index of the parent frame"
)
.
def_readwrite
(
"placement"
,
&
GeometryObject
::
placement
,
"Position of geometry object in parent joint's frame"
)
.
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"
)
;
}
static
void
expose
()
...
...
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