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