All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Types | Signals | Public Member Functions | List of all members
gazebo::gui::ModelCreator Class Reference

Create and manage 3D visuals of a model with parts and joints. More...

#include <ModelCreator.hh>

Inheritance diagram for gazebo::gui::ModelCreator:
Inheritance graph
[legend]
Collaboration diagram for gazebo::gui::ModelCreator:
Collaboration graph
[legend]

Public Types

enum  PartType {
  PART_NONE, PART_BOX, PART_SPHERE, PART_CYLINDER,
  PART_CUSTOM
}
 

Signals

void PartAdded ()
 Qt signal when the a part has been added. More...
 

Public Member Functions

 ModelCreator ()
 Constructor. More...
 
virtual ~ModelCreator ()
 Destructor. More...
 
std::string AddBox (const math::Vector3 &_size=math::Vector3::One, const math::Pose &_pose=math::Pose::Zero)
 Add a box to the model. More...
 
std::string AddCustom (const std::string &_name, const math::Vector3 &_scale=math::Vector3::One, const math::Pose &_pose=math::Pose::Zero)
 Add a custom part to the model. More...
 
std::string AddCylinder (double _radius=0.5, double _length=1.0, const math::Pose &_pose=math::Pose::Zero)
 Add a cylinder to the model. More...
 
void AddJoint (JointMaker::JointType _type)
 Add a joint to the model. More...
 
void AddPart (PartType _type)
 Add a part to the model. More...
 
std::string AddSphere (double _radius=0.5, const math::Pose &_pose=math::Pose::Zero)
 Add a sphere to the model. More...
 
void FinishModel ()
 Finish the model and create the entity on the gzserver. More...
 
void GenerateSDF ()
 Generate the SDF from model part and joint visuals. More...
 
JointMakerGetJointMaker () const
 Get joint maker. More...
 
std::string GetModelName () const
 Get the name of the model. More...
 
void RemovePart (const std::string &_partName)
 Remove a part from the model. More...
 
void Reset ()
 Reset the model creator and the SDF. More...
 
void SaveToSDF (const std::string &_savePath)
 Save model to SDF format. More...
 
void SetAutoDisable (bool _auto)
 Set the model to allow auto disable at rest. More...
 
void SetModelName (const std::string &_modelName)
 Set the name of the model. More...
 
void SetStatic (bool _static)
 Set the model to be static. More...
 
void Stop ()
 Stop the process of adding a part or joint to the model. More...
 

Detailed Description

Create and manage 3D visuals of a model with parts and joints.

Member Enumeration Documentation

Enumerator
PART_NONE 

none

PART_BOX 

Box.

PART_SPHERE 

Sphere.

PART_CYLINDER 

Cylinder.

PART_CUSTOM 

Custom.

Constructor & Destructor Documentation

gazebo::gui::ModelCreator::ModelCreator ( )

Constructor.

virtual gazebo::gui::ModelCreator::~ModelCreator ( )
virtual

Destructor.

Member Function Documentation

std::string gazebo::gui::ModelCreator::AddBox ( const math::Vector3 _size = math::Vector3::One,
const math::Pose _pose = math::Pose::Zero 
)

Add a box to the model.

Parameters
[in]_sizeSize of the box.
[in]_posePose of the box.
Returns
Name of the box that has been added.
std::string gazebo::gui::ModelCreator::AddCustom ( const std::string &  _name,
const math::Vector3 _scale = math::Vector3::One,
const math::Pose _pose = math::Pose::Zero 
)

Add a custom part to the model.

Parameters
[in]_nameName of the custom part.
[in]_scaleScale of the custom part.
[in]_posePose of the custom part.
Returns
Name of the custom that has been added.
std::string gazebo::gui::ModelCreator::AddCylinder ( double  _radius = 0.5,
double  _length = 1.0,
const math::Pose _pose = math::Pose::Zero 
)

Add a cylinder to the model.

Parameters
[in]_radiusRadius of the cylinder.
[in]_lengthLength of the cylinder.
[in]_posePose of the cylinder.
Returns
Name of the cylinder that has been added.
void gazebo::gui::ModelCreator::AddJoint ( JointMaker::JointType  _type)

Add a joint to the model.

Parameters
[in]_typeType of joint to add.
Returns
Name of the joint that has been added.
void gazebo::gui::ModelCreator::AddPart ( PartType  _type)

Add a part to the model.

Parameters
[in]_typeType of part to be added
std::string gazebo::gui::ModelCreator::AddSphere ( double  _radius = 0.5,
const math::Pose _pose = math::Pose::Zero 
)

Add a sphere to the model.

Parameters
[in]_radiusRadius of the sphere.
[in]_posePose of the sphere.
Returns
Name of the sphere that has been added.
void gazebo::gui::ModelCreator::FinishModel ( )

Finish the model and create the entity on the gzserver.

void gazebo::gui::ModelCreator::GenerateSDF ( )

Generate the SDF from model part and joint visuals.

JointMaker* gazebo::gui::ModelCreator::GetJointMaker ( ) const

Get joint maker.

Returns
Joint maker
std::string gazebo::gui::ModelCreator::GetModelName ( ) const

Get the name of the model.

Returns
Name of model.
void gazebo::gui::ModelCreator::PartAdded ( )
signal

Qt signal when the a part has been added.

void gazebo::gui::ModelCreator::RemovePart ( const std::string &  _partName)

Remove a part from the model.

Parameters
[in]_partNameName of the part to remove
void gazebo::gui::ModelCreator::Reset ( )

Reset the model creator and the SDF.

void gazebo::gui::ModelCreator::SaveToSDF ( const std::string &  _savePath)

Save model to SDF format.

Parameters
[in]_savePathPath to save the SDF to.
void gazebo::gui::ModelCreator::SetAutoDisable ( bool  _auto)

Set the model to allow auto disable at rest.

Parameters
[in]_autoTrue to allow the model to auto disable.
void gazebo::gui::ModelCreator::SetModelName ( const std::string &  _modelName)

Set the name of the model.

Parameters
[in]_modelNameName of the model to set to.
void gazebo::gui::ModelCreator::SetStatic ( bool  _static)

Set the model to be static.

Parameters
[in]_staticTrue to make the model static.
void gazebo::gui::ModelCreator::Stop ( )

Stop the process of adding a part or joint to the model.


The documentation for this class was generated from the following file: