Joint visualization.
More...
#include <JointMaker.hh>
Enumerator |
---|
JOINT_NONE |
none
|
JOINT_FIXED |
Fixed joint.
|
JOINT_SLIDER |
Slider joint.
|
JOINT_HINGE |
Hinge joint.
|
JOINT_HINGE2 |
Hinge2 joint.
|
JOINT_SCREW |
Screw joint.
|
JOINT_UNIVERSAL |
Universal joint.
|
JOINT_BALL |
Revolute joint.
|
gazebo::gui::JointMaker::JointMaker |
( |
| ) |
|
virtual gazebo::gui::JointMaker::~JointMaker |
( |
| ) |
|
|
virtual |
void gazebo::gui::JointMaker::AddJoint |
( |
const std::string & |
_type | ) |
|
Add a joint.
- Parameters
-
[in] | _type | Type of joint to be added in string. |
void gazebo::gui::JointMaker::AddJoint |
( |
JointType |
_type | ) |
|
Add a joint.
- Parameters
-
[in] | _type | Type of joint to be added |
void gazebo::gui::JointMaker::AddScopedLinkName |
( |
const std::string & |
_name | ) |
|
Add a scoped link name.
Nested model's link names are scoped but the parent and child field in the joint SDF element may not be. So keep track of scoped link names in order to generate the correct SDF before spawning the model.
- Parameters
-
[in] | _name | Scoped link name. |
static JointType gazebo::gui::JointMaker::ConvertJointType |
( |
const std::string & |
_type | ) |
|
|
static |
Convert a joint type string to enum.
- Parameters
-
[in] | _type | Joint type in string. |
- Returns
- Joint type enum.
void gazebo::gui::JointMaker::CreateHotSpot |
( |
JointData * |
_joint | ) |
|
Helper method to create hotspot visual for mouse interaction.
- Parameters
-
[in] | _joint | Joint data used for creating the hotspot |
Create a joint with parent and child.
- Parameters
-
[in] | _parent | Parent of the joint. |
[in] | _child | Child of the joint. |
- Returns
- joint data.
void gazebo::gui::JointMaker::CreateJointFromSDF |
( |
sdf::ElementPtr |
_jointElem, |
|
|
const std::string & |
_modelName = "" |
|
) |
| |
Create a joint from SDF.
This is mainly used when editing existing models.
- Parameters
-
[in] | _jointElement | SDF element to load. |
[in] | _modelName | Name of the model that contains this joint. |
void gazebo::gui::JointMaker::DisableEventHandlers |
( |
| ) |
|
Disable the mouse and key event handlers for the joint maker.
void gazebo::gui::JointMaker::EnableEventHandlers |
( |
| ) |
|
Enable the mouse and key event handlers for the joint maker.
void gazebo::gui::JointMaker::GenerateSDF |
( |
| ) |
|
Generate SDF for all joints.
Get the axis count for joint type.
- Parameters
-
unsigned int gazebo::gui::JointMaker::GetJointCount |
( |
| ) |
|
Get the number of joints added.
return Number of joints.
std::vector<JointData *> gazebo::gui::JointMaker::GetJointDataByLink |
( |
const std::string & |
_linkName | ) |
const |
Get a vector containing data for all joints connected to the given link.
- Parameters
-
[in] | _linkName | Name of the link. |
- Returns
- Vector with joint data.
sdf::ElementPtr gazebo::gui::JointMaker::GetSDF |
( |
| ) |
const |
Generate SDF for all joints.
Get state.
- Returns
- State of JointType if joint creation is in process, otherwise JOINT_NONE
Get the joint type in string.
- Parameters
-
- Returns
- Joint type in string.
void gazebo::gui::JointMaker::JointAdded |
( |
| ) |
|
|
signal |
Qt signal when the joint creation process has ended.
void gazebo::gui::JointMaker::RemoveJoint |
( |
const std::string & |
_jointName | ) |
|
Remove joint by name.
- Parameters
-
[in] | _jointName | Name of joint to be removed. |
void gazebo::gui::JointMaker::RemoveJointsByLink |
( |
const std::string & |
_linkName | ) |
|
Remove all joints connected to link.
- Parameters
-
[in] | _linkName | Name of the link. |
void gazebo::gui::JointMaker::Reset |
( |
| ) |
|
void gazebo::gui::JointMaker::SetSelected |
( |
const std::string & |
_name, |
|
|
const bool |
selected |
|
) |
| |
Set the select state of a joint.
- Parameters
-
[in] | _name | Name of the joint. |
[in] | _selected | True to select the joint. |
Set the select state of a joint visual.
- Parameters
-
[in] | _jointVis | Pointer to the joint visual. |
[in] | _selected | True to select the joint. |
void gazebo::gui::JointMaker::ShowJoints |
( |
bool |
_show | ) |
|
|
slot |
Qt Callback to show / hide joint visuals.
- Parameters
-
[in] | _show | True to show joints, false to hide them. |
void gazebo::gui::JointMaker::Stop |
( |
| ) |
|
Stop the process of adding joint to the model.
void gazebo::gui::JointMaker::Update |
( |
| ) |
|
Update callback on PreRender.
The documentation for this class was generated from the following file: