17 #ifndef _GAZEBO_MODEL_DATA_HH_ 18 #define _GAZEBO_MODEL_DATA_HH_ 29 class recursive_mutex;
37 class ModelPluginInspector;
43 public:
static std::string GetTemplateSDFString();
47 public:
static double GetEditTransparency();
61 public:
void SetName(
const std::string &_name);
65 public:
void SetPose(
const ignition::math::Pose3d &_pose);
69 public: ignition::math::Pose3d Pose()
const;
73 public:
int Depth()
const;
82 public: std::map<std::string, rendering::VisualWeakPtr>
models;
85 public: std::map<std::string, rendering::VisualWeakPtr>
links;
102 public: std::string GetName()
const;
106 public:
void SetName(
const std::string &_name);
110 public: ignition::math::Pose3d Pose()
const;
114 public:
void SetPose(
const ignition::math::Pose3d &_pose3d);
118 public:
void Load(sdf::ElementPtr _sdf);
122 public: ignition::math::Vector3d Scale()
const;
126 public:
void SetScale(
const ignition::math::Vector3d &_scale);
136 const msgs::Collision *_msg =
NULL);
139 public:
void UpdateConfig();
144 public:
LinkData *Clone(
const std::string &_newName);
147 private:
void Update();
151 private:
bool Apply();
155 private slots:
void OnAccept();
159 private slots:
void OnApply();
163 private slots:
void OnAddVisual(
const std::string &_name);
167 private slots:
void OnAddCollision(
const std::string &_name);
171 private slots:
void OnRemoveVisual(
const std::string &_name);
175 private slots:
void OnRemoveCollision(
const std::string &_name);
178 private slots:
void OnInspectorOpened();
181 private: std::vector<event::ConnectionPtr> connections;
184 private: boost::recursive_mutex *updateMutex;
190 private:
double mass;
193 private:
double inertiaIxx;
196 private:
double inertiaIyy;
199 private:
double inertiaIzz;
202 public: ignition::math::Vector3d
scale;
208 public: std::map<rendering::VisualPtr, msgs::Visual>
visuals;
220 public: std::map<rendering::VisualPtr, msgs::Collision>
collisions;
245 public:
void Load(sdf::ElementPtr _pluginElem);
Definition: LinkInspector.hh:38
rendering::VisualPtr modelVisual
Visual representing this model.
Definition: ModelData.hh:79
Definition: JointMaker.hh:46
rendering::VisualPtr linkVisual
Visual representing this link.
Definition: ModelData.hh:205
Forward declarations for the common classes.
Definition: Animation.hh:33
std::map< rendering::VisualPtr, msgs::Visual > visuals
Visuals of the link.
Definition: ModelData.hh:208
sdf::ElementPtr linkSDF
SDF representing the link data.
Definition: ModelData.hh:187
Definition: ModelData.hh:39
std::map< rendering::VisualPtr, msgs::Collision > deletedCollisions
Deleted collisions of the link.
Definition: ModelData.hh:223
std::vector< msgs::Collision * > collisionUpdateMsgs
Msgs for updating collision visuals.
Definition: ModelData.hh:217
ignition::math::Vector3d scale
Scale of link.
Definition: ModelData.hh:202
Helper class to store nested models data.
Definition: ModelData.hh:57
Inspector for model plugin properties.
Definition: ModelPluginInspector.hh:35
std::map< std::string, rendering::VisualWeakPtr > links
Links inside this model.
Definition: ModelData.hh:85
LinkInspector * inspector
Inspector for configuring link properties.
Definition: ModelData.hh:226
ModelPluginInspector * inspector
Inspector for configuring model plugin properties.
Definition: ModelData.hh:248
Helper class to store model plugin data.
Definition: ModelData.hh:233
Helper class to store link data.
Definition: ModelData.hh:90
sdf::ElementPtr modelPluginSDF
SDF representing the model plugin data.
Definition: ModelData.hh:251
#define NULL
Definition: CommonTypes.hh:31
std::shared_ptr< Visual > VisualPtr
Definition: RenderTypes.hh:112
std::map< rendering::VisualPtr, msgs::Visual > deletedVisuals
Deleted visuals of the link.
Definition: ModelData.hh:211
std::map< std::string, rendering::VisualWeakPtr > models
Models inside this model.
Definition: ModelData.hh:82
bool nested
Flag set to true if this is a link of a nested model.
Definition: ModelData.hh:229
sdf::ElementPtr modelSDF
SDF representing the model data.
Definition: ModelData.hh:76
std::vector< msgs::Visual * > visualUpdateMsgs
Msgs for updating visuals.
Definition: ModelData.hh:214
std::map< rendering::VisualPtr, msgs::Collision > collisions
Collisions of the link.
Definition: ModelData.hh:220