SMORES Robot Platform Simulation
Modlab at Penn, ASL at Cornell
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends
SmoresNode.hh
1 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 // Author: Edward Yunkai Cui
3 // Description: This class is built for configuration representation.
4 // An node in smores robot is a connectable face, and a
5 // minimal unit in graph structure representation.
6 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
7 #ifndef _GAZEBO_SMORES_NODE_HH_
8 #define _GAZEBO_SMORES_NODE_HH_
9 #include "SmoresEdge.hh"
11 
12 namespace gazebo{
13 class SmoresModule;
14 typedef boost::shared_ptr<SmoresEdge> SmoresEdgePtr;
15 typedef boost::shared_ptr<SmoresModule> SmoresModulePtr;
18 {
19  public:
21  SmoresNode();
23 
30  SmoresNode(int nodeID, int jtype, int jvalue, SmoresModulePtr parent,
31  SmoresEdgePtr edge);
33 
39  SmoresNode(int nodeID, int jtype, int jvalue, SmoresModulePtr parent);
41 
46  SmoresNode(int nodeID, int jtype, int jvalue);
48  ~SmoresNode();
50 
57  void NodeInit(int nodeID, int jtype, int jvalue, SmoresModulePtr parent,
58  SmoresEdgePtr edge);
60 
66  void NodeInit(int nodeID, int jtype, int jvalue, SmoresModulePtr parent);
68 
71  void SetParent(SmoresModulePtr mparent);
73 
76  int GetAxis(void);
78 
81  void ConnectOnEdge(SmoresEdgePtr edge);
83  void Disconnect(void);
85 
88  SmoresEdgePtr GetEdge(void);
90  int NodeID;
92  int JointType;
96  math::Vector3 RelativePosition;
98  SmoresModulePtr Parent;
100  SmoresEdgePtr Edge;
101 };
102 }
103 #endif
void SetParent(SmoresModulePtr mparent)
Set the parent object.
Definition: SmoresNode.cc:87
int JointType
0 for revolute or 1 for prismatic
Definition: SmoresNode.hh:92
SmoresEdgePtr GetEdge(void)
Get the edge that current node connects to.
Definition: SmoresNode.cc:110
gazebo name space
Definition: system_gui.cc:41
int GetAxis(void)
Get axis of the norm vector of connectable face.
Definition: SmoresNode.cc:91
void ConnectOnEdge(SmoresEdgePtr edge)
Connect the current node to one edge.
Definition: SmoresNode.cc:102
void Disconnect(void)
Disconnect the current node from any edge.
Definition: SmoresNode.cc:106
int JointValue
Revolute joint: angle value; prismatic joint: distance value.
Definition: SmoresNode.hh:94
A class used to manage each node, in this case is the part has connectable face.
Definition: SmoresNode.hh:17
~SmoresNode()
Destructor.
Definition: SmoresNode.cc:50
math::Vector3 RelativePosition
Position of the current node relative to base node.
Definition: SmoresNode.hh:96
void NodeInit(int nodeID, int jtype, int jvalue, SmoresModulePtr parent, SmoresEdgePtr edge)
Node initilization functions.
Definition: SmoresNode.cc:55
boost::shared_ptr< SmoresModule > SmoresModulePtr
Smart pointer of the SmoresModule object.
Definition: CommandManagement.hh:19
int NodeID
Node ID specify which node the current node is, 0 is the base node.
Definition: SmoresNode.hh:90
SmoresModulePtr Parent
A pointer to its parent.
Definition: SmoresNode.hh:98
SmoresNode()
Constructor.
SmoresEdgePtr Edge
A pointer to the existing edge.
Definition: SmoresNode.hh:100