Classes | Public Types | Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Private Slots
rviz::Robot Class Reference

#include <robot.h>

List of all members.

Classes

class  LinkFactory

Public Types

enum  LinkTreeStyle {
  STYLE_LINK_LIST, STYLE_DEFAULT = STYLE_LINK_LIST, STYLE_JOINT_LIST, STYLE_LINK_TREE,
  STYLE_JOINT_LINK_TREE
}
typedef std::map< std::string,
RobotJoint * > 
M_NameToJoint
typedef std::map< std::string,
RobotLink * > 
M_NameToLink

Public Member Functions

void calculateJointCheckboxes ()
virtual void clear ()
 Clears all data loaded from a URDF.
float getAlpha ()
Ogre::SceneNode * getCollisionNode ()
DisplayContextgetDisplayContext ()
RobotJointgetJoint (const std::string &name)
const M_NameToJointgetJoints () const
RobotLinkgetLink (const std::string &name)
const M_NameToLinkgetLinks () const
PropertygetLinkTreeProperty ()
const std::string & getName ()
virtual const Ogre::Quaternion & getOrientation ()
Ogre::SceneNode * getOtherNode ()
virtual const Ogre::Vector3getPosition ()
RobotLinkgetRootLink ()
Ogre::SceneManager * getSceneManager ()
Ogre::SceneNode * getVisualNode ()
bool isCollisionVisible ()
 Returns whether or not the collision representation is set to be visible To be visible this and isVisible() must both be true.
bool isVisible ()
 Returns whether anything is visible.
bool isVisualVisible ()
 Returns whether or not the visual representation is set to be visible To be visible this and isVisible() must both be true.
virtual void load (const urdf::ModelInterface &urdf, bool visual=true, bool collision=true)
 Loads meshes/primitives from a robot description. Calls clear() before loading.
 Robot (Ogre::SceneNode *root_node, DisplayContext *context, const std::string &name, Property *parent_property)
void setAlpha (float a)
void setCollisionVisible (bool visible)
 Set whether the collision meshes/primitives of the robot should be visible.
void setLinkFactory (LinkFactory *link_factory)
void setLinkTreeStyle (LinkTreeStyle style)
virtual void setOrientation (const Ogre::Quaternion &orientation)
virtual void setPosition (const Ogre::Vector3 &position)
virtual void setScale (const Ogre::Vector3 &scale)
virtual void setVisible (bool visible)
 Set the robot as a whole to be visible or not.
void setVisualVisible (bool visible)
 Set whether the visual meshes of the robot should be visible.
virtual void update (const LinkUpdater &updater)
virtual ~Robot ()

Protected Member Functions

void addJointToLinkTree (LinkTreeStyle style, Property *parent, RobotJoint *joint)
void addLinkToLinkTree (LinkTreeStyle style, Property *parent, RobotLink *link)
void initLinkTreeStyle ()
void setEnableAllLinksCheckbox (QVariant val)
void unparentLinkProperties ()
void updateLinkVisibilities ()
 Call RobotLink::updateVisibility() on each link.
void useDetailProperty (bool use_detail)

Static Protected Member Functions

static bool styleIsTree (LinkTreeStyle style)
static bool styleShowJoint (LinkTreeStyle style)
static bool styleShowLink (LinkTreeStyle style)

Protected Attributes

float alpha_
bool collision_visible_
 Should we show the collision representation?
DisplayContextcontext_
bool doing_set_checkbox_
BoolPropertyenable_all_links_
BoolPropertyexpand_joint_details_
BoolPropertyexpand_link_details_
BoolPropertyexpand_tree_
bool inChangedEnableAllLinks
M_NameToJoint joints_
 Map of name to joint info, stores all loaded joints.
LinkFactorylink_factory_
 factory for generating links and joints
Propertylink_tree_
EnumPropertylink_tree_style_
M_NameToLink links_
 Map of name to link info, stores all loaded links.
std::string name_
bool robot_loaded_
Ogre::SceneNode * root_collision_node_
 Node all our collision nodes are children of.
RobotLinkroot_link_
Ogre::SceneNode * root_other_node_
Ogre::SceneNode * root_visual_node_
 Node all our visual nodes are children of.
Ogre::SceneManager * scene_manager_
std::map< LinkTreeStyle,
std::string > 
style_name_map_
bool visible_
 Should we show anything at all? (affects visual, collision, axes, and trails)
bool visual_visible_
 Should we show the visual representation?

Private Slots

void changedEnableAllLinks ()
void changedExpandJointDetails ()
void changedExpandLinkDetails ()
void changedExpandTree ()
void changedHideSubProperties ()
void changedLinkTreeStyle ()

Detailed Description

