Commit 4e08213c authored by jcarpent's avatar jcarpent
Browse files

[Python] Clean code

parent b766901e
//
// 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();
}
......@@ -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"
......
......@@ -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()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment