Commit 7851a428 authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

format

parent b9fa6fbc
#include <sot/dynamic-pinocchio/angle-estimator.h>
typedef boost::mpl::vector< dynamicgraph::sot::AngleEstimator > entities_t;
typedef boost::mpl::vector<dynamicgraph::sot::AngleEstimator> entities_t;
......@@ -7,20 +7,16 @@ namespace dgs = dynamicgraph::sot;
typedef bp::return_value_policy<bp::reference_existing_object> reference_existing_object;
BOOST_PYTHON_MODULE(wrap)
{
BOOST_PYTHON_MODULE(wrap) {
bp::import("dynamic_graph");
bp::import("pinocchio");
dg::python::exposeEntity<dgs::DynamicPinocchio, bp::bases<dg::Entity>, dg::python::AddCommands>()
.add_property("model",
bp::make_function(&dgs::DynamicPinocchio::getModel, reference_existing_object()),
bp::make_function(&dgs::DynamicPinocchio::setModel))
.add_property("data",
bp::make_function(&dgs::DynamicPinocchio::getData, reference_existing_object()),
bp::make_function(&dgs::DynamicPinocchio::setData))
.def("setModel", &dgs::DynamicPinocchio::setModel)
.def("createData", &dgs::DynamicPinocchio::createData)
.def("setData", &dgs::DynamicPinocchio::setData)
;
.add_property("model", bp::make_function(&dgs::DynamicPinocchio::getModel, reference_existing_object()),
bp::make_function(&dgs::DynamicPinocchio::setModel))
.add_property("data", bp::make_function(&dgs::DynamicPinocchio::getData, reference_existing_object()),
bp::make_function(&dgs::DynamicPinocchio::setData))
.def("setModel", &dgs::DynamicPinocchio::setModel)
.def("createData", &dgs::DynamicPinocchio::createData)
.def("setData", &dgs::DynamicPinocchio::setData);
}
#include <sot/dynamic-pinocchio/integrator-force-exact.h>
typedef boost::mpl::vector< dynamicgraph::sot::IntegratorForceExact > entities_t;
typedef boost::mpl::vector<dynamicgraph::sot::IntegratorForceExact> entities_t;
#include <sot/dynamic-pinocchio/integrator-force.h>
typedef boost::mpl::vector< dynamicgraph::sot::IntegratorForce > entities_t;
typedef boost::mpl::vector<dynamicgraph::sot::IntegratorForce> entities_t;
#include <sot/dynamic-pinocchio/integrator-force-rk4.h>
typedef boost::mpl::vector< dynamicgraph::sot::IntegratorForceRK4 > entities_t;
typedef boost::mpl::vector<dynamicgraph::sot::IntegratorForceRK4> entities_t;
#include <sot/dynamic-pinocchio/mass-apparent.h>
typedef boost::mpl::vector< dynamicgraph::sot::MassApparent > entities_t;
typedef boost::mpl::vector<dynamicgraph::sot::MassApparent> entities_t;
......@@ -247,9 +247,7 @@ void DynamicPinocchio::setModel(pinocchio::Model* modelPtr) {
void DynamicPinocchio::setData(pinocchio::Data*) {}
void DynamicPinocchio::createData() {
m_data.reset(new pinocchio::Data (*m_model));
}
void DynamicPinocchio::createData() { m_data.reset(new pinocchio::Data(*m_model)); }
/*--------------------------------GETTERS-------------------------------------------*/
......@@ -259,7 +257,6 @@ dg::Vector& DynamicPinocchio::getLowerPositionLimits(dg::Vector& res, const int&
res.resize(m_model->nv);
if (!sphericalJoints.empty()) {
int fillingIndex = 0; // SoTValue
int origIndex = 0; // PinocchioValue
for (std::vector<int>::const_iterator it = sphericalJoints.begin(); it < sphericalJoints.end(); it++) {
......@@ -273,10 +270,10 @@ dg::Vector& DynamicPinocchio::getLowerPositionLimits(dg::Vector& res, const int&
}
// Found a Spherical Joint.
// Assuming that spherical joint limits are unset
// Version C++11
//res(fillingIndex) = std::numeric_limits<double>::lowest();
//res(fillingIndex + 1) = std::numeric_limits<double>::lowest();
//res(fillingIndex + 2) = std::numeric_limits<double>::lowest();
// Version C++11
// res(fillingIndex) = std::numeric_limits<double>::lowest();
// res(fillingIndex + 1) = std::numeric_limits<double>::lowest();
// res(fillingIndex + 2) = std::numeric_limits<double>::lowest();
// For now use C++98
res(fillingIndex) = -std::numeric_limits<double>::max();
res(fillingIndex + 1) = -std::numeric_limits<double>::max();
......@@ -720,7 +717,7 @@ dg::Matrix& DynamicPinocchio::computeGenericEndeffJacobian(const bool isFrame, c
M = frame.placement.inverse();
if (!isLocal) {// Express the jacobian is world coordinate system.
if (!isLocal) { // Express the jacobian is world coordinate system.
// Need to compute frame placement for oMf.
pinocchio::updateFramePlacement(*m_model, *m_data, fid);
......
#include <sot/dynamic-pinocchio/waist-attitude-from-sensor.h>
typedef boost::mpl::vector< dynamicgraph::sot::WaistAttitudeFromSensor > entities_t;
typedef boost::mpl::vector<dynamicgraph::sot::WaistAttitudeFromSensor> entities_t;
#include "zmp-from-forces.h"
typedef boost::mpl::vector< sot::dynamic::ZmpFromForces > entities_t;
typedef boost::mpl::vector<sot::dynamic::ZmpFromForces> entities_t;
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