effort_visual.h
Go to the documentation of this file.
1 #ifndef EFFORT_VISUAL_H
2 #define EFFORT_VISUAL_H
3 
4 #include <OgrePrerequisites.h>
5 
6 namespace rviz
7 {
8 class Arrow;
9 class BillboardLine;
10 } // namespace rviz
11 
12 namespace rviz
13 {
14 // Each instance of EffortVisual represents the visualization of a single
15 // sensor_msgs::Effort message. Currently it just shows an arrow with
16 // the direction and magnitude of the acceleration vector, but could
17 // easily be expanded to include more of the message data.
19 {
20 public:
21  // Constructor. Creates the visual stuff and puts it into the
22  // scene, but in an unconfigured state.
23  EffortVisual(Ogre::SceneManager* scene_manager, Ogre::SceneNode* parent_node);
24 
25  // Destructor. Removes the visual stuff from the scene.
26  virtual ~EffortVisual();
27 
28  // set rainbow color
29  void getRainbowColor(float value, Ogre::ColourValue& color);
30  void setEffort(const std::string& joint_name, double effort, double max_effort);
31 
32  // set the pose of coordinates frame the each joint refers to.
33  void setFramePosition(const std::string& joint_name, const Ogre::Vector3& position);
34  void setFrameOrientation(const std::string& joint_name, const Ogre::Quaternion& orientation);
35 
36  void setFrameEnabled(const std::string& joint_name, const bool e);
37 
38  void setWidth(float w);
39 
40  void setScale(float s);
41 
42 private:
43  // The object implementing the effort circle
44  std::map<std::string, rviz::BillboardLine*> effort_circle_;
45  std::map<std::string, rviz::Arrow*> effort_arrow_;
46  std::map<std::string, bool> effort_enabled_;
47 
48  Ogre::SceneManager* scene_manager_;
49  Ogre::SceneNode* parent_node_;
50 
51  std::map<std::string, Ogre::Vector3> position_;
52  std::map<std::string, Ogre::Quaternion> orientation_;
53 
54  float width_, scale_;
55 };
56 
57 } // end namespace rviz
58 
59 #endif // EFFORT_VISUAL_H
rviz::EffortVisual::setFrameOrientation
void setFrameOrientation(const std::string &joint_name, const Ogre::Quaternion &orientation)
Definition: effort_visual.cpp:127
rviz::EffortVisual::orientation_
std::map< std::string, Ogre::Quaternion > orientation_
Definition: effort_visual.h:52
rviz::EffortVisual::setFrameEnabled
void setFrameEnabled(const std::string &joint_name, const bool e)
Definition: effort_visual.cpp:116
rviz::EffortVisual::getRainbowColor
void getRainbowColor(float value, Ogre::ColourValue &color)
Definition: effort_visual.cpp:31
s
XmlRpcServer s
rviz::EffortVisual::position_
std::map< std::string, Ogre::Vector3 > position_
Definition: effort_visual.h:51
rviz::EffortVisual::effort_circle_
std::map< std::string, rviz::BillboardLine * > effort_circle_
Definition: effort_visual.h:44
rviz
Definition: add_display_dialog.cpp:54
rviz::EffortVisual::setFramePosition
void setFramePosition(const std::string &joint_name, const Ogre::Vector3 &position)
Definition: effort_visual.cpp:122
rviz::EffortVisual
Definition: effort_visual.h:18
rviz::EffortVisual::scale_
float scale_
Definition: effort_visual.h:54
rviz::EffortVisual::effort_arrow_
std::map< std::string, rviz::Arrow * > effort_arrow_
Definition: effort_visual.h:45
rviz::EffortVisual::setWidth
void setWidth(float w)
Definition: effort_visual.cpp:132
rviz::EffortVisual::parent_node_
Ogre::SceneNode * parent_node_
Definition: effort_visual.h:49
rviz::EffortVisual::width_
float width_
Definition: effort_visual.h:54
rviz::EffortVisual::setScale
void setScale(float s)
Definition: effort_visual.cpp:137
rviz::EffortVisual::scene_manager_
Ogre::SceneManager * scene_manager_
Definition: effort_visual.h:48
rviz::EffortVisual::setEffort
void setEffort(const std::string &joint_name, double effort, double max_effort)
Definition: effort_visual.cpp:55
rviz::EffortVisual::~EffortVisual
virtual ~EffortVisual()
Definition: effort_visual.cpp:21
rviz::EffortVisual::effort_enabled_
std::map< std::string, bool > effort_enabled_
Definition: effort_visual.h:46
rviz::EffortVisual::EffortVisual
EffortVisual(Ogre::SceneManager *scene_manager, Ogre::SceneNode *parent_node)
Definition: effort_visual.cpp:16


rviz
Author(s): Dave Hershberger, David Gossow, Josh Faust, William Woodall
autogenerated on Fri Dec 13 2024 03:31:02