Commit 31861369 authored by jcarpent's avatar jcarpent
Browse files

[C++][Python] Rename getJointToFrameTransform to getFramePlacement

parent 99473296
......@@ -120,10 +120,9 @@ namespace se3
bool existFrame ( const std::string & name ) const;
const std::string & getFrameName ( const Index index ) const;
const Index& getFrameParent( const std::string & name ) const;
const Index& getFrameParent( Index index ) const;
const SE3 & getJointToFrameTransform( const std::string & name ) const;
const SE3 & getJointToFrameTransform( Index index ) const;
const Index& getFrameParent( const Index index ) const;
const SE3 & getFramePlacement( const std::string & name ) const;
const SE3 & getFramePlacement( const Index index ) const;
bool addFrame ( const Frame & frame );
bool addFrame ( const std::string & name, Index index, const SE3 & placement );
......
......@@ -202,7 +202,7 @@ namespace se3
return operational_frames[index].parent_id;
}
inline const SE3 & Model::getJointToFrameTransform( const std::string & name) const
inline const SE3 & Model::getFramePlacement( const std::string & name) const
{
assert(existFrame(name) && "The Frame you requested does not exist");
std::vector<Frame>::const_iterator it = std::find_if( operational_frames.begin()
......@@ -211,10 +211,10 @@ namespace se3
);
std::vector<Frame>::iterator::difference_type it_diff = it - operational_frames.begin();
return getJointToFrameTransform(Model::Index(it_diff));
return getFramePlacement(Model::Index(it_diff));
}
inline const SE3 & Model::getJointToFrameTransform( Model::Index index ) const
inline const SE3 & Model::getFramePlacement( const Index index ) const
{
return operational_frames[index].frame_placement;
}
......
//
// Copyright (c) 2015 CNRS
// Copyright (c) 2015-2016 CNRS
// Copyright (c) 2015 Wandercraft, 86 rue de Paris 91400 Orsay, France.
//
// This file is part of Pinocchio
......@@ -133,9 +133,9 @@ namespace se3
.add_property("fix_bodyNames", bp::make_function(&ModelPythonVisitor::fix_bodyNames, bp::return_internal_reference<>()) )
.def("getFrameParent", &ModelPythonVisitor::getFrameParent)
.def("getFramePlacement", &ModelPythonVisitor::getJointToFrameTransform)
.def("addExtraFrame", &ModelPythonVisitor::addExtraFrame)
.add_property("operational_frames", bp::make_function(&ModelPythonVisitor::extraFrames, bp::return_internal_reference<>()) )
.def("getFramePlacement", &ModelPythonVisitor::getFramePlacement)
.add_property("gravity",&ModelPythonVisitor::gravity,&ModelPythonVisitor::setGravity)
.def("BuildEmptyModel",&ModelPythonVisitor::maker_empty)
......@@ -180,8 +180,8 @@ namespace se3
static std::vector<std::string> & fix_bodyNames ( ModelHandler & m ) { return m->fix_bodyNames; }
static Model::Index getFrameParent( ModelHandler & m, const std::string & name ) { return m->getFrameParent(name); }
static SE3 getJointToFrameTransform( ModelHandler & m, const std::string & name ) { return m->getJointToFrameTransform(name); }
static void addExtraFrame( ModelHandler & m, const std::string & frameName, Index parent, const SE3_fx & placementWrtParent )
static SE3 getFramePlacement( ModelHandler & m, const std::string & name ) { return m->getFramePlacement(name); }
{
m->addFrame(frameName, parent, placementWrtParent);
}
......
Supports Markdown
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