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]);
99 #endif // ifndef __pinocchio_python_frame_hpp__
joint frame: attached to the child body of a joint (a.k.a. child frame)
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<<.
void def(const char *name, Func func)
void visit(PyClass &cl) const
fixed joint frame: joint frame but for a fixed joint
operational frame: user-defined frames that are defined at runtime
FrameType type
Type of the frame.
static bp::tuple getstate(const Frame &f)
FrameType
Enum on the possible types of frames.
body frame: attached to the collision, inertial or visual properties of a link
static bp::tuple getinitargs(const Frame &)
Add the Python method copy to allow a copy of this by calling the copy constructor.
void init(bool compute_local_aabb=true)
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.
sensor frame: defined in a sensor element
static bool getstate_manages_dict()
FrameIndex previousFrame
Index of the previous frame.