$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_msgs/GetLinkStateRequest" 00009 _has_header = False #flag to mark the presence of a Header object 00010 _full_text = """string link_name 00011 00012 string reference_frame 00013 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_msgs.msg 00143 00144 class GetLinkStateResponse(roslib.message.Message): 00145 _md5sum = "8ba55ad34f9c072e75c0de57b089753b" 00146 _type = "gazebo_msgs/GetLinkStateResponse" 00147 _has_header = False #flag to mark the presence of a Header object 00148 _full_text = """gazebo_msgs/LinkState link_state 00149 bool success 00150 string status_message 00151 00152 00153 ================================================================================ 00154 MSG: gazebo_msgs/LinkState 00155 # @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. 00156 string link_name # link name, link_names are in gazebo scoped name notation, [model_name::body_name] 00157 geometry_msgs/Pose pose # desired pose in reference frame 00158 geometry_msgs/Twist twist # desired twist in reference frame 00159 string reference_frame # set pose/twist relative to the frame of this link/body 00160 # leave empty or "world" or "map" defaults to world-frame 00161 00162 ================================================================================ 00163 MSG: geometry_msgs/Pose 00164 # A representation of pose in free space, composed of postion and orientation. 00165 Point position 00166 Quaternion orientation 00167 00168 ================================================================================ 00169 MSG: geometry_msgs/Point 00170 # This contains the position of a point in free space 00171 float64 x 00172 float64 y 00173 float64 z 00174 00175 ================================================================================ 00176 MSG: geometry_msgs/Quaternion 00177 # This represents an orientation in free space in quaternion form. 00178 00179 float64 x 00180 float64 y 00181 float64 z 00182 float64 w 00183 00184 ================================================================================ 00185 MSG: geometry_msgs/Twist 00186 # This expresses velocity in free space broken into it's linear and angular parts. 00187 Vector3 linear 00188 Vector3 angular 00189 00190 ================================================================================ 00191 MSG: geometry_msgs/Vector3 00192 # This represents a vector in free space. 00193 00194 float64 x 00195 float64 y 00196 float64 z 00197 """ 00198 __slots__ = ['link_state','success','status_message'] 00199 _slot_types = ['gazebo_msgs/LinkState','bool','string'] 00200 00201 def __init__(self, *args, **kwds): 00202 """ 00203 Constructor. Any message fields that are implicitly/explicitly 00204 set to None will be assigned a default value. The recommend 00205 use is keyword arguments as this is more robust to future message 00206 changes. You cannot mix in-order arguments and keyword arguments. 00207 00208 The available fields are: 00209 link_state,success,status_message 00210 00211 @param args: complete set of field values, in .msg order 00212 @param kwds: use keyword arguments corresponding to message field names 00213 to set specific fields. 00214 """ 00215 if args or kwds: 00216 super(GetLinkStateResponse, self).__init__(*args, **kwds) 00217 #message fields cannot be None, assign default values for those that are 00218 if self.link_state is None: 00219 self.link_state = gazebo_msgs.msg.LinkState() 00220 if self.success is None: 00221 self.success = False 00222 if self.status_message is None: 00223 self.status_message = '' 00224 else: 00225 self.link_state = gazebo_msgs.msg.LinkState() 00226 self.success = False 00227 self.status_message = '' 00228 00229 def _get_types(self): 00230 """ 00231 internal API method 00232 """ 00233 return self._slot_types 00234 00235 def serialize(self, buff): 00236 """ 00237 serialize message into buffer 00238 @param buff: buffer 00239 @type buff: StringIO 00240 """ 00241 try: 00242 _x = self.link_state.link_name 00243 length = len(_x) 00244 buff.write(struct.pack('<I%ss'%length, length, _x)) 00245 _x = self 00246 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)) 00247 _x = self.link_state.reference_frame 00248 length = len(_x) 00249 buff.write(struct.pack('<I%ss'%length, length, _x)) 00250 buff.write(_struct_B.pack(self.success)) 00251 _x = self.status_message 00252 length = len(_x) 00253 buff.write(struct.pack('<I%ss'%length, length, _x)) 00254 except struct.error as se: self._check_types(se) 00255 except TypeError as te: self._check_types(te) 00256 00257 def deserialize(self, str): 00258 """ 00259 unpack serialized message in str into this message instance 00260 @param str: byte array of serialized message 00261 @type str: str 00262 """ 00263 try: 00264 if self.link_state is None: 00265 self.link_state = gazebo_msgs.msg.LinkState() 00266 end = 0 00267 start = end 00268 end += 4 00269 (length,) = _struct_I.unpack(str[start:end]) 00270 start = end 00271 end += length 00272 self.link_state.link_name = str[start:end] 00273 _x = self 00274 start = end 00275 end += 104 00276 (_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]) 00277 start = end 00278 end += 4 00279 (length,) = _struct_I.unpack(str[start:end]) 00280 start = end 00281 end += length 00282 self.link_state.reference_frame = str[start:end] 00283 start = end 00284 end += 1 00285 (self.success,) = _struct_B.unpack(str[start:end]) 00286 self.success = bool(self.success) 00287 start = end 00288 end += 4 00289 (length,) = _struct_I.unpack(str[start:end]) 00290 start = end 00291 end += length 00292 self.status_message = str[start:end] 00293 return self 00294 except struct.error as e: 00295 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00296 00297 00298 def serialize_numpy(self, buff, numpy): 00299 """ 00300 serialize message with numpy array types into buffer 00301 @param buff: buffer 00302 @type buff: StringIO 00303 @param numpy: numpy python module 00304 @type numpy module 00305 """ 00306 try: 00307 _x = self.link_state.link_name 00308 length = len(_x) 00309 buff.write(struct.pack('<I%ss'%length, length, _x)) 00310 _x = self 00311 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)) 00312 _x = self.link_state.reference_frame 00313 length = len(_x) 00314 buff.write(struct.pack('<I%ss'%length, length, _x)) 00315 buff.write(_struct_B.pack(self.success)) 00316 _x = self.status_message 00317 length = len(_x) 00318 buff.write(struct.pack('<I%ss'%length, length, _x)) 00319 except struct.error as se: self._check_types(se) 00320 except TypeError as te: self._check_types(te) 00321 00322 def deserialize_numpy(self, str, numpy): 00323 """ 00324 unpack serialized message in str into this message instance using numpy for array types 00325 @param str: byte array of serialized message 00326 @type str: str 00327 @param numpy: numpy python module 00328 @type numpy: module 00329 """ 00330 try: 00331 if self.link_state is None: 00332 self.link_state = gazebo_msgs.msg.LinkState() 00333 end = 0 00334 start = end 00335 end += 4 00336 (length,) = _struct_I.unpack(str[start:end]) 00337 start = end 00338 end += length 00339 self.link_state.link_name = str[start:end] 00340 _x = self 00341 start = end 00342 end += 104 00343 (_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]) 00344 start = end 00345 end += 4 00346 (length,) = _struct_I.unpack(str[start:end]) 00347 start = end 00348 end += length 00349 self.link_state.reference_frame = str[start:end] 00350 start = end 00351 end += 1 00352 (self.success,) = _struct_B.unpack(str[start:end]) 00353 self.success = bool(self.success) 00354 start = end 00355 end += 4 00356 (length,) = _struct_I.unpack(str[start:end]) 00357 start = end 00358 end += length 00359 self.status_message = str[start:end] 00360 return self 00361 except struct.error as e: 00362 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00363 00364 _struct_I = roslib.message.struct_I 00365 _struct_B = struct.Struct("<B") 00366 _struct_13d = struct.Struct("<13d") 00367 class GetLinkState(roslib.message.ServiceDefinition): 00368 _type = 'gazebo_msgs/GetLinkState' 00369 _md5sum = '09d6c98cce97b35f7ab9bd70300657ab' 00370 _request_class = GetLinkStateRequest 00371 _response_class = GetLinkStateResponse