00001 """autogenerated by genmsg_py from RoadmapNode.msg. Do not edit."""
00002 import roslib.message
00003 import struct
00004
00005 import geometry_msgs.msg
00006
00007 class RoadmapNode(roslib.message.Message):
00008 _md5sum = "831d32363c9823932a1d6a8c0d277d9f"
00009 _type = "topological_nav_msgs/RoadmapNode"
00010 _has_header = False
00011 _full_text = """# Info stored with a waypoint node in the topological roadmap
00012
00013 # Id of this node in the roadmap
00014 uint32 id
00015
00016 # Id of the topological map grid wrt which this waypoint position is defined
00017 uint32 grid
00018
00019 # Relative position in the grid frame
00020 geometry_msgs/Point position
00021 ================================================================================
00022 MSG: geometry_msgs/Point
00023 # This contains the position of a point in free space
00024 float64 x
00025 float64 y
00026 float64 z
00027
00028 """
00029 __slots__ = ['id','grid','position']
00030 _slot_types = ['uint32','uint32','geometry_msgs/Point']
00031
00032 def __init__(self, *args, **kwds):
00033 """
00034 Constructor. Any message fields that are implicitly/explicitly
00035 set to None will be assigned a default value. The recommend
00036 use is keyword arguments as this is more robust to future message
00037 changes. You cannot mix in-order arguments and keyword arguments.
00038
00039 The available fields are:
00040 id,grid,position
00041
00042 @param args: complete set of field values, in .msg order
00043 @param kwds: use keyword arguments corresponding to message field names
00044 to set specific fields.
00045 """
00046 if args or kwds:
00047 super(RoadmapNode, self).__init__(*args, **kwds)
00048
00049 if self.id is None:
00050 self.id = 0
00051 if self.grid is None:
00052 self.grid = 0
00053 if self.position is None:
00054 self.position = geometry_msgs.msg.Point()
00055 else:
00056 self.id = 0
00057 self.grid = 0
00058 self.position = geometry_msgs.msg.Point()
00059
00060 def _get_types(self):
00061 """
00062 internal API method
00063 """
00064 return self._slot_types
00065
00066 def serialize(self, buff):
00067 """
00068 serialize message into buffer
00069 @param buff: buffer
00070 @type buff: StringIO
00071 """
00072 try:
00073 _x = self
00074 buff.write(_struct_2I3d.pack(_x.id, _x.grid, _x.position.x, _x.position.y, _x.position.z))
00075 except struct.error, se: self._check_types(se)
00076 except TypeError, te: self._check_types(te)
00077
00078 def deserialize(self, str):
00079 """
00080 unpack serialized message in str into this message instance
00081 @param str: byte array of serialized message
00082 @type str: str
00083 """
00084 try:
00085 if self.position is None:
00086 self.position = geometry_msgs.msg.Point()
00087 end = 0
00088 _x = self
00089 start = end
00090 end += 32
00091 (_x.id, _x.grid, _x.position.x, _x.position.y, _x.position.z,) = _struct_2I3d.unpack(str[start:end])
00092 return self
00093 except struct.error, e:
00094 raise roslib.message.DeserializationError(e)
00095
00096
00097 def serialize_numpy(self, buff, numpy):
00098 """
00099 serialize message with numpy array types into buffer
00100 @param buff: buffer
00101 @type buff: StringIO
00102 @param numpy: numpy python module
00103 @type numpy module
00104 """
00105 try:
00106 _x = self
00107 buff.write(_struct_2I3d.pack(_x.id, _x.grid, _x.position.x, _x.position.y, _x.position.z))
00108 except struct.error, se: self._check_types(se)
00109 except TypeError, te: self._check_types(te)
00110
00111 def deserialize_numpy(self, str, numpy):
00112 """
00113 unpack serialized message in str into this message instance using numpy for array types
00114 @param str: byte array of serialized message
00115 @type str: str
00116 @param numpy: numpy python module
00117 @type numpy: module
00118 """
00119 try:
00120 if self.position is None:
00121 self.position = geometry_msgs.msg.Point()
00122 end = 0
00123 _x = self
00124 start = end
00125 end += 32
00126 (_x.id, _x.grid, _x.position.x, _x.position.y, _x.position.z,) = _struct_2I3d.unpack(str[start:end])
00127 return self
00128 except struct.error, e:
00129 raise roslib.message.DeserializationError(e)
00130
00131 _struct_I = roslib.message.struct_I
00132 _struct_2I3d = struct.Struct("<2I3d")