Public Slots | Public Member Functions | Protected Attributes | Private Types | Private Slots | Private Member Functions | Private Attributes | Friends | List of all members
rviz::RobotLink Struct Reference

Contains any data we need from a link in the robot. More...

#include <robot_link.h>

Inheritance diagram for rviz::RobotLink:
Inheritance graph
[legend]

Public Slots

void updateVisibility ()
 Update the visibility of the link elements: visual mesh, collision mesh, trail, and axes. More...
 

Public Member Functions

void expandDetails (bool expand)
 
const std::vector< std::string > & getChildJointNames () const
 
Ogre::SceneNode * getCollisionNode () const
 
PropertygetLinkProperty () const
 
const std::string & getName () const
 
bool getOnlyRenderDepth () const
 
Ogre::Quaternion getOrientation ()
 
const std::string & getParentJointName () const
 
Ogre::Vector3 getPosition ()
 
RobotgetRobot () const
 
bool getSelectable ()
 
Ogre::SceneNode * getVisualNode () const
 
bool hasGeometry () const
 
virtual void hideSubProperties (bool hide)
 
 RobotLink (Robot *robot, const urdf::LinkConstSharedPtr &link, const std::string &parent_joint_name, bool visual, bool collision)
 
void setColor (float red, float green, float blue)
 
void setOnlyRenderDepth (bool onlyRenderDepth)
 
void setParentProperty (Property *new_parent)
 
virtual void setRobotAlpha (float a)
 
bool setSelectable (bool selectable)
 set whether the link is selectable. If false objects behind/inside the link can be selected/manipulated. Returns old value. More...
 
void setToErrorMaterial ()
 
void setToNormalMaterial ()
 
virtual void setTransforms (const Ogre::Vector3 &visual_position, const Ogre::Quaternion &visual_orientation, const Ogre::Vector3 &collision_position, const Ogre::Quaternion &collision_orientation)
 
void unsetColor ()
 
void useDetailProperty (bool use_detail)
 
virtual ~RobotLink ()
 

Protected Attributes

FloatPropertyalpha_property_
 
Propertyaxes_property_
 
std::vector< std::string > child_joint_names_
 
DisplayContextcontext_
 
Propertydetails_
 
Propertylink_property_
 
std::string name_
 Name of this link. More...
 
QuaternionPropertyorientation_property_
 
std::string parent_joint_name_
 
VectorPropertyposition_property_
 
Robotrobot_
 
Ogre::SceneManager * scene_manager_
 
Propertytrail_property_
 

Private Types

typedef std::map< Ogre::SubEntity *, Ogre::MaterialPtr > M_SubEntityToMaterial
 

Private Slots

void updateAlpha ()
 
void updateAxes ()
 
void updateTrail ()
 

Private Member Functions

void createCollision (const urdf::LinkConstSharedPtr &link)
 
void createEntityForGeometryElement (const urdf::LinkConstSharedPtr &link, const urdf::Geometry &geom, const urdf::Pose &origin, const std::string material_name, Ogre::SceneNode *scene_node, Ogre::Entity *&entity)
 
void createSelection ()
 
void createVisual (const urdf::LinkConstSharedPtr &link)
 
bool getEnabled () const
 
Ogre::MaterialPtr getMaterialForLink (const urdf::LinkConstSharedPtr &link, const std::string material_name="")
 
void setRenderQueueGroup (Ogre::uint8 group)
 

Private Attributes

Axesaxes_
 
std::vector< Ogre::Entity * > collision_meshes_
 The entities representing the collision mesh of this link (if they exist) More...
 
Ogre::SceneNode * collision_node_
 The scene node the collision meshes are attached to. More...
 
Ogre::MaterialPtr color_material_
 
Ogre::MaterialPtr default_material_
 
std::string default_material_name_
 
bool is_selectable_
 
std::string joint_name_
 
float material_alpha_
 If material is not a texture, this saves the alpha value set in the URDF, otherwise is 1.0. More...
 
M_SubEntityToMaterial materials_
 
bool only_render_depth_
 
float robot_alpha_
 Alpha value from top-level robot alpha Property (set via setRobotAlpha()). More...
 
RobotLinkSelectionHandlerPtr selection_handler_
 
Ogre::RibbonTrail * trail_
 
bool using_color_
 
std::vector< Ogre::Entity * > visual_meshes_
 The entities representing the visual mesh of this link (if they exist) More...
 
Ogre::SceneNode * visual_node_
 The scene node the visual meshes are attached to. More...
 

