30 #ifndef RVIZ_ROBOT_LINK_H 31 #define RVIZ_ROBOT_LINK_H 39 #include <OgreVector3.h> 40 #include <OgreQuaternion.h> 42 #include <OgreMaterial.h> 43 #include <OgreSharedPtr.h> 47 #include <urdf_model/pose.h> 72 class QuaternionProperty;
74 class RobotLinkSelectionHandler;
89 const urdf::LinkConstSharedPtr& link,
90 const std::string& parent_joint_name,
95 virtual void setRobotAlpha(
float a);
97 virtual void setTransforms(
const Ogre::Vector3& visual_position,
const Ogre::Quaternion& visual_orientation,
98 const Ogre::Vector3& collision_position,
const Ogre::Quaternion& collision_orientation);
101 const std::string&
getName()
const {
return name_; }
110 void setParentProperty(
Property* new_parent);
113 virtual void hideSubProperties(
bool hide);
115 void setToErrorMaterial();
116 void setToNormalMaterial();
118 void setColor(
float red,
float green,
float blue );
122 bool setSelectable(
bool selectable );
123 bool getSelectable();
125 Ogre::Vector3 getPosition();
126 Ogre::Quaternion getOrientation();
128 bool hasGeometry()
const;
134 void setOnlyRenderDepth(
bool onlyRenderDepth );
138 void useDetailProperty(
bool use_detail);
141 void expandDetails(
bool expand);
148 void updateVisibility();
156 void setRenderQueueGroup( Ogre::uint8 group );
157 bool getEnabled()
const;
158 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 );
160 void createVisual(
const urdf::LinkConstSharedPtr& link);
161 void createCollision(
const urdf::LinkConstSharedPtr& link);
162 void createSelection();
163 Ogre::MaterialPtr getMaterialForLink(
const urdf::LinkConstSharedPtr& link,
const std::string material_name =
"" );
221 #endif // RVIZ_ROBOT_LINK_H std::map< Ogre::SubEntity *, Ogre::MaterialPtr > M_SubEntityToMaterial
std::vector< std::string > child_joint_names_
Ogre::SceneNode * visual_node_
The scene node the visual meshes are attached to.
RobotLinkSelectionHandlerPtr selection_handler_
A single element of a property tree, with a name, value, description, and possibly children...
Ogre::MaterialPtr default_material_
std::vector< Ogre::Entity * > visual_meshes_
The entities representing the visual mesh of this link (if they exist)
float robot_alpha_
Alpha value from top-level robot alpha Property (set via setRobotAlpha()).
Property specialized to enforce floating point max/min.
std::string name_
Name of this link.
const std::string & getParentJointName() const
FloatProperty * alpha_property_
const std::string & getName() const
std::string parent_joint_name_
Pure-virtual base class for objects which give Display subclasses context in which to work...
QuaternionProperty * orientation_property_
Ogre::MaterialPtr color_material_
Property * trail_property_
boost::shared_ptr< RobotLinkSelectionHandler > RobotLinkSelectionHandlerPtr
Ogre::SceneNode * collision_node_
The scene node the collision meshes are attached to.
TFSIMD_FORCE_INLINE Vector3()
M_SubEntityToMaterial materials_
Property * axes_property_
Property * getLinkProperty() const
DisplayContext * context_
Ogre::SceneNode * getVisualNode() const
float material_alpha_
If material is not a texture, this saves the alpha value set in the URDF, otherwise is 1...
VectorProperty * position_property_
Contains any data we need from a joint in the robot.
An object that displays a set of X/Y/Z axes, with X=Red, Y=Green, Z=Blue.
std::vector< Ogre::Entity * > collision_meshes_
The entities representing the collision mesh of this link (if they exist)
Contains any data we need from a link in the robot.
const std::vector< std::string > & getChildJointNames() const
std::string default_material_name_
Property * link_property_
Ogre::RibbonTrail * trail_
bool getOnlyRenderDepth() const
Ogre::SceneManager * scene_manager_
Ogre::SceneNode * getCollisionNode() const