Go to the documentation of this file.
5 #ifndef __pinocchio_python_multibody_frame_hpp__
6 #define __pinocchio_python_multibody_frame_hpp__
23 template<
typename Frame>
29 template<
class PyClass>
32 cl.def(bp::init<>(bp::arg(
"self"),
"Default constructor"))
33 .def(bp::init<const Frame &>(bp::args(
"self",
"other"),
"Copy constructor"))
36 bp::optional<const Inertia &>>(
37 (bp::arg(
"name"), bp::arg(
"parent_joint"), bp::arg(
"placement"), bp::arg(
"type"),
39 "Initialize from a given name, type, parent frame index and placement wrt parent joint "
40 "and an spatial inertia object."))
43 bp::optional<const Inertia &>>(
44 (bp::arg(
"name"), bp::arg(
"parent_joint"), bp::args(
"parent_frame"),
45 bp::arg(
"placement"), bp::arg(
"type"), bp::arg(
"inertia")),
46 "Initialize from a given name, type, parent joint index, parent frame index and "
47 "placement wrt parent joint and an spatial inertia object."))
48 .def(bp::init<const Frame &>((bp::arg(
"self"), bp::arg(
"clone")),
"Copy constructor"))
50 .def_readwrite(
"name", &
Frame::name,
"name of the frame")
56 +[](
const Frame &
self) {
return self.parentJoint; },
61 "See parentJoint property.")
65 +[](
const Frame &
self) {
return self.parentFrame; },
70 "See parentFrame property.")
73 .def_readwrite(
"type", &
Frame::type,
"type of the frame")
74 .def_readwrite(
"inertia", &
Frame::inertia,
"Inertia information attached to the frame.")
76 #ifndef PINOCCHIO_PYTHON_SKIP_COMPARISON_OPERATIONS
77 .def(bp::self == bp::self)
78 .def(bp::self != bp::self)
85 if (!register_symbolic_link_to_registered_type<FrameType>())
87 bp::enum_<FrameType>(
"FrameType")
89 .value(
"JOINT",
JOINT)
98 "A Plucker coordinate frame related to a parent joint inside a kinematic tree.\n",
113 return bp::make_tuple();
118 return bp::make_tuple(
119 f.name,
f.parentJoint,
f.parentFrame,
f.placement, (
int)
f.type,
f.inertia);
124 f.name = bp::extract<std::string>(tup[0]);
125 f.parentJoint = bp::extract<JointIndex>(tup[1]);
126 f.parentFrame = bp::extract<JointIndex>(tup[2]);
127 f.placement = bp::extract<SE3 &>(tup[3]);
128 f.type = (
FrameType)(
int)bp::extract<int>(tup[4]);
129 if (bp::len(tup) > 5)
130 f.inertia = bp::extract<Inertia &>(tup[5]);
143 #endif // ifndef __pinocchio_python_multibody_frame_hpp__
void init(bool compute_local_aabb=true)
static bool getstate_manages_dict()
JointIndex parentJoint
Index of the parent joint.
FrameType
Enum on the possible types of frames.
@ SENSOR
sensor frame: defined in a sensor element
static void setstate(Frame &f, bp::tuple tup)
A Plucker coordinate frame attached to a parent joint inside a kinematic tree.
Inertia inertia
Inertia information attached to the frame. This inertia will be appended to the inertia supported by ...
SE3 placement
Position of kinematic element in parent joint frame.
Set the Python method str and repr to use the overloading operator<<.
FrameIndex parentFrame
Index of the parent frame.
Add the Python method copy to allow a copy of this by calling the copy constructor.
Add the Python method cast.
@ JOINT
joint frame: attached to the child body of a joint (a.k.a. child frame)
static bp::tuple getstate(const Frame &f)
@ OP_FRAME
operational frame: user-defined frames that are defined at runtime
@ FIXED_JOINT
fixed joint frame: joint frame but for a fixed joint
FrameType type
Type of the frame.
static bp::tuple getinitargs(const Frame &)
@ BODY
body frame: attached to the collision, inertial or visual properties of a link
void visit(PyClass &cl) const
std::string name
Name of the kinematic element.
Main pinocchio namespace.
pinocchio
Author(s):
autogenerated on Sun Dec 22 2024 03:41:09