Friends

class RobotLinkSelectionHandler
 

Detailed Description

Contains any data we need from a link in the robot.

Definition at line 84 of file robot_link.h.

Member Typedef Documentation

typedef std::map<Ogre::SubEntity*, Ogre::MaterialPtr> rviz::RobotLink::M_SubEntityToMaterial
private

Definition at line 187 of file robot_link.h.

Constructor & Destructor Documentation

rviz::RobotLink::RobotLink ( Robot robot,
const urdf::LinkConstSharedPtr &  link,
const std::string &  parent_joint_name,
bool  visual,
bool  collision 
)

Definition at line 156 of file robot_link.cpp.

rviz::RobotLink::~RobotLink ( )
virtual

Definition at line 303 of file robot_link.cpp.

Member Function Documentation

void rviz::RobotLink::createCollision ( const urdf::LinkConstSharedPtr &  link)
private

Definition at line 671 of file robot_link.cpp.

void rviz::RobotLink::createEntityForGeometryElement ( const urdf::LinkConstSharedPtr &  link,
const urdf::Geometry &  geom,
const urdf::Pose origin,
const std::string  material_name,
Ogre::SceneNode *  scene_node,
Ogre::Entity *&  entity 
)
private

Definition at line 526 of file robot_link.cpp.

void rviz::RobotLink::createSelection ( )
private

Definition at line 785 of file robot_link.cpp.

void rviz::RobotLink::createVisual ( const urdf::LinkConstSharedPtr &  link)
private

Definition at line 728 of file robot_link.cpp.

void rviz::RobotLink::expandDetails ( bool  expand)

Definition at line 1015 of file robot_link.cpp.

const std::vector<std::string>& rviz::RobotLink::getChildJointNames ( ) const
inline

Definition at line 103 of file robot_link.h.

Ogre::SceneNode* rviz::RobotLink::getCollisionNode ( ) const
inline

Definition at line 106 of file robot_link.h.

bool rviz::RobotLink::getEnabled ( ) const
private

Definition at line 333 of file robot_link.cpp.

Property* rviz::RobotLink::getLinkProperty ( ) const
inline

Definition at line 104 of file robot_link.h.

Ogre::MaterialPtr rviz::RobotLink::getMaterialForLink ( const urdf::LinkConstSharedPtr &  link,
const std::string  material_name = "" 
)
private

Definition at line 444 of file robot_link.cpp.

const std::string& rviz::RobotLink::getName ( void  ) const
inline

Definition at line 101 of file robot_link.h.

bool rviz::RobotLink::getOnlyRenderDepth ( ) const
inline

Definition at line 135 of file robot_link.h.

Ogre::Quaternion rviz::RobotLink::getOrientation ( )

Definition at line 966 of file robot_link.cpp.

const std::string& rviz::RobotLink::getParentJointName ( ) const
inline

Definition at line 102 of file robot_link.h.

Ogre::Vector3 rviz::RobotLink::getPosition ( )

Definition at line 961 of file robot_link.cpp.

Robot* rviz::RobotLink::getRobot ( ) const
inline

Definition at line 107 of file robot_link.h.

bool rviz::RobotLink::getSelectable ( )

Definition at line 947 of file robot_link.cpp.

Ogre::SceneNode* rviz::RobotLink::getVisualNode ( ) const
inline

Definition at line 105 of file robot_link.h.

bool rviz::RobotLink::hasGeometry ( ) const

Definition at line 328 of file robot_link.cpp.

void rviz::RobotLink::hideSubProperties ( bool  hide)
virtual

Definition at line 952 of file robot_link.cpp.

void rviz::RobotLink::setColor ( float  red,
float  green,
float  blue 
)

Definition at line 921 of file robot_link.cpp.

void rviz::RobotLink::setOnlyRenderDepth ( bool  onlyRenderDepth)

Definition at line 364 of file robot_link.cpp.

void rviz::RobotLink::setParentProperty ( Property new_parent)

Definition at line 971 of file robot_link.cpp.

void rviz::RobotLink::setRenderQueueGroup ( Ogre::uint8  group)
private

Definition at line 346 of file robot_link.cpp.

void rviz::RobotLink::setRobotAlpha ( float  a)
virtual

Definition at line 340 of file robot_link.cpp.

bool rviz::RobotLink::setSelectable ( bool  selectable)

set whether the link is selectable. If false objects behind/inside the link can be selected/manipulated. Returns old value.

Definition at line 940 of file robot_link.cpp.

