$search
00001 """autogenerated by genmsg_py from GetLinkStateRequest.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 00006 class GetLinkStateRequest(roslib.message.Message): 00007 _md5sum = "7551675c30aaa71f7c288d4864552001" 00008 _type = "gazebo/GetLinkStateRequest" 00009 _has_header = False #flag to mark the presence of a Header object 00010 _full_text = """ 00011 00012 string link_name 00013 string reference_frame 00014 00015 00016 """ 00017 __slots__ = ['link_name','reference_frame'] 00018 _slot_types = ['string','string'] 00019 00020 def __init__(self, *args, **kwds): 00021 """ 00022 Constructor. Any message fields that are implicitly/explicitly 00023 set to None will be assigned a default value. The recommend 00024 use is keyword arguments as this is more robust to future message 00025 changes. You cannot mix in-order arguments and keyword arguments. 00026 00027 The available fields are: 00028 link_name,reference_frame 00029 00030 @param args: complete set of field values, in .msg order 00031 @param kwds: use keyword arguments corresponding to message field names 00032 to set specific fields. 00033 """ 00034 if args or kwds: 00035 super(GetLinkStateRequest, self).__init__(*args, **kwds) 00036 #message fields cannot be None, assign default values for those that are 00037 if self.link_name is None: 00038 self.link_name = '' 00039 if self.reference_frame is None: 00040 self.reference_frame = '' 00041 else: 00042 self.link_name = '' 00043 self.reference_frame = '' 00044 00045 def _get_types(self): 00046 """ 00047 internal API method 00048 """ 00049 return self._slot_types 00050 00051 def serialize(self, buff): 00052 """ 00053 serialize message into buffer 00054 @param buff: buffer 00055 @type buff: StringIO 00056 """ 00057 try: 00058 _x = self.link_name 00059 length = len(_x) 00060 buff.write(struct.pack('<I%ss'%length, length, _x)) 00061 _x = self.reference_frame 00062 length = len(_x) 00063 buff.write(struct.pack('<I%ss'%length, length, _x)) 00064 except struct.error as se: self._check_types(se) 00065 except TypeError as te: self._check_types(te) 00066 00067 def deserialize(self, str): 00068 """ 00069 unpack serialized message in str into this message instance 00070 @param str: byte array of serialized message 00071 @type str: str 00072 """ 00073 try: 00074 end = 0 00075 start = end 00076 end += 4 00077 (length,) = _struct_I.unpack(str[start:end]) 00078 start = end 00079 end += length 00080 self.link_name = str[start:end] 00081 start = end 00082 end += 4 00083 (length,) = _struct_I.unpack(str[start:end]) 00084 start = end 00085 end += length 00086 self.reference_frame = str[start:end] 00087 return self 00088 except struct.error as e: 00089 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00090 00091 00092 def serialize_numpy(self, buff, numpy): 00093 """ 00094 serialize message with numpy array types into buffer 00095 @param buff: buffer 00096 @type buff: StringIO 00097 @param numpy: numpy python module 00098 @type numpy module 00099 """ 00100 try: 00101 _x = self.link_name 00102 length = len(_x) 00103 buff.write(struct.pack('<I%ss'%length, length, _x)) 00104 _x = self.reference_frame 00105 length = len(_x) 00106 buff.write(struct.pack('<I%ss'%length, length, _x)) 00107 except struct.error as se: self._check_types(se) 00108 except TypeError as te: self._check_types(te) 00109 00110 def deserialize_numpy(self, str, numpy): 00111 """ 00112 unpack serialized message in str into this message instance using numpy for array types 00113 @param str: byte array of serialized message 00114 @type str: str 00115 @param numpy: numpy python module 00116 @type numpy: module 00117 """ 00118 try: 00119 end = 0 00120 start = end 00121 end += 4 00122 (length,) = _struct_I.unpack(str[start:end]) 00123 start = end 00124 end += length 00125 self.link_name = str[start:end] 00126 start = end 00127 end += 4 00128 (length,) = _struct_I.unpack(str[start:end]) 00129 start = end 00130 end += length 00131 self.reference_frame = str[start:end] 00132 return self 00133 except struct.error as e: 00134 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00135 00136 _struct_I = roslib.message.struct_I 00137 """autogenerated by genmsg_py from GetLinkStateResponse.msg. Do not edit.""" 00138 import roslib.message 00139 import struct 00140 00141 import geometry_msgs.msg 00142 import gazebo.msg 00143 00144 class GetLinkStateResponse(roslib.message.Message): 00145 _md5sum = "8ba55ad34f9c072e75c0de57b089753b" 00146 _type = "gazebo/GetLinkStateResponse" 00147 _has_header = False #flag to mark the presence of a Header object 00148 _full_text = """gazebo/LinkState link_state 00149 bool success 00150 string status_message 00151 00152 00153 ================================================================================ 00154 MSG: gazebo/LinkState 00155 #This message is deprecated. Please use the version in gazebo_msgs instead. 00156 00157 # @todo: FIXME: sets pose and twist of a link. All children link poses/twists of the URDF tree are not updated accordingly, but should be. 00158 string link_name # link name 00159 geometry_msgs/Pose pose # desired pose in reference frame 00160 geometry_msgs/Twist twist # desired twist in reference frame 00161 string reference_frame # set pose/twist relative to the frame of this link/body 00162 # leave empty or "world" or "map" defaults to world-frame 00163 00164 ================================================================================ 00165 MSG: geometry_msgs/Pose 00166 # A representation of pose in free space, composed of postion and orientation. 00167 Point position 00168 Quaternion orientation 00169 00170 ================================================================================ 00171 MSG: geometry_msgs/Point 00172 # This contains the position of a point in free space 00173 float64 x 00174 float64 y 00175 float64 z 00176 00177 ================================================================================ 00178 MSG: geometry_msgs/Quaternion 00179 # This represents an orientation in free space in quaternion form. 00180 00181 float64 x 00182 float64 y 00183 float64 z 00184 float64 w 00185 00186 ================================================================================ 00187 MSG: geometry_msgs/Twist 00188 # This expresses velocity in free space broken into it's linear and angular parts. 00189 Vector3 linear 00190 Vector3 angular 00191 00192 ================================================================================ 00193 MSG: geometry_msgs/Vector3 00194 # This represents a vector in free space. 00195 00196 float64 x 00197 float64 y 00198 float64 z 00199 """ 00200 __slots__ = ['link_state','success','status_message'] 00201 _slot_types = ['gazebo/LinkState','bool','string'] 00202 00203 def __init__(self, *args, **kwds): 00204 """ 00205 Constructor. Any message fields that are implicitly/explicitly 00206 set to None will be assigned a default value. The recommend 00207 use is keyword arguments as this is more robust to future message 00208 changes. You cannot mix in-order arguments and keyword arguments. 00209 00210 The available fields are: 00211 link_state,success,status_message 00212 00213 @param args: complete set of field values, in .msg order 00214 @param kwds: use keyword arguments corresponding to message field names 00215 to set specific fields. 00216 """ 00217 if args or kwds: 00218 super(GetLinkStateResponse, self).__init__(*args, **kwds) 00219 #message fields cannot be None, assign default values for those that are 00220 if self.link_state is None: 00221 self.link_state = gazebo.msg.LinkState() 00222 if self.success is None: 00223 self.success = False 00224 if self.status_message is None: 00225 self.status_message = '' 00226 else: 00227 self.link_state = gazebo.msg.LinkState() 00228 self.success = False 00229 self.status_message = '' 00230 00231 def _get_types(self): 00232 """ 00233 internal API method 00234 """ 00235 return self._slot_types 00236 00237 def serialize(self, buff): 00238 """ 00239 serialize message into buffer 00240 @param buff: buffer 00241 @type buff: StringIO 00242 """ 00243 try: 00244 _x = self.link_state.link_name 00245 length = len(_x) 00246 buff.write(struct.pack('<I%ss'%length, length, _x)) 00247 _x = self 00248 buff.write(_struct_13d.pack(_x.link_state.pose.position.x, _x.link_state.pose.position.y, _x.link_state.pose.position.z, _x.link_state.pose.orientation.x, _x.link_state.pose.orientation.y, _x.link_state.pose.orientation.z, _x.link_state.pose.orientation.w, _x.link_state.twist.linear.x, _x.link_state.twist.linear.y, _x.link_state.twist.linear.z, _x.link_state.twist.angular.x, _x.link_state.twist.angular.y, _x.link_state.twist.angular.z)) 00249 _x = self.link_state.reference_frame 00250 length = len(_x) 00251 buff.write(struct.pack('<I%ss'%length, length, _x)) 00252 buff.write(_struct_B.pack(self.success)) 00253 _x = self.status_message 00254 length = len(_x) 00255 buff.write(struct.pack('<I%ss'%length, length, _x)) 00256 except struct.error as se: self._check_types(se) 00257 except TypeError as te: self._check_types(te) 00258 00259 def deserialize(self, str): 00260 """ 00261 unpack serialized message in str into this message instance 00262 @param str: byte array of serialized message 00263 @type str: str 00264 """ 00265 try: 00266 if self.link_state is None: 00267 self.link_state = gazebo.msg.LinkState() 00268 end = 0 00269 start = end 00270 end += 4 00271 (length,) = _struct_I.unpack(str[start:end]) 00272 start = end 00273 end += length 00274 self.link_state.link_name = str[start:end] 00275 _x = self 00276 start = end 00277 end += 104 00278 (_x.link_state.pose.position.x, _x.link_state.pose.position.y, _x.link_state.pose.position.z, _x.link_state.pose.orientation.x, _x.link_state.pose.orientation.y, _x.link_state.pose.orientation.z, _x.link_state.pose.orientation.w, _x.link_state.twist.linear.x, _x.link_state.twist.linear.y, _x.link_state.twist.linear.z, _x.link_state.twist.angular.x, _x.link_state.twist.angular.y, _x.link_state.twist.angular.z,) = _struct_13d.unpack(str[start:end]) 00279 start = end 00280 end += 4 00281 (length,) = _struct_I.unpack(str[start:end]) 00282 start = end 00283 end += length 00284 self.link_state.reference_frame = str[start:end] 00285 start = end 00286 end += 1 00287 (self.success,) = _struct_B.unpack(str[start:end]) 00288 self.success = bool(self.success) 00289 start = end 00290 end += 4 00291 (length,) = _struct_I.unpack(str[start:end]) 00292 start = end 00293 end += length 00294 self.status_message = str[start:end] 00295 return self 00296 except struct.error as e: 00297 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00298 00299 00300 def serialize_numpy(self, buff, numpy): 00301 """ 00302 serialize message with numpy array types into buffer 00303 @param buff: buffer 00304 @type buff: StringIO 00305 @param numpy: numpy python module 00306 @type numpy module 00307 """ 00308 try: 00309 _x = self.link_state.link_name 00310 length = len(_x) 00311 buff.write(struct.pack('<I%ss'%length, length, _x)) 00312 _x = self 00313 buff.write(_struct_13d.pack(_x.link_state.pose.position.x, _x.link_state.pose.position.y, _x.link_state.pose.position.z, _x.link_state.pose.orientation.x, _x.link_state.pose.orientation.y, _x.link_state.pose.orientation.z, _x.link_state.pose.orientation.w, _x.link_state.twist.linear.x, _x.link_state.twist.linear.y, _x.link_state.twist.linear.z, _x.link_state.twist.angular.x, _x.link_state.twist.angular.y, _x.link_state.twist.angular.z)) 00314 _x = self.link_state.reference_frame 00315 length = len(_x) 00316 buff.write(struct.pack('<I%ss'%length, length, _x)) 00317 buff.write(_struct_B.pack(self.success)) 00318 _x = self.status_message 00319 length = len(_x) 00320 buff.write(struct.pack('<I%ss'%length, length, _x)) 00321 except struct.error as se: self._check_types(se) 00322 except TypeError as te: self._check_types(te) 00323 00324 def deserialize_numpy(self, str, numpy): 00325 """ 00326 unpack serialized message in str into this message instance using numpy for array types 00327 @param str: byte array of serialized message 00328 @type str: str 00329 @param numpy: numpy python module 00330 @type numpy: module 00331 """ 00332 try: 00333 if self.link_state is None: 00334 self.link_state = gazebo.msg.LinkState() 00335 end = 0 00336 start = end 00337 end += 4 00338 (length,) = _struct_I.unpack(str[start:end]) 00339 start = end 00340 end += length 00341 self.link_state.link_name = str[start:end] 00342 _x = self 00343 start = end 00344 end += 104 00345 (_x.link_state.pose.position.x, _x.link_state.pose.position.y, _x.link_state.pose.position.z, _x.link_state.pose.orientation.x, _x.link_state.pose.orientation.y, _x.link_state.pose.orientation.z, _x.link_state.pose.orientation.w, _x.link_state.twist.linear.x, _x.link_state.twist.linear.y, _x.link_state.twist.linear.z, _x.link_state.twist.angular.x, _x.link_state.twist.angular.y, _x.link_state.twist.angular.z,) = _struct_13d.unpack(str[start:end]) 00346 start = end 00347 end += 4 00348 (length,) = _struct_I.unpack(str[start:end]) 00349 start = end 00350 end += length 00351 self.link_state.reference_frame = str[start:end] 00352 start = end 00353 end += 1 00354 (self.success,) = _struct_B.unpack(str[start:end]) 00355 self.success = bool(self.success) 00356 start = end 00357 end += 4 00358 (length,) = _struct_I.unpack(str[start:end]) 00359 start = end 00360 end += length 00361 self.status_message = str[start:end] 00362 return self 00363 except struct.error as e: 00364 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00365 00366 _struct_I = roslib.message.struct_I 00367 _struct_B = struct.Struct("<B") 00368 _struct_13d = struct.Struct("<13d") 00369 class GetLinkState(roslib.message.ServiceDefinition): 00370 _type = 'gazebo/GetLinkState' 00371 _md5sum = '09d6c98cce97b35f7ab9bd70300657ab' 00372 _request_class = GetLinkStateRequest 00373 _response_class = GetLinkStateResponse