47 #ifndef _MIRA_RIGIDMODELPROVIDER_H_ 48 #define _MIRA_RIGIDMODELPROVIDER_H_ 54 namespace mira {
namespace model {
62 template <
typename ModelType>
69 template<
typename Reflector>
73 r.member(
"Model",
mModel,
"The used model");
75 "Publishes state of a joint",
76 "name",
"joint name",
"DisplayMotorToDisplayArm",
77 "value",
"joint value ([rad] for CONTINUOUS/REVOLUTE type, [m] for PRISMATIC)",
deg2rad(15.f),
98 MIRA_THROW(XInvalidConfig,
"No rigid model loaded");
99 mModel->publishJoint(name, value, t);
112 MIRA_THROW(XInvalidConfig,
"No rigid model loaded");
113 mModel->resolveAndPublishLinks(ns, t);
INTERNAL std::enable_if< std::is_floating_point< T >::value, T >::type deg2rad(T value)
void publishJoint(const std::string &name, float value, Time const &t=Time::now())
Publishes the state of the joint with the given name.
Definition: RigidModelProvider.h:94
void publishTransforms(const std::string &ns, Time const &t=Time::now())
Resolves all transform frames, adds transform links and publishes all transformations of the loaded m...
Definition: RigidModelProvider.h:108
Interface for rigid model provider services.
#define MIRA_REFLECT_BASE(reflector, BaseClass)
Inherit from this class by specifying a ModelType that is inherited from RigidModel to build your own...
Definition: RigidModelProvider.h:63
#define MIRA_THROW(ex, msg)
ModelTypePtr mModel
Definition: RigidModelProvider.h:118
boost::shared_ptr< RigidModel > RigidModelPtr
Definition: RigidModel.h:205
virtual model::RigidModelPtr getRigidModel()
Return the used rigid model pointer.
Definition: RigidModelProvider.h:84
boost::shared_ptr< ModelType > ModelTypePtr
Definition: RigidModelProvider.h:66
static Time now() static Time eternity()
void reflect(Reflector &r)
Reflect method for serialization.
Definition: RigidModelProvider.h:70
Interface for rigid model provider services.
Definition: IRigidModelProvider.h:69