$search
00001 """autogenerated by genmsg_py from SetObjectStateRequest.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import worldmodel_msgs.msg 00006 00007 class SetObjectStateRequest(roslib.message.Message): 00008 _md5sum = "5312cbd067c80bb142724205a55735f6" 00009 _type = "worldmodel_msgs/SetObjectStateRequest" 00010 _has_header = False #flag to mark the presence of a Header object 00011 _full_text = """ 00012 00013 string object_id 00014 ObjectState new_state 00015 00016 ================================================================================ 00017 MSG: worldmodel_msgs/ObjectState 00018 # The state of an object estimate used to track 00019 # states smaller than 0 disable all updates 00020 00021 int8 UNKNOWN = 0 00022 int8 PENDING = 1 00023 int8 ACTIVE = 2 00024 int8 CONFIRMED = -1 00025 int8 DISCARDED = -2 00026 int8 APPROACHING = -3 00027 00028 int8 state 00029 00030 """ 00031 __slots__ = ['object_id','new_state'] 00032 _slot_types = ['string','worldmodel_msgs/ObjectState'] 00033 00034 def __init__(self, *args, **kwds): 00035 """ 00036 Constructor. Any message fields that are implicitly/explicitly 00037 set to None will be assigned a default value. The recommend 00038 use is keyword arguments as this is more robust to future message 00039 changes. You cannot mix in-order arguments and keyword arguments. 00040 00041 The available fields are: 00042 object_id,new_state 00043 00044 @param args: complete set of field values, in .msg order 00045 @param kwds: use keyword arguments corresponding to message field names 00046 to set specific fields. 00047 """ 00048 if args or kwds: 00049 super(SetObjectStateRequest, self).__init__(*args, **kwds) 00050 #message fields cannot be None, assign default values for those that are 00051 if self.object_id is None: 00052 self.object_id = '' 00053 if self.new_state is None: 00054 self.new_state = worldmodel_msgs.msg.ObjectState() 00055 else: 00056 self.object_id = '' 00057 self.new_state = worldmodel_msgs.msg.ObjectState() 00058 00059 def _get_types(self): 00060 """ 00061 internal API method 00062 """ 00063 return self._slot_types 00064 00065 def serialize(self, buff): 00066 """ 00067 serialize message into buffer 00068 @param buff: buffer 00069 @type buff: StringIO 00070 """ 00071 try: 00072 _x = self.object_id 00073 length = len(_x) 00074 buff.write(struct.pack('<I%ss'%length, length, _x)) 00075 buff.write(_struct_b.pack(self.new_state.state)) 00076 except struct.error as se: self._check_types(se) 00077 except TypeError as te: self._check_types(te) 00078 00079 def deserialize(self, str): 00080 """ 00081 unpack serialized message in str into this message instance 00082 @param str: byte array of serialized message 00083 @type str: str 00084 """ 00085 try: 00086 if self.new_state is None: 00087 self.new_state = worldmodel_msgs.msg.ObjectState() 00088 end = 0 00089 start = end 00090 end += 4 00091 (length,) = _struct_I.unpack(str[start:end]) 00092 start = end 00093 end += length 00094 self.object_id = str[start:end] 00095 start = end 00096 end += 1 00097 (self.new_state.state,) = _struct_b.unpack(str[start:end]) 00098 return self 00099 except struct.error as e: 00100 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00101 00102 00103 def serialize_numpy(self, buff, numpy): 00104 """ 00105 serialize message with numpy array types into buffer 00106 @param buff: buffer 00107 @type buff: StringIO 00108 @param numpy: numpy python module 00109 @type numpy module 00110 """ 00111 try: 00112 _x = self.object_id 00113 length = len(_x) 00114 buff.write(struct.pack('<I%ss'%length, length, _x)) 00115 buff.write(_struct_b.pack(self.new_state.state)) 00116 except struct.error as se: self._check_types(se) 00117 except TypeError as te: self._check_types(te) 00118 00119 def deserialize_numpy(self, str, numpy): 00120 """ 00121 unpack serialized message in str into this message instance using numpy for array types 00122 @param str: byte array of serialized message 00123 @type str: str 00124 @param numpy: numpy python module 00125 @type numpy: module 00126 """ 00127 try: 00128 if self.new_state is None: 00129 self.new_state = worldmodel_msgs.msg.ObjectState() 00130 end = 0 00131 start = end 00132 end += 4 00133 (length,) = _struct_I.unpack(str[start:end]) 00134 start = end 00135 end += length 00136 self.object_id = str[start:end] 00137 start = end 00138 end += 1 00139 (self.new_state.state,) = _struct_b.unpack(str[start:end]) 00140 return self 00141 except struct.error as e: 00142 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00143 00144 _struct_I = roslib.message.struct_I 00145 _struct_b = struct.Struct("<b") 00146 """autogenerated by genmsg_py from SetObjectStateResponse.msg. Do not edit.""" 00147 import roslib.message 00148 import struct 00149 00150 00151 class SetObjectStateResponse(roslib.message.Message): 00152 _md5sum = "d41d8cd98f00b204e9800998ecf8427e" 00153 _type = "worldmodel_msgs/SetObjectStateResponse" 00154 _has_header = False #flag to mark the presence of a Header object 00155 _full_text = """ 00156 00157 """ 00158 __slots__ = [] 00159 _slot_types = [] 00160 00161 def __init__(self, *args, **kwds): 00162 """ 00163 Constructor. Any message fields that are implicitly/explicitly 00164 set to None will be assigned a default value. The recommend 00165 use is keyword arguments as this is more robust to future message 00166 changes. You cannot mix in-order arguments and keyword arguments. 00167 00168 The available fields are: 00169 00170 00171 @param args: complete set of field values, in .msg order 00172 @param kwds: use keyword arguments corresponding to message field names 00173 to set specific fields. 00174 """ 00175 if args or kwds: 00176 super(SetObjectStateResponse, self).__init__(*args, **kwds) 00177 00178 def _get_types(self): 00179 """ 00180 internal API method 00181 """ 00182 return self._slot_types 00183 00184 def serialize(self, buff): 00185 """ 00186 serialize message into buffer 00187 @param buff: buffer 00188 @type buff: StringIO 00189 """ 00190 try: 00191 pass 00192 except struct.error as se: self._check_types(se) 00193 except TypeError as te: self._check_types(te) 00194 00195 def deserialize(self, str): 00196 """ 00197 unpack serialized message in str into this message instance 00198 @param str: byte array of serialized message 00199 @type str: str 00200 """ 00201 try: 00202 end = 0 00203 return self 00204 except struct.error as e: 00205 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00206 00207 00208 def serialize_numpy(self, buff, numpy): 00209 """ 00210 serialize message with numpy array types into buffer 00211 @param buff: buffer 00212 @type buff: StringIO 00213 @param numpy: numpy python module 00214 @type numpy module 00215 """ 00216 try: 00217 pass 00218 except struct.error as se: self._check_types(se) 00219 except TypeError as te: self._check_types(te) 00220 00221 def deserialize_numpy(self, str, numpy): 00222 """ 00223 unpack serialized message in str into this message instance using numpy for array types 00224 @param str: byte array of serialized message 00225 @type str: str 00226 @param numpy: numpy python module 00227 @type numpy: module 00228 """ 00229 try: 00230 end = 0 00231 return self 00232 except struct.error as e: 00233 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00234 00235 _struct_I = roslib.message.struct_I 00236 class SetObjectState(roslib.message.ServiceDefinition): 00237 _type = 'worldmodel_msgs/SetObjectState' 00238 _md5sum = '5312cbd067c80bb142724205a55735f6' 00239 _request_class = SetObjectStateRequest 00240 _response_class = SetObjectStateResponse