21 template <
int t_features>
24 #define HUMOTO_CONFIG_SECTION_ID "GeneralizedCoordinates" 25 #define HUMOTO_CONFIG_CONSTRUCTOR GeneralizedCoordinates 26 #define HUMOTO_CONFIG_ENTRIES \ 27 HUMOTO_CONFIG_COMPOUND_(root_pose)\ 28 HUMOTO_CONFIG_COMPOUND_(joint_angles) 29 #include HUMOTO_CONFIG_DEFINE_ACCESSORS 38 ModelDescription<t_features>::getDefaultGeneralizedCoordinates(joint_angles_, root_pose_);
48 HUMOTO_ASSERT( ModelDescription<t_features>::JOINTS_DOF_NUMBER == joint_angles_.rows(),
49 "Wrong size of the vector of joint angles.");
75 ModelDescription<t_features>::setRootPosition(root_pose_, position);
86 ModelDescription<t_features>::setRootOrientation(root_pose_, rpy);
97 ModelDescription<t_features>::getRootPosition(position, root_pose_);
108 ModelDescription<t_features>::getRootOrientation(rpy, root_pose_);
122 Eigen::Matrix<double, ModelDescription<t_features>::DOF_NUMBER, 1> generalized_coordinates;
123 generalized_coordinates << root_pose_, joint_angles_;
124 return (generalized_coordinates);
137 const std::string &name =
"model_state")
const 139 logger.log(
LogEntryName(parent).add(name).add(
"root_pose"), root_pose_);
140 logger.log(
LogEntryName(parent).add(name).add(
"joint_angles"), joint_angles_);
void getRootPosition(etools::Vector3 &position) const
Get position of the root.
#define HUMOTO_GLOBAL_LOGGER_IF_DEFINED
#define HUMOTO_ASSERT(condition, message)
Default configurable base is strict.
void getRootOrientation(etools::Vector3 &rpy) const
Get orientation of the root.
Represents log entry name.
GeneralizedCoordinates()
Default constructor.
void setRootPosition(const etools::Vector3 &position)
Set position of the root.
Threaded logger: any data sent to this logger is wrapped in a message and pushed to a queue...
void finalize()
Check length of the vector of joint angles after reading it from a configuration file.
The root namespace of HuMoTo.
Abstract class to be used for interfaces.
void log(humoto::Logger &logger, const LogEntryName &parent=LogEntryName(), const std::string &name="model_state") const
Log.
void setDefaults()
Default configuration.
void setRootOrientation(const etools::Vector3 &rpy)
Set orientation of the root.