5 #ifndef __pinocchio_python_frame_hpp__ 6 #define __pinocchio_python_frame_hpp__ 8 #include "pinocchio/multibody/fwd.hpp" 9 #include "pinocchio/multibody/frame.hpp" 20 :
public bp::def_visitor< FramePythonVisitor >
22 template<
class PyClass>
26 .def(bp::init<>(bp::arg(
"self"),
"Default constructor"))
27 .def(bp::init<const Frame &>(
bp::args(
"self",
"other"),
"Copy constructor"))
28 .def(bp::init<
const std::string&,
const JointIndex,
const FrameIndex,
const SE3&,
FrameType, bp::optional<const Inertia&> > ((bp::arg(
"name"),bp::arg(
"parent_joint"),
bp::args(
"parent_frame"), bp::arg(
"placement"), bp::arg(
"type"), bp::arg(
"inertia")),
29 "Initialize from a given name, type, parent joint index, parent frame index and placement wrt parent joint and an spatial inertia object."))
31 .def_readwrite(
"name", &
Frame::name,
"name of the frame")
32 .def_readwrite(
"parent", &
Frame::parent,
"id of the parent joint")
34 .def_readwrite(
"placement",
36 "placement in the parent joint local frame")
37 .def_readwrite(
"type", &
Frame::type,
"Type of the frame")
38 .def_readwrite(
"inertia", &
Frame::inertia,
"Inertia information attached to the frame.")
40 .def(bp::self == bp::self)
41 .def(bp::self != bp::self)
47 bp::enum_<FrameType>(
"FrameType")
56 bp::class_<Frame>(
"Frame",
57 "A Plucker coordinate frame related to a parent joint inside a kinematic tree.\n\n",
72 return bp::make_tuple();
82 f.
name = bp::extract<std::string>(tup[0]);
83 f.
parent = bp::extract<JointIndex>(tup[1]);
88 f.
inertia = bp::extract<Inertia&>(tup[5]);
97 #endif // ifndef __pinocchio_python_frame_hpp__
void visit(PyClass &cl) const
A Plucker coordinate frame attached to a parent joint inside a kinematic tree.
static void setstate(Frame &f, bp::tuple tup)
JointIndex parent
Index of the parent joint.
Set the Python method str and repr to use the overloading operator<<.
FrameType type
Type of the frame.
static bp::tuple getstate(const Frame &f)
FrameType
Enum on the possible types of frame.
static bp::tuple getinitargs(const Frame &)
Add the Python method copy to allow a copy of this by calling the copy constructor.
SE3 placement
Placement of the frame wrt the parent joint.
Main pinocchio namespace.
Inertia inertia
Inertia information attached to the frame. This inertia will be appended to the inertia supported by ...
std::string name
Name of the frame.
FrameIndex previousFrame
Index of the previous frame.