A helper class to draw a representation of a robot, as specified by a URDF. Can display either the visual models of the robot, or the collision models.

Definition at line 86 of file robot.h.


Member Typedef Documentation

typedef std::map< std::string, RobotJoint* > rviz::Robot::M_NameToJoint

Definition at line 150 of file robot.h.

typedef std::map< std::string, RobotLink* > rviz::Robot::M_NameToLink

Definition at line 149 of file robot.h.


Member Enumeration Documentation

Enumerator:
STYLE_LINK_LIST 
STYLE_DEFAULT 
STYLE_JOINT_LIST 
STYLE_LINK_TREE 
STYLE_JOINT_LINK_TREE 

Definition at line 193 of file robot.h.


Constructor & Destructor Documentation

Robot::Robot ( Ogre::SceneNode *  root_node,
DisplayContext context,
const std::string &  name,
Property parent_property 
)

Definition at line 57 of file robot.cpp.

Robot::~Robot ( ) [virtual]

Definition at line 119 of file robot.cpp.


Member Function Documentation

void Robot::addJointToLinkTree ( LinkTreeStyle  style,
Property parent,
RobotJoint joint 
) [protected]

Definition at line 635 of file robot.cpp.

void Robot::addLinkToLinkTree ( LinkTreeStyle  style,
Property parent,
RobotLink link 
) [protected]

used by setLinkTreeStyle() to recursively build link & joint tree.

Definition at line 614 of file robot.cpp.

Definition at line 675 of file robot.cpp.

void Robot::changedEnableAllLinks ( ) [private, slot]

Definition at line 436 of file robot.cpp.

void Robot::changedExpandJointDetails ( ) [private, slot]

Definition at line 424 of file robot.cpp.

void Robot::changedExpandLinkDetails ( ) [private, slot]

Definition at line 412 of file robot.cpp.

void Robot::changedExpandTree ( ) [private, slot]

Definition at line 368 of file robot.cpp.

void Robot::changedHideSubProperties ( ) [private, slot]

Definition at line 393 of file robot.cpp.

void Robot::changedLinkTreeStyle ( ) [private, slot]

Definition at line 526 of file robot.cpp.

void Robot::clear ( ) [virtual]

Clears all data loaded from a URDF.

Definition at line 207 of file robot.cpp.

float rviz::Robot::getAlpha ( ) [inline]

Definition at line 143 of file robot.h.

Ogre::SceneNode* rviz::Robot::getCollisionNode ( ) [inline]

Definition at line 157 of file robot.h.

Definition at line 160 of file robot.h.

RobotJoint * Robot::getJoint ( const std::string &  name)

Definition at line 663 of file robot.cpp.

const M_NameToJoint& rviz::Robot::getJoints ( ) const [inline]

Definition at line 152 of file robot.h.

RobotLink * Robot::getLink ( const std::string &  name)

Definition at line 651 of file robot.cpp.

const M_NameToLink& rviz::Robot::getLinks ( ) const [inline]

Definition at line 151 of file robot.h.

can be used to change the name, reparent, or add extra properties to the list of links

Definition at line 205 of file robot.h.

const std::string& rviz::Robot::getName ( void  ) [inline]

Definition at line 154 of file robot.h.

const Ogre::Quaternion & Robot::getOrientation ( ) [virtual]

Definition at line 825 of file robot.cpp.

Ogre::SceneNode* rviz::Robot::getOtherNode ( ) [inline]

Definition at line 158 of file robot.h.

const Ogre::Vector3 & Robot::getPosition ( ) [virtual]

Definition at line 820 of file robot.cpp.

Definition at line 145 of file robot.h.

Ogre::SceneManager* rviz::Robot::getSceneManager ( ) [inline]

Definition at line 159 of file robot.h.

Ogre::SceneNode* rviz::Robot::getVisualNode ( ) [inline]

Definition at line 156 of file robot.h.

void Robot::initLinkTreeStyle ( ) [protected]

initialize style_name_map_ and link_tree_style_ options

Definition at line 477 of file robot.cpp.

Returns whether or not the collision representation is set to be visible To be visible this and isVisible() must both be true.

Definition at line 188 of file robot.cpp.

bool Robot::isVisible ( )

Returns whether anything is visible.

Definition at line 178 of file robot.cpp.

Returns whether or not the visual representation is set to be visible To be visible this and isVisible() must both be true.

Definition at line 183 of file robot.cpp.

void Robot::load ( const urdf::ModelInterface &  urdf,
bool  visual = true,
bool  collision = true 
) [virtual]

Loads meshes/primitives from a robot description. Calls clear() before loading.

Parameters:
urdfThe robot description to read from
visualWhether or not to load the visual representation
collisionWhether or not to load the collision representation

Definition at line 254 of file robot.cpp.

