A model. More...
#include <Model.hh>

Public Member Functions | |
| Model (BasePtr parent) | |
| Constructor. | |
| virtual | ~Model () |
| Destructor. | |
| void | Load (sdf::ElementPtr &_sdf) |
| Load the model. | |
| virtual void | Init () |
| Initialize the model. | |
| void | Update () |
| Update the model. | |
| virtual void | Fini () |
| Finalize the model. | |
| virtual void | UpdateParameters (sdf::ElementPtr &_sdf) |
| update the parameters using new sdf values | |
| virtual const sdf::ElementPtr & | GetSDF () |
| Get the SDF values for the model. | |
| virtual void | RemoveChild (EntityPtr child) |
| Remove a child. | |
| void | Reset () |
| Reset the model. | |
| void | SetLinearVel (const math::Vector3 &vel) |
| Set the linear velocity of the model. | |
| void | SetAngularVel (const math::Vector3 &vel) |
| Set the angular velocity of the model. | |
| void | SetLinearAccel (const math::Vector3 &vel) |
| Set the linear acceleration of the model. | |
| void | SetAngularAccel (const math::Vector3 &vel) |
| Set the angular acceleration of the model. | |
| virtual math::Vector3 | GetRelativeLinearVel () const |
| Get the linear velocity of the entity. | |
| virtual math::Vector3 | GetWorldLinearVel () const |
| Get the linear velocity of the entity in the world frame. | |
| virtual math::Vector3 | GetRelativeAngularVel () const |
| Get the angular velocity of the entity. | |
| virtual math::Vector3 | GetWorldAngularVel () const |
| Get the angular velocity of the entity in the world frame. | |
| virtual math::Vector3 | GetRelativeLinearAccel () const |
| Get the linear acceleration of the entity. | |
| virtual math::Vector3 | GetWorldLinearAccel () const |
| Get the linear acceleration of the entity in the world frame. | |
| virtual math::Vector3 | GetRelativeAngularAccel () const |
| Get the angular acceleration of the entity. | |
| virtual math::Vector3 | GetWorldAngularAccel () const |
| Get the angular acceleration of the entity in the world frame. | |
| virtual math::Box | GetBoundingBox () const |
| Get the size of the bounding box. | |
| unsigned int | GetJointCount () const |
| Get the number of joints. | |
| JointPtr | GetJoint (unsigned int index) const |
| Get a joing by index. | |
| JointPtr | GetJoint (const std::string &name) |
| Get a joint. | |
| LinkPtr | GetLinkById (unsigned int _id) const |
| Get a link by id. | |
| LinkPtr | GetLink (const std::string &name="canonical") const |
| Get a link by name. | |
| void | SetGravityMode (const bool &v) |
| Set the gravity mode of the model. | |
| void | SetCollideMode (const std::string &m) |
| Set the collide mode of the model. | |
| void | SetLaserRetro (const float &retro) |
| Set the laser retro reflectiveness of the model. | |
| void | FillModelMsg (msgs::Model &_msg) |
| Fill a model message. | |
| void | ProcessMsg (const msgs::Model &_msg) |
| Update parameters from a model message. | |
| void | SetJointPositions (const std::map< std::string, double > &_jointPositions) |
| Set the positions of a set of joints. | |
| void | SetJointAnimation (const std::map< std::string, common::NumericAnimationPtr > anim, boost::function< void()> _onComplete) |
| void | AttachStaticModel (ModelPtr &_model, math::Pose _offset) |
| Attach a static model to this model. | |
| void | DetachStaticModel (const std::string &_model) |
Protected Member Functions | |
| virtual void | OnPoseChange () |
| This function is called when the entity's (or one of its parents) pose of the parent has changed. | |
Protected Attributes | |
| std::vector< ModelPtr > | attachedModels |
| std::vector< math::Pose > | attachedModelsOffset |
A model.
| Model | ( | BasePtr | parent | ) |
Constructor.
| parent | Parent object |
| void FillModelMsg | ( | msgs::Model & | _msg | ) |
Fill a model message.
| _msg | Message to fill |
| virtual math::Box GetBoundingBox | ( | ) | const [virtual] |
| JointPtr GetJoint | ( | unsigned int | index | ) | const |
Get a joing by index.
| index | Index of the joint |
| JointPtr GetJoint | ( | const std::string & | name | ) |
Get a joint.
| name | The name of the joint, specified in the world file |
| unsigned int GetJointCount | ( | ) | const |
Get the number of joints.
| LinkPtr GetLink | ( | const std::string & | name = "canonical" | ) | const |
Get a link by name.
| LinkPtr GetLinkById | ( | unsigned int | _id | ) | const |
Get a link by id.
| virtual math::Vector3 GetRelativeAngularAccel | ( | ) | const [virtual] |
Get the angular acceleration of the entity.
Reimplemented from Entity.
| virtual math::Vector3 GetRelativeAngularVel | ( | ) | const [virtual] |
Get the angular velocity of the entity.
Reimplemented from Entity.
| virtual math::Vector3 GetRelativeLinearAccel | ( | ) | const [virtual] |
Get the linear acceleration of the entity.
Reimplemented from Entity.
| virtual math::Vector3 GetRelativeLinearVel | ( | ) | const [virtual] |
Get the linear velocity of the entity.
Reimplemented from Entity.
| virtual math::Vector3 GetWorldAngularAccel | ( | ) | const [virtual] |
Get the angular acceleration of the entity in the world frame.
Reimplemented from Entity.
| virtual math::Vector3 GetWorldAngularVel | ( | ) | const [virtual] |
Get the angular velocity of the entity in the world frame.
Reimplemented from Entity.
| virtual math::Vector3 GetWorldLinearAccel | ( | ) | const [virtual] |
Get the linear acceleration of the entity in the world frame.
Reimplemented from Entity.
| virtual math::Vector3 GetWorldLinearVel | ( | ) | const [virtual] |
Get the linear velocity of the entity in the world frame.
Reimplemented from Entity.
| void Load | ( | sdf::ElementPtr & | _sdf | ) | [virtual] |
| virtual void RemoveChild | ( | EntityPtr | child | ) | [virtual] |
Remove a child.
| child | Remove a child entity |
| void SetAngularAccel | ( | const math::Vector3 & | vel | ) |
Set the angular acceleration of the model.
| vel | The new angular acceleration |
| void SetAngularVel | ( | const math::Vector3 & | vel | ) |
Set the angular velocity of the model.
| vel | The new angular velocity |
| void SetCollideMode | ( | const std::string & | m | ) |
Set the collide mode of the model.
| m | The collision mode |
| void SetLaserRetro | ( | const float & | retro | ) |
Set the laser retro reflectiveness of the model.
| retro | Retro reflectance value |
| void SetLinearAccel | ( | const math::Vector3 & | vel | ) |
Set the linear acceleration of the model.
| vel | The new linear acceleration |
| void SetLinearVel | ( | const math::Vector3 & | vel | ) |
Set the linear velocity of the model.
| vel | The new linear velocity |
1.7.5.1