38 #include <OgreVector3.h> 39 #include <OgreQuaternion.h> 64 class TransformListener;
88 Robot(Ogre::SceneNode* root_node,
90 const std::string& name,
101 virtual void load(
const urdf::ModelInterface&
urdf,
bool visual =
true,
bool collision =
true);
106 virtual void clear();
120 void setVisualVisible(
bool visible);
126 void setCollisionVisible(
bool visible);
136 bool isVisualVisible();
141 bool isCollisionVisible();
143 void setAlpha(
float a);
153 RobotLink* getLink(
const std::string& name);
154 RobotJoint* getJoint(
const std::string& name);
174 return root_visual_node_;
178 return root_collision_node_;
182 return root_other_node_;
186 return scene_manager_;
193 virtual void setPosition(
const Ogre::Vector3& position);
194 virtual void setOrientation(
const Ogre::Quaternion& orientation);
195 virtual void setScale(
const Ogre::Vector3& scale);
196 virtual const Ogre::Vector3& getPosition();
197 virtual const Ogre::Quaternion& getOrientation();
206 const urdf::LinkConstSharedPtr& link,
207 const std::string& parent_joint_name,
210 virtual RobotJoint* createJoint(
Robot* robot,
const urdf::JointConstSharedPtr& joint);
228 STYLE_DEFAULT = STYLE_LINK_LIST,
231 STYLE_JOINT_LINK_TREE
244 void calculateJointCheckboxes();
247 void changedLinkTreeStyle();
248 void changedExpandTree();
249 void changedHideSubProperties();
250 void changedEnableAllLinks();
251 void changedExpandLinkDetails();
252 void changedExpandJointDetails();
256 void updateLinkVisibilities();
260 void unparentLinkProperties();
263 void useDetailProperty(
bool use_detail);
270 void setEnableAllLinksCheckbox(QVariant val);
273 void initLinkTreeStyle();
M_NameToJoint joints_
Map of name to joint info, stores all loaded joints.
const M_NameToLink & getLinks() const
Ogre::SceneNode * getOtherNode()
std::map< std::string, RobotJoint * > M_NameToJoint
const M_NameToJoint & getJoints() const
A single element of a property tree, with a name, value, description, and possibly children...
Ogre::SceneManager * getSceneManager()
BoolProperty * expand_joint_details_
LinkFactory * link_factory_
factory for generating links and joints
RobotLink * getRootLink()
void setVisible(PanelDockWidget *widget, bool visible)
void update(const std::string &key, const XmlRpc::XmlRpcValue &v)
std::map< LinkTreeStyle, std::string > style_name_map_
const std::string & getName()
Ogre::SceneNode * getCollisionNode()
bool visual_visible_
Should we show the visual representation?
Pure-virtual base class for objects which give Display subclasses context in which to work...
Ogre::SceneNode * root_visual_node_
Node all our visual nodes are children of.
BoolProperty * enable_all_links_
BoolProperty * expand_tree_
Property * getLinkTreeProperty()
Contains any data we need from a joint in the robot.
Ogre::SceneManager * scene_manager_
Ogre::SceneNode * getVisualNode()
Contains any data we need from a link in the robot.
bool visible_
Should we show anything at all? (affects visual, collision, axes, and trails)
bool inChangedEnableAllLinks
std::map< std::string, RobotLink * > M_NameToLink
BoolProperty * expand_link_details_
Property specialized to provide getter for booleans.
EnumProperty * link_tree_style_
Ogre::SceneNode * root_other_node_
bool isVisible(PanelDockWidget *widget)
DisplayContext * context_
bool collision_visible_
Should we show the collision representation?
Ogre::SceneNode * root_collision_node_
Node all our collision nodes are children of.
M_NameToLink links_
Map of name to link info, stores all loaded links.
DisplayContext * getDisplayContext()