void Robot::setAlpha ( float  a)

Definition at line 193 of file robot.cpp.

void Robot::setCollisionVisible ( bool  visible)

Set whether the collision meshes/primitives of the robot should be visible.

Parameters:
visibleWhether the collision meshes/primitives should be visible

Definition at line 161 of file robot.cpp.

void Robot::setEnableAllLinksCheckbox ( QVariant  val) [protected]

Definition at line 468 of file robot.cpp.

void Robot::setLinkFactory ( LinkFactory link_factory)

Call this before load() to subclass the RobotLink or RobotJoint class used in the link property. Example: class MyLinkFactory : public LinkFactory { ... // overload createLink() and/or createJoint() } ... robot->setLinkFactory(new MyLinkFactory());

Definition at line 129 of file robot.cpp.

Set the style of the link property.

Definition at line 516 of file robot.cpp.

void Robot::setOrientation ( const Ogre::Quaternion &  orientation) [virtual]

Definition at line 808 of file robot.cpp.

void Robot::setPosition ( const Ogre::Vector3 position) [virtual]

Definition at line 802 of file robot.cpp.

void Robot::setScale ( const Ogre::Vector3 scale) [virtual]

Definition at line 814 of file robot.cpp.

void Robot::setVisible ( bool  visible) [virtual]

Set the robot as a whole to be visible or not.

Parameters:
visibleShould we be visible?

Definition at line 138 of file robot.cpp.

void Robot::setVisualVisible ( bool  visible)

Set whether the visual meshes of the robot should be visible.

Parameters:
visibleWhether the visual meshes of the robot should be visible

Definition at line 155 of file robot.cpp.

bool Robot::styleIsTree ( LinkTreeStyle  style) [static, protected]

Definition at line 509 of file robot.cpp.

bool Robot::styleShowJoint ( LinkTreeStyle  style) [static, protected]

Definition at line 502 of file robot.cpp.

bool Robot::styleShowLink ( LinkTreeStyle  style) [static, protected]

Definition at line 494 of file robot.cpp.

void Robot::unparentLinkProperties ( ) [protected]

remove all link and joint properties from their parents. Needed before deletion and before rearranging link tree.

Definition at line 330 of file robot.cpp.

void Robot::update ( const LinkUpdater updater) [virtual]

Definition at line 728 of file robot.cpp.

void Robot::updateLinkVisibilities ( ) [protected]

Call RobotLink::updateVisibility() on each link.

Definition at line 167 of file robot.cpp.

void Robot::useDetailProperty ( bool  use_detail) [protected]

Definition at line 349 of file robot.cpp.


Member Data Documentation

float rviz::Robot::alpha_ [protected]

Definition at line 278 of file robot.h.

Should we show the collision representation?

Definition at line 259 of file robot.h.

Definition at line 261 of file robot.h.

Definition at line 270 of file robot.h.

Definition at line 267 of file robot.h.

Definition at line 266 of file robot.h.

Definition at line 265 of file robot.h.

Definition at line 264 of file robot.h.

Definition at line 275 of file robot.h.

Map of name to joint info, stores all loaded joints.

Definition at line 248 of file robot.h.

factory for generating links and joints

Definition at line 251 of file robot.h.

Definition at line 262 of file robot.h.

Definition at line 263 of file robot.h.

Map of name to link info, stores all loaded links.

Definition at line 247 of file robot.h.

std::string rviz::Robot::name_ [protected]

Definition at line 277 of file robot.h.

bool rviz::Robot::robot_loaded_ [protected]

Definition at line 271 of file robot.h.

Ogre::SceneNode* rviz::Robot::root_collision_node_ [protected]

Node all our collision nodes are children of.

Definition at line 254 of file robot.h.

Definition at line 249 of file robot.h.

Ogre::SceneNode* rviz::Robot::root_other_node_ [protected]

Definition at line 255 of file robot.h.

Ogre::SceneNode* rviz::Robot::root_visual_node_ [protected]

Node all our visual nodes are children of.

Definition at line 253 of file robot.h.

Ogre::SceneManager* rviz::Robot::scene_manager_ [protected]

Definition at line 245 of file robot.h.

std::map<LinkTreeStyle, std::string> rviz::Robot::style_name_map_ [protected]

Definition at line 268 of file robot.h.

bool rviz::Robot::visible_ [protected]

Should we show anything at all? (affects visual, collision, axes, and trails)

Definition at line 257 of file robot.h.

bool rviz::Robot::visual_visible_ [protected]

Should we show the visual representation?

Definition at line 258 of file robot.h.


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


rviz
Author(s): Dave Hershberger, David Gossow, Josh Faust
autogenerated on Tue Oct 3 2017 03:19:32