void rviz::RobotLink::setToErrorMaterial ( )

Definition at line 885 of file robot_link.cpp.

void rviz::RobotLink::setToNormalMaterial ( )

Definition at line 897 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 
)
virtual

Definition at line 860 of file robot_link.cpp.

void rviz::RobotLink::unsetColor ( )

Definition at line 934 of file robot_link.cpp.

void rviz::RobotLink::updateAlpha ( )
privateslot

Definition at line 371 of file robot_link.cpp.

void rviz::RobotLink::updateAxes ( )
privateslot

Definition at line 834 of file robot_link.cpp.

void rviz::RobotLink::updateTrail ( )
privateslot

Definition at line 798 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 420 of file robot_link.cpp.

void rviz::RobotLink::useDetailProperty ( bool  use_detail)

Definition at line 987 of file robot_link.cpp.

Friends And Related Function Documentation

friend class RobotLinkSelectionHandler
friend

Definition at line 216 of file robot_link.h.

Member Data Documentation

FloatProperty* rviz::RobotLink::alpha_property_
protected

Definition at line 184 of file robot_link.h.

Axes* rviz::RobotLink::axes_
private

Definition at line 200 of file robot_link.h.

Property* rviz::RobotLink::axes_property_
protected

Definition at line 183 of file robot_link.h.

std::vector<std::string> rviz::RobotLink::child_joint_names_
protected

Definition at line 173 of file robot_link.h.

std::vector<Ogre::Entity*> rviz::RobotLink::collision_meshes_
private

The entities representing the collision mesh of this link (if they exist)

Definition at line 193 of file robot_link.h.

Ogre::SceneNode* rviz::RobotLink::collision_node_
private

The scene node the collision meshes are attached to.

Definition at line 196 of file robot_link.h.

Ogre::MaterialPtr rviz::RobotLink::color_material_
private

Definition at line 213 of file robot_link.h.

DisplayContext* rviz::RobotLink::context_
protected

Definition at line 169 of file robot_link.h.

Ogre::MaterialPtr rviz::RobotLink::default_material_
private

Definition at line 189 of file robot_link.h.

std::string rviz::RobotLink::default_material_name_
private

Definition at line 190 of file robot_link.h.

Property* rviz::RobotLink::details_
protected

Definition at line 179 of file robot_link.h.

bool rviz::RobotLink::is_selectable_
private

Definition at line 206 of file robot_link.h.

std::string rviz::RobotLink::joint_name_
private

Definition at line 209 of file robot_link.h.

Property* rviz::RobotLink::link_property_
protected

Definition at line 178 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 202 of file robot_link.h.

M_SubEntityToMaterial rviz::RobotLink::materials_
private

Definition at line 188 of file robot_link.h.

std::string rviz::RobotLink::name_
protected

Name of this link.

Definition at line 171 of file robot_link.h.

bool rviz::RobotLink::only_render_depth_
private

Definition at line 205 of file robot_link.h.

QuaternionProperty* rviz::RobotLink::orientation_property_
protected

Definition at line 181 of file robot_link.h.

std::string rviz::RobotLink::parent_joint_name_
protected

Definition at line 172 of file robot_link.h.

VectorProperty* rviz::RobotLink::position_property_
protected

Definition at line 180 of file robot_link.h.

Robot* rviz::RobotLink::robot_
protected

Definition at line 167 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 203 of file robot_link.h.

Ogre::SceneManager* rviz::RobotLink::scene_manager_
protected

Definition at line 168 of file robot_link.h.

RobotLinkSelectionHandlerPtr rviz::RobotLink::selection_handler_
private

Definition at line 211 of file robot_link.h.

Ogre::RibbonTrail* rviz::RobotLink::trail_
private

Definition at line 198 of file robot_link.h.

Property* rviz::RobotLink::trail_property_
protected

Definition at line 182 of file robot_link.h.

bool rviz::RobotLink::using_color_
private

Definition at line 214 of file robot_link.h.

std::vector<Ogre::Entity*> rviz::RobotLink::visual_meshes_
private

The entities representing the visual mesh of this link (if they exist)

Definition at line 192 of file robot_link.h.

Ogre::SceneNode* rviz::RobotLink::visual_node_
private

The scene node the visual meshes are attached to.

Definition at line 195 of file robot_link.h.


The documentation for this struct was generated from the following files:


rviz
Author(s): Dave Hershberger, David Gossow, Josh Faust
autogenerated on Wed Aug 28 2019 04:01:54