Contains any data we need from a link in the robot. More...
#include <robot_link.h>
Public Slots | |
void | updateVisibility () |
Update the visibility of the link elements: visual mesh, collision mesh, trail, and axes. | |
Public Member Functions | |
const std::string & | getName () |
Ogre::Quaternion | getOrientation () |
Ogre::Vector3 | getPosition () |
bool | isValid () |
void | load (TiXmlElement *root_element, urdf::Model &descr, const urdf::LinkConstPtr &link, bool visual, bool collision) |
RobotLink (Robot *parent, DisplayContext *context, Property *parent_property) | |
void | setRobotAlpha (float a) |
void | setToErrorMaterial () |
void | setToNormalMaterial () |
void | setTransforms (const Ogre::Vector3 &visual_position, const Ogre::Quaternion &visual_orientation, const Ogre::Vector3 &collision_position, const Ogre::Quaternion &collision_orientation, bool applyOffsetTransforms) |
~RobotLink () | |
Private Types | |
typedef std::map < Ogre::SubEntity *, Ogre::MaterialPtr > | M_SubEntityToMaterial |
Private Slots | |
void | updateAlpha () |
void | updateAxes () |
void | updateTrail () |
Private Member Functions | |
void | createCollision (TiXmlElement *root_element, const urdf::LinkConstPtr &link) |
void | createEntityForGeometryElement (TiXmlElement *root_element, const urdf::LinkConstPtr &link, const urdf::Geometry &geom, const urdf::Pose &origin, Ogre::SceneNode *parent_node, Ogre::Entity *&entity, Ogre::SceneNode *&scene_node, Ogre::SceneNode *&offset_node) |
void | createSelection (const urdf::Model &descr, const urdf::LinkConstPtr &link) |
void | createVisual (TiXmlElement *root_element, const urdf::LinkConstPtr &link) |
bool | getEnabled () const |
Ogre::MaterialPtr | getMaterialForLink (TiXmlElement *root_element, const urdf::LinkConstPtr &link) |
Private Attributes | |
FloatProperty * | alpha_property_ |
Axes * | axes_ |
Property * | axes_property_ |
Ogre::Entity * | collision_mesh_ |
The entity representing the collision mesh of this link (if it exists). | |
Ogre::SceneNode * | collision_node_ |
The scene node the collision mesh/primitive is attached to. | |
Ogre::SceneNode * | collision_offset_node_ |
DisplayContext * | context_ |
Ogre::MaterialPtr | default_material_ |
std::string | default_material_name_ |
bool | enabled_ |
True if this link should be shown, false if not. | |
std::string | joint_name_ |
Property * | link_property_ |
float | material_alpha_ |
If material is not a texture, this saves the alpha value set in the URDF, otherwise is 1.0. | |
M_SubEntityToMaterial | materials_ |
std::string | name_ |
Name of this link. | |
QuaternionProperty * | orientation_property_ |
Robot * | parent_ |
VectorProperty * | position_property_ |
float | robot_alpha_ |
Alpha value from top-level robot alpha Property (set via setRobotAlpha()). | |
Ogre::SceneManager * | scene_manager_ |
RobotLinkSelectionHandlerPtr | selection_handler_ |
CollObjectHandle | selection_object_ |
Ogre::RibbonTrail * | trail_ |
Property * | trail_property_ |
Ogre::Entity * | visual_mesh_ |
The entity representing the visual mesh of this link (if it exists). | |
Ogre::SceneNode * | visual_node_ |
The scene node the visual mesh is attached to. | |
Ogre::SceneNode * | visual_offset_node_ |
Friends | |
class | RobotLinkSelectionHandler |
Contains any data we need from a link in the robot.
Definition at line 93 of file robot_link.h.
typedef std::map<Ogre::SubEntity*, Ogre::MaterialPtr> rviz::RobotLink::M_SubEntityToMaterial [private] |
Definition at line 146 of file robot_link.h.
rviz::RobotLink::RobotLink | ( | Robot * | parent, | |
DisplayContext * | context, | |||
Property * | parent_property | |||
) |
Definition at line 82 of file robot_link.cpp.
rviz::RobotLink::~RobotLink | ( | ) |
Definition at line 122 of file robot_link.cpp.
void rviz::RobotLink::createCollision | ( | TiXmlElement * | root_element, | |
const urdf::LinkConstPtr & | link | |||
) | [private] |
Definition at line 431 of file robot_link.cpp.
void rviz::RobotLink::createEntityForGeometryElement | ( | TiXmlElement * | root_element, | |
const urdf::LinkConstPtr & | link, | |||
const urdf::Geometry & | geom, | |||
const urdf::Pose & | origin, | |||
Ogre::SceneNode * | parent_node, | |||
Ogre::Entity *& | entity, | |||
Ogre::SceneNode *& | scene_node, | |||
Ogre::SceneNode *& | offset_node | |||
) | [private] |
Definition at line 301 of file robot_link.cpp.
void rviz::RobotLink::createSelection | ( | const urdf::Model & | descr, | |
const urdf::LinkConstPtr & | link | |||
) | [private] |
Definition at line 449 of file robot_link.cpp.
void rviz::RobotLink::createVisual | ( | TiXmlElement * | root_element, | |
const urdf::LinkConstPtr & | link | |||
) | [private] |
Definition at line 440 of file robot_link.cpp.
bool rviz::RobotLink::getEnabled | ( | ) | const [private] |
Definition at line 154 of file robot_link.cpp.
Ogre::MaterialPtr rviz::RobotLink::getMaterialForLink | ( | TiXmlElement * | root_element, | |
const urdf::LinkConstPtr & | link | |||
) | [private] |
Definition at line 233 of file robot_link.cpp.
const std::string& rviz::RobotLink::getName | ( | void | ) | [inline] |
Definition at line 107 of file robot_link.h.
Ogre::Quaternion rviz::RobotLink::getOrientation | ( | ) |
Definition at line 589 of file robot_link.cpp.
Ogre::Vector3 rviz::RobotLink::getPosition | ( | ) |
Definition at line 584 of file robot_link.cpp.
bool rviz::RobotLink::isValid | ( | ) |
Definition at line 149 of file robot_link.cpp.
void rviz::RobotLink::load | ( | TiXmlElement * | root_element, | |
urdf::Model & | descr, | |||
const urdf::LinkConstPtr & | link, | |||
bool | visual, | |||
bool | collision | |||
) |
Definition at line 159 of file robot_link.cpp.
void rviz::RobotLink::setRobotAlpha | ( | float | a | ) |
Definition at line 180 of file robot_link.cpp.
void rviz::RobotLink::setToErrorMaterial | ( | ) |
Definition at line 561 of file robot_link.cpp.
void rviz::RobotLink::setToNormalMaterial | ( | ) |
Definition at line 574 of file robot_link.cpp.
void rviz::RobotLink::setTransforms | ( | const Ogre::Vector3 & | visual_position, | |
const Ogre::Quaternion & | visual_orientation, | |||
const Ogre::Vector3 & | collision_position, | |||
const Ogre::Quaternion & | collision_orientation, | |||
bool | applyOffsetTransforms | |||
) |
Definition at line 535 of file robot_link.cpp.
void rviz::RobotLink::updateAlpha | ( | ) | [private, slot] |
Definition at line 186 of file robot_link.cpp.
void rviz::RobotLink::updateAxes | ( | ) | [private, slot] |
Definition at line 512 of file robot_link.cpp.
void rviz::RobotLink::updateTrail | ( | ) | [private, slot] |
Definition at line 476 of file robot_link.cpp.
void rviz::RobotLink::updateVisibility | ( | ) | [slot] |
Update the visibility of the link elements: visual mesh, collision mesh, trail, and axes.
Called by Robot when changing visual and collision visibilities, since each link may be enabled or disabled.
Definition at line 212 of file robot_link.cpp.
friend class RobotLinkSelectionHandler [friend] |
Definition at line 180 of file robot_link.h.
FloatProperty* rviz::RobotLink::alpha_property_ [private] |
Definition at line 178 of file robot_link.h.
Axes* rviz::RobotLink::axes_ [private] |
Definition at line 161 of file robot_link.h.
Property* rviz::RobotLink::axes_property_ [private] |
Definition at line 177 of file robot_link.h.
Ogre::Entity* rviz::RobotLink::collision_mesh_ [private] |
The entity representing the collision mesh of this link (if it exists).
Definition at line 152 of file robot_link.h.
Ogre::SceneNode* rviz::RobotLink::collision_node_ [private] |
The scene node the collision mesh/primitive is attached to.
Definition at line 156 of file robot_link.h.
Ogre::SceneNode* rviz::RobotLink::collision_offset_node_ [private] |
Definition at line 157 of file robot_link.h.
DisplayContext* rviz::RobotLink::context_ [private] |
Definition at line 140 of file robot_link.h.
Ogre::MaterialPtr rviz::RobotLink::default_material_ [private] |
Definition at line 148 of file robot_link.h.
std::string rviz::RobotLink::default_material_name_ [private] |
Definition at line 149 of file robot_link.h.
bool rviz::RobotLink::enabled_ [private] |
True if this link should be shown, false if not.
Definition at line 144 of file robot_link.h.
std::string rviz::RobotLink::joint_name_ [private] |
Definition at line 167 of file robot_link.h.
Property* rviz::RobotLink::link_property_ [private] |
Definition at line 173 of file robot_link.h.
float rviz::RobotLink::material_alpha_ [private] |
If material is not a texture, this saves the alpha value set in the URDF, otherwise is 1.0.
Definition at line 163 of file robot_link.h.
Definition at line 147 of file robot_link.h.
std::string rviz::RobotLink::name_ [private] |
Name of this link.
Definition at line 142 of file robot_link.h.
Definition at line 175 of file robot_link.h.
Robot* rviz::RobotLink::parent_ [private] |
Definition at line 138 of file robot_link.h.
Definition at line 174 of file robot_link.h.
float rviz::RobotLink::robot_alpha_ [private] |
Alpha value from top-level robot alpha Property (set via setRobotAlpha()).
Definition at line 164 of file robot_link.h.
Ogre::SceneManager* rviz::RobotLink::scene_manager_ [private] |
Definition at line 139 of file robot_link.h.
Definition at line 170 of file robot_link.h.
Definition at line 169 of file robot_link.h.
Ogre::RibbonTrail* rviz::RobotLink::trail_ [private] |
Definition at line 159 of file robot_link.h.
Property* rviz::RobotLink::trail_property_ [private] |
Definition at line 176 of file robot_link.h.
Ogre::Entity* rviz::RobotLink::visual_mesh_ [private] |
The entity representing the visual mesh of this link (if it exists).
Definition at line 151 of file robot_link.h.
Ogre::SceneNode* rviz::RobotLink::visual_node_ [private] |
The scene node the visual mesh is attached to.
Definition at line 154 of file robot_link.h.
Ogre::SceneNode* rviz::RobotLink::visual_offset_node_ [private] |
Definition at line 155 of file robot_link.h.