00001 """autogenerated by genpy from openraveros/planner_initRequest.msg. Do not edit."""
00002 import sys
00003 python3 = True if sys.hexversion > 0x03000000 else False
00004 import genpy
00005 import struct
00006
00007 import openraveros.msg
00008
00009 class planner_initRequest(genpy.Message):
00010 _md5sum = "c73b5b286a5948cf820facdfe68cffcc"
00011 _type = "openraveros/planner_initRequest"
00012 _has_header = False
00013 _full_text = """
00014
00015 uint32 plannerid
00016 uint32 robotid
00017 PlannerParameters params
00018
00019 ================================================================================
00020 MSG: openraveros/PlannerParameters
00021 # planner parameters
00022 float32[] initialconfig
00023 float32[] finalconfig
00024
00025 """
00026 __slots__ = ['plannerid','robotid','params']
00027 _slot_types = ['uint32','uint32','openraveros/PlannerParameters']
00028
00029 def __init__(self, *args, **kwds):
00030 """
00031 Constructor. Any message fields that are implicitly/explicitly
00032 set to None will be assigned a default value. The recommend
00033 use is keyword arguments as this is more robust to future message
00034 changes. You cannot mix in-order arguments and keyword arguments.
00035
00036 The available fields are:
00037 plannerid,robotid,params
00038
00039 :param args: complete set of field values, in .msg order
00040 :param kwds: use keyword arguments corresponding to message field names
00041 to set specific fields.
00042 """
00043 if args or kwds:
00044 super(planner_initRequest, self).__init__(*args, **kwds)
00045
00046 if self.plannerid is None:
00047 self.plannerid = 0
00048 if self.robotid is None:
00049 self.robotid = 0
00050 if self.params is None:
00051 self.params = openraveros.msg.PlannerParameters()
00052 else:
00053 self.plannerid = 0
00054 self.robotid = 0
00055 self.params = openraveros.msg.PlannerParameters()
00056
00057 def _get_types(self):
00058 """
00059 internal API method
00060 """
00061 return self._slot_types
00062
00063 def serialize(self, buff):
00064 """
00065 serialize message into buffer
00066 :param buff: buffer, ``StringIO``
00067 """
00068 try:
00069 _x = self
00070 buff.write(_struct_2I.pack(_x.plannerid, _x.robotid))
00071 length = len(self.params.initialconfig)
00072 buff.write(_struct_I.pack(length))
00073 pattern = '<%sf'%length
00074 buff.write(struct.pack(pattern, *self.params.initialconfig))
00075 length = len(self.params.finalconfig)
00076 buff.write(_struct_I.pack(length))
00077 pattern = '<%sf'%length
00078 buff.write(struct.pack(pattern, *self.params.finalconfig))
00079 except struct.error as se: self._check_types(se)
00080 except TypeError as te: self._check_types(te)
00081
00082 def deserialize(self, str):
00083 """
00084 unpack serialized message in str into this message instance
00085 :param str: byte array of serialized message, ``str``
00086 """
00087 try:
00088 if self.params is None:
00089 self.params = openraveros.msg.PlannerParameters()
00090 end = 0
00091 _x = self
00092 start = end
00093 end += 8
00094 (_x.plannerid, _x.robotid,) = _struct_2I.unpack(str[start:end])
00095 start = end
00096 end += 4
00097 (length,) = _struct_I.unpack(str[start:end])
00098 pattern = '<%sf'%length
00099 start = end
00100 end += struct.calcsize(pattern)
00101 self.params.initialconfig = struct.unpack(pattern, str[start:end])
00102 start = end
00103 end += 4
00104 (length,) = _struct_I.unpack(str[start:end])
00105 pattern = '<%sf'%length
00106 start = end
00107 end += struct.calcsize(pattern)
00108 self.params.finalconfig = struct.unpack(pattern, str[start:end])
00109 return self
00110 except struct.error as e:
00111 raise genpy.DeserializationError(e)
00112
00113
00114 def serialize_numpy(self, buff, numpy):
00115 """
00116 serialize message with numpy array types into buffer
00117 :param buff: buffer, ``StringIO``
00118 :param numpy: numpy python module
00119 """
00120 try:
00121 _x = self
00122 buff.write(_struct_2I.pack(_x.plannerid, _x.robotid))
00123 length = len(self.params.initialconfig)
00124 buff.write(_struct_I.pack(length))
00125 pattern = '<%sf'%length
00126 buff.write(self.params.initialconfig.tostring())
00127 length = len(self.params.finalconfig)
00128 buff.write(_struct_I.pack(length))
00129 pattern = '<%sf'%length
00130 buff.write(self.params.finalconfig.tostring())
00131 except struct.error as se: self._check_types(se)
00132 except TypeError as 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, ``str``
00138 :param numpy: numpy python module
00139 """
00140 try:
00141 if self.params is None:
00142 self.params = openraveros.msg.PlannerParameters()
00143 end = 0
00144 _x = self
00145 start = end
00146 end += 8
00147 (_x.plannerid, _x.robotid,) = _struct_2I.unpack(str[start:end])
00148 start = end
00149 end += 4
00150 (length,) = _struct_I.unpack(str[start:end])
00151 pattern = '<%sf'%length
00152 start = end
00153 end += struct.calcsize(pattern)
00154 self.params.initialconfig = numpy.frombuffer(str[start:end], dtype=numpy.float32, count=length)
00155 start = end
00156 end += 4
00157 (length,) = _struct_I.unpack(str[start:end])
00158 pattern = '<%sf'%length
00159 start = end
00160 end += struct.calcsize(pattern)
00161 self.params.finalconfig = numpy.frombuffer(str[start:end], dtype=numpy.float32, count=length)
00162 return self
00163 except struct.error as e:
00164 raise genpy.DeserializationError(e)
00165
00166 _struct_I = genpy.struct_I
00167 _struct_2I = struct.Struct("<2I")
00168 """autogenerated by genpy from openraveros/planner_initResponse.msg. Do not edit."""
00169 import sys
00170 python3 = True if sys.hexversion > 0x03000000 else False
00171 import genpy
00172 import struct
00173
00174
00175 class planner_initResponse(genpy.Message):
00176 _md5sum = "d41d8cd98f00b204e9800998ecf8427e"
00177 _type = "openraveros/planner_initResponse"
00178 _has_header = False
00179 _full_text = """
00180
00181 """
00182 __slots__ = []
00183 _slot_types = []
00184
00185 def __init__(self, *args, **kwds):
00186 """
00187 Constructor. Any message fields that are implicitly/explicitly
00188 set to None will be assigned a default value. The recommend
00189 use is keyword arguments as this is more robust to future message
00190 changes. You cannot mix in-order arguments and keyword arguments.
00191
00192 The available fields are:
00193
00194
00195 :param args: complete set of field values, in .msg order
00196 :param kwds: use keyword arguments corresponding to message field names
00197 to set specific fields.
00198 """
00199 if args or kwds:
00200 super(planner_initResponse, self).__init__(*args, **kwds)
00201
00202 def _get_types(self):
00203 """
00204 internal API method
00205 """
00206 return self._slot_types
00207
00208 def serialize(self, buff):
00209 """
00210 serialize message into buffer
00211 :param buff: buffer, ``StringIO``
00212 """
00213 try:
00214 pass
00215 except struct.error as se: self._check_types(se)
00216 except TypeError as te: self._check_types(te)
00217
00218 def deserialize(self, str):
00219 """
00220 unpack serialized message in str into this message instance
00221 :param str: byte array of serialized message, ``str``
00222 """
00223 try:
00224 end = 0
00225 return self
00226 except struct.error as e:
00227 raise genpy.DeserializationError(e)
00228
00229
00230 def serialize_numpy(self, buff, numpy):
00231 """
00232 serialize message with numpy array types into buffer
00233 :param buff: buffer, ``StringIO``
00234 :param numpy: numpy python module
00235 """
00236 try:
00237 pass
00238 except struct.error as se: self._check_types(se)
00239 except TypeError as te: self._check_types(te)
00240
00241 def deserialize_numpy(self, str, numpy):
00242 """
00243 unpack serialized message in str into this message instance using numpy for array types
00244 :param str: byte array of serialized message, ``str``
00245 :param numpy: numpy python module
00246 """
00247 try:
00248 end = 0
00249 return self
00250 except struct.error as e:
00251 raise genpy.DeserializationError(e)
00252
00253 _struct_I = genpy.struct_I
00254 class planner_init(object):
00255 _type = 'openraveros/planner_init'
00256 _md5sum = 'c73b5b286a5948cf820facdfe68cffcc'
00257 _request_class = planner_initRequest
00258 _response_class = planner_initResponse