00001
00002 #ifndef TOPOLOGICAL_NAV_MSGS_MESSAGE_TOPOLOGICALROADMAP_H
00003 #define TOPOLOGICAL_NAV_MSGS_MESSAGE_TOPOLOGICALROADMAP_H
00004 #include <string>
00005 #include <vector>
00006 #include <ostream>
00007 #include "ros/serialization.h"
00008 #include "ros/builtin_message_traits.h"
00009 #include "ros/message_operations.h"
00010 #include "ros/message.h"
00011 #include "ros/time.h"
00012
00013 #include "topological_nav_msgs/RoadmapNode.h"
00014 #include "topological_nav_msgs/RoadmapEdge.h"
00015
00016 namespace topological_nav_msgs
00017 {
00018 template <class ContainerAllocator>
00019 struct TopologicalRoadmap_ : public ros::Message
00020 {
00021 typedef TopologicalRoadmap_<ContainerAllocator> Type;
00022
00023 TopologicalRoadmap_()
00024 : nodes()
00025 , edges()
00026 {
00027 }
00028
00029 TopologicalRoadmap_(const ContainerAllocator& _alloc)
00030 : nodes(_alloc)
00031 , edges(_alloc)
00032 {
00033 }
00034
00035 typedef std::vector< ::topological_nav_msgs::RoadmapNode_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::topological_nav_msgs::RoadmapNode_<ContainerAllocator> >::other > _nodes_type;
00036 std::vector< ::topological_nav_msgs::RoadmapNode_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::topological_nav_msgs::RoadmapNode_<ContainerAllocator> >::other > nodes;
00037
00038 typedef std::vector< ::topological_nav_msgs::RoadmapEdge_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::topological_nav_msgs::RoadmapEdge_<ContainerAllocator> >::other > _edges_type;
00039 std::vector< ::topological_nav_msgs::RoadmapEdge_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::topological_nav_msgs::RoadmapEdge_<ContainerAllocator> >::other > edges;
00040
00041
00042 ROS_DEPRECATED uint32_t get_nodes_size() const { return (uint32_t)nodes.size(); }
00043 ROS_DEPRECATED void set_nodes_size(uint32_t size) { nodes.resize((size_t)size); }
00044 ROS_DEPRECATED void get_nodes_vec(std::vector< ::topological_nav_msgs::RoadmapNode_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::topological_nav_msgs::RoadmapNode_<ContainerAllocator> >::other > & vec) const { vec = this->nodes; }
00045 ROS_DEPRECATED void set_nodes_vec(const std::vector< ::topological_nav_msgs::RoadmapNode_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::topological_nav_msgs::RoadmapNode_<ContainerAllocator> >::other > & vec) { this->nodes = vec; }
00046 ROS_DEPRECATED uint32_t get_edges_size() const { return (uint32_t)edges.size(); }
00047 ROS_DEPRECATED void set_edges_size(uint32_t size) { edges.resize((size_t)size); }
00048 ROS_DEPRECATED void get_edges_vec(std::vector< ::topological_nav_msgs::RoadmapEdge_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::topological_nav_msgs::RoadmapEdge_<ContainerAllocator> >::other > & vec) const { vec = this->edges; }
00049 ROS_DEPRECATED void set_edges_vec(const std::vector< ::topological_nav_msgs::RoadmapEdge_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::topological_nav_msgs::RoadmapEdge_<ContainerAllocator> >::other > & vec) { this->edges = vec; }
00050 private:
00051 static const char* __s_getDataType_() { return "topological_nav_msgs/TopologicalRoadmap"; }
00052 public:
00053 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00054
00055 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00056
00057 private:
00058 static const char* __s_getMD5Sum_() { return "3860d4f5bd292b2fc201613203c01a2a"; }
00059 public:
00060 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00061
00062 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00063
00064 private:
00065 static const char* __s_getMessageDefinition_() { return "# A topological roadmap consists of nodes representing navigation waypoints\n\
00066 # and edges representing navigable connections. \n\
00067 \n\
00068 RoadmapNode[] nodes\n\
00069 RoadmapEdge[] edges\n\
00070 ================================================================================\n\
00071 MSG: topological_nav_msgs/RoadmapNode\n\
00072 # Info stored with a waypoint node in the topological roadmap\n\
00073 \n\
00074 # Id of this node in the roadmap\n\
00075 uint32 id\n\
00076 \n\
00077 # Id of the topological map grid wrt which this waypoint position is defined\n\
00078 uint32 grid\n\
00079 \n\
00080 # Relative position in the grid frame\n\
00081 geometry_msgs/Point position\n\
00082 ================================================================================\n\
00083 MSG: geometry_msgs/Point\n\
00084 # This contains the position of a point in free space\n\
00085 float64 x\n\
00086 float64 y\n\
00087 float64 z\n\
00088 \n\
00089 ================================================================================\n\
00090 MSG: topological_nav_msgs/RoadmapEdge\n\
00091 # Info stored with an edge in the roadmap\n\
00092 \n\
00093 # Id of this edge in the roadmap.\n\
00094 uint32 id\n\
00095 \n\
00096 # Grid this edge lives on\n\
00097 uint32 grid\n\
00098 \n\
00099 # Source node of the edge; must belong to the grid.\n\
00100 uint32 src\n\
00101 \n\
00102 # Target node of the edge; must belong to the grid.\n\
00103 uint32 dest\n\
00104 \n\
00105 # Cost of this edge\n\
00106 float32 cost\n\
00107 "; }
00108 public:
00109 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00110
00111 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00112
00113 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00114 {
00115 ros::serialization::OStream stream(write_ptr, 1000000000);
00116 ros::serialization::serialize(stream, nodes);
00117 ros::serialization::serialize(stream, edges);
00118 return stream.getData();
00119 }
00120
00121 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00122 {
00123 ros::serialization::IStream stream(read_ptr, 1000000000);
00124 ros::serialization::deserialize(stream, nodes);
00125 ros::serialization::deserialize(stream, edges);
00126 return stream.getData();
00127 }
00128
00129 ROS_DEPRECATED virtual uint32_t serializationLength() const
00130 {
00131 uint32_t size = 0;
00132 size += ros::serialization::serializationLength(nodes);
00133 size += ros::serialization::serializationLength(edges);
00134 return size;
00135 }
00136
00137 typedef boost::shared_ptr< ::topological_nav_msgs::TopologicalRoadmap_<ContainerAllocator> > Ptr;
00138 typedef boost::shared_ptr< ::topological_nav_msgs::TopologicalRoadmap_<ContainerAllocator> const> ConstPtr;
00139 };
00140 typedef ::topological_nav_msgs::TopologicalRoadmap_<std::allocator<void> > TopologicalRoadmap;
00141
00142 typedef boost::shared_ptr< ::topological_nav_msgs::TopologicalRoadmap> TopologicalRoadmapPtr;
00143 typedef boost::shared_ptr< ::topological_nav_msgs::TopologicalRoadmap const> TopologicalRoadmapConstPtr;
00144
00145
00146 template<typename ContainerAllocator>
00147 std::ostream& operator<<(std::ostream& s, const ::topological_nav_msgs::TopologicalRoadmap_<ContainerAllocator> & v)
00148 {
00149 ros::message_operations::Printer< ::topological_nav_msgs::TopologicalRoadmap_<ContainerAllocator> >::stream(s, "", v);
00150 return s;}
00151
00152 }
00153
00154 namespace ros
00155 {
00156 namespace message_traits
00157 {
00158 template<class ContainerAllocator>
00159 struct MD5Sum< ::topological_nav_msgs::TopologicalRoadmap_<ContainerAllocator> > {
00160 static const char* value()
00161 {
00162 return "3860d4f5bd292b2fc201613203c01a2a";
00163 }
00164
00165 static const char* value(const ::topological_nav_msgs::TopologicalRoadmap_<ContainerAllocator> &) { return value(); }
00166 static const uint64_t static_value1 = 0x3860d4f5bd292b2fULL;
00167 static const uint64_t static_value2 = 0xc201613203c01a2aULL;
00168 };
00169
00170 template<class ContainerAllocator>
00171 struct DataType< ::topological_nav_msgs::TopologicalRoadmap_<ContainerAllocator> > {
00172 static const char* value()
00173 {
00174 return "topological_nav_msgs/TopologicalRoadmap";
00175 }
00176
00177 static const char* value(const ::topological_nav_msgs::TopologicalRoadmap_<ContainerAllocator> &) { return value(); }
00178 };
00179
00180 template<class ContainerAllocator>
00181 struct Definition< ::topological_nav_msgs::TopologicalRoadmap_<ContainerAllocator> > {
00182 static const char* value()
00183 {
00184 return "# A topological roadmap consists of nodes representing navigation waypoints\n\
00185 # and edges representing navigable connections. \n\
00186 \n\
00187 RoadmapNode[] nodes\n\
00188 RoadmapEdge[] edges\n\
00189 ================================================================================\n\
00190 MSG: topological_nav_msgs/RoadmapNode\n\
00191 # Info stored with a waypoint node in the topological roadmap\n\
00192 \n\
00193 # Id of this node in the roadmap\n\
00194 uint32 id\n\
00195 \n\
00196 # Id of the topological map grid wrt which this waypoint position is defined\n\
00197 uint32 grid\n\
00198 \n\
00199 # Relative position in the grid frame\n\
00200 geometry_msgs/Point position\n\
00201 ================================================================================\n\
00202 MSG: geometry_msgs/Point\n\
00203 # This contains the position of a point in free space\n\
00204 float64 x\n\
00205 float64 y\n\
00206 float64 z\n\
00207 \n\
00208 ================================================================================\n\
00209 MSG: topological_nav_msgs/RoadmapEdge\n\
00210 # Info stored with an edge in the roadmap\n\
00211 \n\
00212 # Id of this edge in the roadmap.\n\
00213 uint32 id\n\
00214 \n\
00215 # Grid this edge lives on\n\
00216 uint32 grid\n\
00217 \n\
00218 # Source node of the edge; must belong to the grid.\n\
00219 uint32 src\n\
00220 \n\
00221 # Target node of the edge; must belong to the grid.\n\
00222 uint32 dest\n\
00223 \n\
00224 # Cost of this edge\n\
00225 float32 cost\n\
00226 ";
00227 }
00228
00229 static const char* value(const ::topological_nav_msgs::TopologicalRoadmap_<ContainerAllocator> &) { return value(); }
00230 };
00231
00232 }
00233 }
00234
00235 namespace ros
00236 {
00237 namespace serialization
00238 {
00239
00240 template<class ContainerAllocator> struct Serializer< ::topological_nav_msgs::TopologicalRoadmap_<ContainerAllocator> >
00241 {
00242 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00243 {
00244 stream.next(m.nodes);
00245 stream.next(m.edges);
00246 }
00247
00248 ROS_DECLARE_ALLINONE_SERIALIZER;
00249 };
00250 }
00251 }
00252
00253 namespace ros
00254 {
00255 namespace message_operations
00256 {
00257
00258 template<class ContainerAllocator>
00259 struct Printer< ::topological_nav_msgs::TopologicalRoadmap_<ContainerAllocator> >
00260 {
00261 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::topological_nav_msgs::TopologicalRoadmap_<ContainerAllocator> & v)
00262 {
00263 s << indent << "nodes[]" << std::endl;
00264 for (size_t i = 0; i < v.nodes.size(); ++i)
00265 {
00266 s << indent << " nodes[" << i << "]: ";
00267 s << std::endl;
00268 s << indent;
00269 Printer< ::topological_nav_msgs::RoadmapNode_<ContainerAllocator> >::stream(s, indent + " ", v.nodes[i]);
00270 }
00271 s << indent << "edges[]" << std::endl;
00272 for (size_t i = 0; i < v.edges.size(); ++i)
00273 {
00274 s << indent << " edges[" << i << "]: ";
00275 s << std::endl;
00276 s << indent;
00277 Printer< ::topological_nav_msgs::RoadmapEdge_<ContainerAllocator> >::stream(s, indent + " ", v.edges[i]);
00278 }
00279 }
00280 };
00281
00282
00283 }
00284 }
00285
00286 #endif // TOPOLOGICAL_NAV_MSGS_MESSAGE_TOPOLOGICALROADMAP_H
00287