Create and manage 3D visuals of a model with parts and joints. More...
#include <ModelCreator.hh>
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... | |
JointMaker * | GetJointMaker () 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... | |
Create and manage 3D visuals of a model with parts and joints.
gazebo::gui::ModelCreator::ModelCreator | ( | ) |
Constructor.
|
virtual |
Destructor.
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.
[in] | _size | Size of the box. |
[in] | _pose | Pose of the box. |
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.
[in] | _name | Name of the custom part. |
[in] | _scale | Scale of the custom part. |
[in] | _pose | Pose of the custom part. |
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.
[in] | _radius | Radius of the cylinder. |
[in] | _length | Length of the cylinder. |
[in] | _pose | Pose of the cylinder. |
void gazebo::gui::ModelCreator::AddJoint | ( | JointMaker::JointType | _type | ) |
Add a joint to the model.
[in] | _type | Type of joint to add. |
void gazebo::gui::ModelCreator::AddPart | ( | PartType | _type | ) |
Add a part to the model.
[in] | _type | Type 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.
[in] | _radius | Radius of the sphere. |
[in] | _pose | Pose of the sphere. |
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.
std::string gazebo::gui::ModelCreator::GetModelName | ( | ) | const |
Get the name of the model.
|
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.
[in] | _partName | Name 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.
[in] | _savePath | Path to save the SDF to. |
void gazebo::gui::ModelCreator::SetAutoDisable | ( | bool | _auto | ) |
Set the model to allow auto disable at rest.
[in] | _auto | True to allow the model to auto disable. |
void gazebo::gui::ModelCreator::SetModelName | ( | const std::string & | _modelName | ) |
Set the name of the model.
[in] | _modelName | Name of the model to set to. |
void gazebo::gui::ModelCreator::SetStatic | ( | bool | _static | ) |
Set the model to be static.
[in] | _static | True to make the model static. |
void gazebo::gui::ModelCreator::Stop | ( | ) |
Stop the process of adding a part or joint to the model.