47 #ifndef _MIRA_RIGIDMODEL_H_ 48 #define _MIRA_RIGIDMODEL_H_ 53 #include <serialization/adapters/std/map> 54 #include <serialization/adapters/std/list> 55 #include <serialization/adapters/boost/shared_ptr.hpp> 61 namespace mira {
namespace model {
80 typedef std::map<std::string, JointPtr>
JointMap;
87 template<
typename Reflector>
90 r.member(
"Name",
name,
"The name of this model",
"");
91 r.member(
"Links",
links,
"The links of this model",
LinkList());
92 r.member(
"Joints",
joints,
"The joints of this model",
JointMap());
116 typedef std::list<std::pair<GeometryPtr, RigidTransform3f>,
138 const std::string& filter =
"")
const;
158 const std::string& filter =
"")
const;
175 const std::string& filter =
"")
const;
void publishJoint(const std::string &name, float value, const Time ×tamp=Time::now()) const
Publishes the state of the joint with the given name.
void clear()
Clears the rigid model.
std::map< std::string, MaterialPtr > MaterialMap
Maps material pointers to their name.
Definition: RigidModel.h:82
CollisionGeometries getCollisionGeometries(std::string targetFrame="", const Time ×tamp=Time::now(), const std::string &filter="") const
Returns a list of the models collision geometries and the corresponding transforms for each geometry ...
void reflect(Reflector &r)
Definition: RigidModel.h:88
Class representing a named rigid model.
Definition: RigidModel.h:72
std::map< std::string, JointPtr > JointMap
Maps joint pointers to their name.
Definition: RigidModel.h:80
Footprint getFootprint(std::string targetFrame="", const Time ×tamp=Time::now(), const std::string &filter="") const
Returns the models footprint (the projection on the xy-plane).
LinkList links
List of links used by this model.
Definition: RigidModel.h:200
std::string getRootLink() const
Returns the name of the root link, the only link that has no parent.
boost::shared_ptr< RigidModel > RigidModelPtr
Definition: RigidModel.h:205
virtual ~RigidModel()
Destructor.
Definition: RigidModel.h:85
MaterialMap materials
Map with name - material pointer pairs used by this model.
Definition: RigidModel.h:202
#define MIRA_OBJECT(classIdentifier)
std::string name
Name of the model.
Definition: RigidModel.h:199
std::list< LinkPtr > LinkList
A list of links.
Definition: RigidModel.h:78
JointMap joints
Map with name - joint pointer pairs used by this model.
Definition: RigidModel.h:201
std::list< std::pair< GeometryPtr, RigidTransform3f >, Eigen::aligned_allocator< std::pair< GeometryPtr, RigidTransform3f > > > CollisionGeometries
List of collision geometries, each item consisting of the geometry pointer and a transform that descr...
Definition: RigidModel.h:117
void resolveAndPublishLinks(const std::string &ns, const Time ×tamp=Time::now())
Resolves all link names in the model and adds the transforms between them to the transform tree...
std::list< Box3f > getCollisionBoundingBoxes(std::string targetFrame="", const Time ×tamp=Time::now(), const std::string &filter="") const
Returns a list of the bounding boxes for each of the models collision geometries at their correct pos...