hpp-gui  4.10.1
Graphical interface for HPP
roadmap.hh
Go to the documentation of this file.
1 //
2 // Copyright (c) CNRS
3 // Author: Joseph Mirabel
4 //
5 
6 #ifndef HPP_GUI_ROADMAP_HH
7 #define HPP_GUI_ROADMAP_HH
8 
9 #include <hpp/common-idl.hh>
10 #include <gepetto/gui/color-map.hh>
11 #include <gepetto/gui/windows-manager.hh>
13 
14 namespace hpp {
15  namespace gui {
16  class Roadmap {
17  public:
18  typedef unsigned int NodeID;
19  typedef unsigned int EdgeID;
20  typedef gepetto::viewer::Configuration Frame;
21  typedef osgVector3 Position;
22  typedef gepetto::viewer::WindowsManager::Color_t Color;
23 
24  float radius, axisSize;
25 
26  Roadmap (HppWidgetsPlugin* plugin_);
27 
28  virtual ~Roadmap () {}
29 
30  virtual void initRoadmapFromJoint (const std::string& jointName);
31 
32  virtual void initRoadmapFromBody (const std::string& bodyName);
33 
36  void displayRoadmap ();
37 
40  virtual void beforeDisplay ();
41 
44  virtual void afterDisplay ();
45 
46  virtual std::size_t numberNodes ();
47 
48  virtual std::size_t numberEdges ();
49 
50  virtual std::string roadmapName ();
51 
52  virtual std::string nodeName (NodeID nodeId);
53 
54  virtual std::string edgeName (EdgeID edgeId);
55 
56  virtual void nodePosition (NodeID nodeId, Frame& frame);
57 
58  virtual void edgePositions (EdgeID edgeId, Position& start, Position& end);
59 
60  virtual void nodeColor (NodeID nodeId, Color& color);
61 
62  virtual void edgeColor (EdgeID edgeId, Color& color);
63 
64  protected:
66  gepetto::gui::ColorMap nodeColorMap_, edgeColorMap_;
67 
68  private:
69  void initRoadmap ();
70  inline void getPosition(const hpp::floatSeq& q, Frame& t) const;
71 
72  HppWidgetsPlugin* plugin_;
73  std::string name_;
74  bool link_;
75  };
76  } // namespace gui
77 } // namespace hpp
78 
79 #endif // HPP_GUI_ROADMAP_HH
NodeID currentEdgeId_
Definition: roadmap.hh:65
Definition: roadmap.hh:16
virtual void nodeColor(NodeID nodeId, Color &color)
Roadmap(HppWidgetsPlugin *plugin_)
virtual void afterDisplay()
virtual void beforeDisplay()
namespace that encapsulate all the softwares of humanoid-path-planner
Definition: __init__.py:1
virtual std::string roadmapName()
virtual void initRoadmapFromBody(const std::string &bodyName)
gepetto::viewer::Configuration Frame
Definition: roadmap.hh:20
unsigned int EdgeID
Definition: roadmap.hh:19
virtual std::string edgeName(EdgeID edgeId)
gepetto::viewer::WindowsManager::Color_t Color
Definition: roadmap.hh:22
gepetto::gui::ColorMap nodeColorMap_
Definition: roadmap.hh:66
virtual void edgeColor(EdgeID edgeId, Color &color)
virtual std::string nodeName(NodeID nodeId)
virtual void nodePosition(NodeID nodeId, Frame &frame)
float axisSize
Definition: roadmap.hh:24
gepetto::gui::ColorMap edgeColorMap_
Definition: roadmap.hh:66
osgVector3 Position
Definition: roadmap.hh:21
virtual void edgePositions(EdgeID edgeId, Position &start, Position &end)
unsigned int NodeID
Definition: roadmap.hh:18
virtual std::size_t numberEdges()
NodeID currentNodeId_
Definition: roadmap.hh:65
virtual void initRoadmapFromJoint(const std::string &jointName)
virtual ~Roadmap()
Definition: roadmap.hh:28
virtual std::size_t numberNodes()
Plugin that add a lot of features to work with hpp.
Definition: hppwidgetsplugin.hh:29
float radius
Definition: roadmap.hh:24