Program Listing for File model-item.hpp
↰ Return to documentation for file (include/pinocchio/multibody/model-item.hpp
)
//
// Copyright (c) 2021-2022 INRIA
//
#ifndef __pinocchio_multibody_model_item_hpp__
#define __pinocchio_multibody_model_item_hpp__
#include "pinocchio/multibody/fwd.hpp"
namespace pinocchio
{
template<typename Derived>
struct ModelItem : NumericalBase<Derived>
{
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
typedef typename traits<Derived>::Scalar Scalar;
enum
{
Options = traits<Derived>::Options
};
typedef SE3Tpl<Scalar, Options> SE3;
std::string name;
JointIndex parentJoint;
FrameIndex parentFrame;
SE3 placement;
ModelItem()
: name()
, parentJoint()
, parentFrame()
, placement()
{
}
ModelItem(
const std::string & name,
const JointIndex parent_joint,
const FrameIndex parent_frame,
const SE3 & frame_placement)
: name(name)
, parentJoint(parent_joint)
, parentFrame(parent_frame)
, placement(frame_placement)
{
}
bool operator==(const ModelItem & other) const
{
return name == other.name && parentJoint == other.parentJoint
&& parentFrame == other.parentFrame && placement == other.placement;
}
};
} // namespace pinocchio
#endif // ifndef __pinocchio_multibody_model_item_hpp__