topological_node.cpp
Go to the documentation of this file.
00001 
00027 #include <topological_tools/topological_node.h>
00028 
00029 
00030 
00031 using namespace std;
00032 using namespace ros;
00033 using namespace topological_tools;
00034 
00035 
00036 
00037 TopologicalNode::TopologicalNode ( const geometry_msgs::Pose& goal, const string& name ) :
00038     goal_ ( goal ),
00039     name_ ( name )
00040 {}
00041 
00042 
00043 
00044 void TopologicalNode::connect ( boost::shared_ptr<TopologicalNode> tpn, const string& connection_label )
00045 {
00046     connections_[connection_label] = tpn;
00047 }
00048 
00049 
00050 
00051 boost::shared_ptr<TopologicalNode> TopologicalNode::getConnection ( const string& connection_label )
00052 {
00053     if ( !connections_.count ( connection_label ) )
00054     {
00055         ROS_ERROR_STREAM ( "TopologicalNode:: Node " << name_ << " has no connection '" << connection_label << "'." );
00056         abort();
00057     }
00058 
00059     return connections_[connection_label];
00060 }
00061 
00062 
00063 
00064 bool TopologicalNode::hasConnection ( const string& connection_label )
00065 {
00066     return connections_.count ( connection_label );
00067 }
00068 
00069 
00070 
00071 const geometry_msgs::Pose& TopologicalNode::getGoalPose()
00072 {
00073     return goal_;
00074 }
00075 
00076 
00077 
00078 const string& TopologicalNode::getName()
00079 {
00080     return name_;
00081 }


topological_tools
Author(s): Joao Messias
autogenerated on Wed Aug 26 2015 12:28:47