18 #ifndef _GAZEBO_JOINTMAKER_HH_
19 #define _GAZEBO_JOINTMAKER_HH_
43 class recursive_mutex;
94 public:
void EnableEventHandlers();
97 public:
void DisableEventHandlers();
101 public:
void AddJoint(
const std::string &_type);
105 public:
void AddJoint(JointType _type);
116 public:
void CreateHotSpot(
JointData *_joint);
119 public:
void Update();
123 public:
void RemoveJoint(
const std::string &_jointName);
127 public:
void RemoveJointsByLink(
const std::string &_linkName);
133 public: std::vector<JointData *> GetJointDataByLink(
134 const std::string &_linkName)
const;
137 public:
void GenerateSDF();
140 public: sdf::ElementPtr GetSDF()
const;
144 public:
static unsigned int GetJointAxisCount(
167 public:
unsigned int GetJointCount();
173 public:
void CreateJointFromSDF(sdf::ElementPtr _jointElem,
174 const std::string &_modelName =
"");
181 public:
void AddScopedLinkName(
const std::string &_name);
185 public slots:
void ShowJoints(
bool _show);
190 public:
void SetSelected(
const std::string &_name,
const bool selected);
196 const bool selected);
231 private:
void OpenInspector(
const std::string &_name);
236 private: std::string GetScopedLinkName(
const std::string &_name);
240 private:
void ShowContextMenu(
const std::string &_joint);
243 private:
void DeselectAll();
248 private:
void OnSetSelectedEntity(
const std::string &_name,
249 const std::string &_mode);
255 private:
void OnSetSelectedJoint(
const std::string &_name,
256 const bool _selected);
262 private:
JointData *CreateJointLine(
const std::string &_name,
266 Q_SIGNALS:
void JointAdded();
269 private slots:
void OnOpenInspector();
273 private slots:
void OnDelete();
276 private: std::vector<ignition::math::Vector3d> unitVectors;
291 private: std::string inspectName;
294 private: std::map<std::string, JointData *> joints;
300 private: std::vector<event::ConnectionPtr> connections;
303 private:
bool newJointCreated;
306 private: std::map<JointMaker::JointType, std::string>
310 private: sdf::ElementPtr modelSDF;
313 private:
int jointCounter;
316 private: QAction *inspectAct;
319 private: boost::recursive_mutex *updateMutex;
322 private: std::vector<rendering::VisualPtr> selectedJoints;
325 private: std::vector<std::string> scopedLinkedNames;
328 private:
static std::map<JointMaker::JointType, std::string> jointTypes;
388 public:
void OpenInspector();
391 private slots:
void OnOpenInspector();
395 private slots:
void OnApply();
Class for drawing lines that can change.
Definition: DynamicLines.hh:43
Generic description of a mouse event.
Definition: MouseEvent.hh:35
Encapsulates a position and rotation in three space.
Definition: Pose.hh:37
The Vector3 class represents the generic vector containing 3 elements.
Definition: Vector3.hh:39
rendering::VisualPtr child
Child visual the joint is connected to.
Definition: JointMaker.hh:355
bool dirty
True if the joint visual needs update.
Definition: JointMaker.hh:379
math::Pose childPose
Definition: JointMaker.hh:363
GAZEBO_VISIBLE msgs::Joint::Type ConvertJointType(const std::string &_str)
Convert a string to a msgs::Joint::Type enum.
math::Vector3 childScale
Definition: JointMaker.hh:367
Generic description of a keyboard event.
Definition: KeyEvent.hh:32
Fixed joint.
Definition: JointMaker.hh:69
std::string name
Name of the joint.
Definition: JointMaker.hh:340
JointMaker::JointType type
Type of joint.
Definition: JointMaker.hh:376
boost::shared_ptr< JointVisual > JointVisualPtr
Definition: RenderTypes.hh:131
JointInspector * inspector
Inspector for configuring joint properties.
Definition: JointMaker.hh:385
rendering::VisualPtr parent
Parent visual the joint is connected to.
Definition: JointMaker.hh:352
math::Pose parentPose
Definition: JointMaker.hh:359
Joint visualization.
Definition: JointMaker.hh:58
msgs::JointPtr jointMsg
Msg containing joint data.
Definition: JointMaker.hh:382
JointType
Definition: JointMaker.hh:64
Ogre::BillboardSet * handles
Visual handle used to represent joint parent.
Definition: JointMaker.hh:373
Hinge2 joint.
Definition: JointMaker.hh:75
Screw joint.
Definition: JointMaker.hh:77
A class to inspect and modify joints.
Definition: JointInspector.hh:38
rendering::DynamicLines * line
Visual line used to represent joint connecting parent and child.
Definition: JointMaker.hh:370
Slider joint.
Definition: JointMaker.hh:71
boost::shared_ptr< Joint > JointPtr
Definition: PhysicsTypes.hh:100
rendering::JointVisualPtr jointVisual
Joint visual.
Definition: JointMaker.hh:346
#define GZ_GUI_MODEL_VISIBLE
Definition: system.hh:418
boost::shared_ptr< Visual > VisualPtr
Definition: RenderTypes.hh:107
rendering::VisualPtr visual
Visual of the dynamic line.
Definition: JointMaker.hh:343
Universal joint.
Definition: JointMaker.hh:79
Hinge joint.
Definition: JointMaker.hh:73
rendering::VisualPtr hotspot
Visual of the hotspot
Definition: JointMaker.hh:349
Helper class to store joint data.
Definition: JointMaker.hh:335
none
Definition: JointMaker.hh:67