$search
00001 """autogenerated by genmsg_py from RobotMeasurement.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import geometry_msgs.msg 00006 import calibration_msgs.msg 00007 import sensor_msgs.msg 00008 import roslib.rostime 00009 import std_msgs.msg 00010 00011 class RobotMeasurement(roslib.message.Message): 00012 _md5sum = "5faeacd55902385628948423d864d702" 00013 _type = "calibration_msgs/RobotMeasurement" 00014 _has_header = False #flag to mark the presence of a Header object 00015 _full_text = """string sample_id # Tag to figure out which yaml file this was generated from 00016 00017 string target_id # Defines the target that we were sensing. 00018 string chain_id # Defines where this target was attached 00019 00020 CameraMeasurement[] M_cam 00021 LaserMeasurement[] M_laser 00022 ChainMeasurement[] M_chain 00023 00024 ================================================================================ 00025 MSG: calibration_msgs/CameraMeasurement 00026 Header header 00027 string camera_id 00028 ImagePoint[] image_points 00029 sensor_msgs/CameraInfo cam_info 00030 00031 # True -> The extra debugging fields are populated 00032 bool verbose 00033 00034 # Extra, partially processed data. Only needed for debugging 00035 sensor_msgs/Image image 00036 sensor_msgs/Image image_rect 00037 calibration_msgs/CalibrationPattern features 00038 00039 ================================================================================ 00040 MSG: std_msgs/Header 00041 # Standard metadata for higher-level stamped data types. 00042 # This is generally used to communicate timestamped data 00043 # in a particular coordinate frame. 00044 # 00045 # sequence ID: consecutively increasing ID 00046 uint32 seq 00047 #Two-integer timestamp that is expressed as: 00048 # * stamp.secs: seconds (stamp_secs) since epoch 00049 # * stamp.nsecs: nanoseconds since stamp_secs 00050 # time-handling sugar is provided by the client library 00051 time stamp 00052 #Frame this data is associated with 00053 # 0: no frame 00054 # 1: global frame 00055 string frame_id 00056 00057 ================================================================================ 00058 MSG: calibration_msgs/ImagePoint 00059 float32 x 00060 float32 y 00061 00062 ================================================================================ 00063 MSG: sensor_msgs/CameraInfo 00064 # This message defines meta information for a camera. It should be in a 00065 # camera namespace on topic "camera_info" and accompanied by up to five 00066 # image topics named: 00067 # 00068 # image_raw - raw data from the camera driver, possibly Bayer encoded 00069 # image - monochrome, distorted 00070 # image_color - color, distorted 00071 # image_rect - monochrome, rectified 00072 # image_rect_color - color, rectified 00073 # 00074 # The image_pipeline contains packages (image_proc, stereo_image_proc) 00075 # for producing the four processed image topics from image_raw and 00076 # camera_info. The meaning of the camera parameters are described in 00077 # detail at http://www.ros.org/wiki/image_pipeline/CameraInfo. 00078 # 00079 # The image_geometry package provides a user-friendly interface to 00080 # common operations using this meta information. If you want to, e.g., 00081 # project a 3d point into image coordinates, we strongly recommend 00082 # using image_geometry. 00083 # 00084 # If the camera is uncalibrated, the matrices D, K, R, P should be left 00085 # zeroed out. In particular, clients may assume that K[0] == 0.0 00086 # indicates an uncalibrated camera. 00087 00088 ####################################################################### 00089 # Image acquisition info # 00090 ####################################################################### 00091 00092 # Time of image acquisition, camera coordinate frame ID 00093 Header header # Header timestamp should be acquisition time of image 00094 # Header frame_id should be optical frame of camera 00095 # origin of frame should be optical center of camera 00096 # +x should point to the right in the image 00097 # +y should point down in the image 00098 # +z should point into the plane of the image 00099 00100 00101 ####################################################################### 00102 # Calibration Parameters # 00103 ####################################################################### 00104 # These are fixed during camera calibration. Their values will be the # 00105 # same in all messages until the camera is recalibrated. Note that # 00106 # self-calibrating systems may "recalibrate" frequently. # 00107 # # 00108 # The internal parameters can be used to warp a raw (distorted) image # 00109 # to: # 00110 # 1. An undistorted image (requires D and K) # 00111 # 2. A rectified image (requires D, K, R) # 00112 # The projection matrix P projects 3D points into the rectified image.# 00113 ####################################################################### 00114 00115 # The image dimensions with which the camera was calibrated. Normally 00116 # this will be the full camera resolution in pixels. 00117 uint32 height 00118 uint32 width 00119 00120 # The distortion model used. Supported models are listed in 00121 # sensor_msgs/distortion_models.h. For most cameras, "plumb_bob" - a 00122 # simple model of radial and tangential distortion - is sufficent. 00123 string distortion_model 00124 00125 # The distortion parameters, size depending on the distortion model. 00126 # For "plumb_bob", the 5 parameters are: (k1, k2, t1, t2, k3). 00127 float64[] D 00128 00129 # Intrinsic camera matrix for the raw (distorted) images. 00130 # [fx 0 cx] 00131 # K = [ 0 fy cy] 00132 # [ 0 0 1] 00133 # Projects 3D points in the camera coordinate frame to 2D pixel 00134 # coordinates using the focal lengths (fx, fy) and principal point 00135 # (cx, cy). 00136 float64[9] K # 3x3 row-major matrix 00137 00138 # Rectification matrix (stereo cameras only) 00139 # A rotation matrix aligning the camera coordinate system to the ideal 00140 # stereo image plane so that epipolar lines in both stereo images are 00141 # parallel. 00142 float64[9] R # 3x3 row-major matrix 00143 00144 # Projection/camera matrix 00145 # [fx' 0 cx' Tx] 00146 # P = [ 0 fy' cy' Ty] 00147 # [ 0 0 1 0] 00148 # By convention, this matrix specifies the intrinsic (camera) matrix 00149 # of the processed (rectified) image. That is, the left 3x3 portion 00150 # is the normal camera intrinsic matrix for the rectified image. 00151 # It projects 3D points in the camera coordinate frame to 2D pixel 00152 # coordinates using the focal lengths (fx', fy') and principal point 00153 # (cx', cy') - these may differ from the values in K. 00154 # For monocular cameras, Tx = Ty = 0. Normally, monocular cameras will 00155 # also have R = the identity and P[1:3,1:3] = K. 00156 # For a stereo pair, the fourth column [Tx Ty 0]' is related to the 00157 # position of the optical center of the second camera in the first 00158 # camera's frame. We assume Tz = 0 so both cameras are in the same 00159 # stereo image plane. The first camera always has Tx = Ty = 0. For 00160 # the right (second) camera of a horizontal stereo pair, Ty = 0 and 00161 # Tx = -fx' * B, where B is the baseline between the cameras. 00162 # Given a 3D point [X Y Z]', the projection (x, y) of the point onto 00163 # the rectified image is given by: 00164 # [u v w]' = P * [X Y Z 1]' 00165 # x = u / w 00166 # y = v / w 00167 # This holds for both images of a stereo pair. 00168 float64[12] P # 3x4 row-major matrix 00169 00170 00171 ####################################################################### 00172 # Operational Parameters # 00173 ####################################################################### 00174 # These define the image region actually captured by the camera # 00175 # driver. Although they affect the geometry of the output image, they # 00176 # may be changed freely without recalibrating the camera. # 00177 ####################################################################### 00178 00179 # Binning refers here to any camera setting which combines rectangular 00180 # neighborhoods of pixels into larger "super-pixels." It reduces the 00181 # resolution of the output image to 00182 # (width / binning_x) x (height / binning_y). 00183 # The default values binning_x = binning_y = 0 is considered the same 00184 # as binning_x = binning_y = 1 (no subsampling). 00185 uint32 binning_x 00186 uint32 binning_y 00187 00188 # Region of interest (subwindow of full camera resolution), given in 00189 # full resolution (unbinned) image coordinates. A particular ROI 00190 # always denotes the same window of pixels on the camera sensor, 00191 # regardless of binning settings. 00192 # The default setting of roi (all values 0) is considered the same as 00193 # full resolution (roi.width = width, roi.height = height). 00194 RegionOfInterest roi 00195 00196 ================================================================================ 00197 MSG: sensor_msgs/RegionOfInterest 00198 # This message is used to specify a region of interest within an image. 00199 # 00200 # When used to specify the ROI setting of the camera when the image was 00201 # taken, the height and width fields should either match the height and 00202 # width fields for the associated image; or height = width = 0 00203 # indicates that the full resolution image was captured. 00204 00205 uint32 x_offset # Leftmost pixel of the ROI 00206 # (0 if the ROI includes the left edge of the image) 00207 uint32 y_offset # Topmost pixel of the ROI 00208 # (0 if the ROI includes the top edge of the image) 00209 uint32 height # Height of ROI 00210 uint32 width # Width of ROI 00211 00212 # True if a distinct rectified ROI should be calculated from the "raw" 00213 # ROI in this message. Typically this should be False if the full image 00214 # is captured (ROI not used), and True if a subwindow is captured (ROI 00215 # used). 00216 bool do_rectify 00217 00218 ================================================================================ 00219 MSG: sensor_msgs/Image 00220 # This message contains an uncompressed image 00221 # (0, 0) is at top-left corner of image 00222 # 00223 00224 Header header # Header timestamp should be acquisition time of image 00225 # Header frame_id should be optical frame of camera 00226 # origin of frame should be optical center of cameara 00227 # +x should point to the right in the image 00228 # +y should point down in the image 00229 # +z should point into to plane of the image 00230 # If the frame_id here and the frame_id of the CameraInfo 00231 # message associated with the image conflict 00232 # the behavior is undefined 00233 00234 uint32 height # image height, that is, number of rows 00235 uint32 width # image width, that is, number of columns 00236 00237 # The legal values for encoding are in file src/image_encodings.cpp 00238 # If you want to standardize a new string format, join 00239 # ros-users@lists.sourceforge.net and send an email proposing a new encoding. 00240 00241 string encoding # Encoding of pixels -- channel meaning, ordering, size 00242 # taken from the list of strings in src/image_encodings.cpp 00243 00244 uint8 is_bigendian # is this data bigendian? 00245 uint32 step # Full row length in bytes 00246 uint8[] data # actual matrix data, size is (step * rows) 00247 00248 ================================================================================ 00249 MSG: calibration_msgs/CalibrationPattern 00250 Header header 00251 geometry_msgs/Point32[] object_points 00252 ImagePoint[] image_points 00253 uint8 success 00254 00255 ================================================================================ 00256 MSG: geometry_msgs/Point32 00257 # This contains the position of a point in free space(with 32 bits of precision). 00258 # It is recommeded to use Point wherever possible instead of Point32. 00259 # 00260 # This recommendation is to promote interoperability. 00261 # 00262 # This message is designed to take up less space when sending 00263 # lots of points at once, as in the case of a PointCloud. 00264 00265 float32 x 00266 float32 y 00267 float32 z 00268 ================================================================================ 00269 MSG: calibration_msgs/LaserMeasurement 00270 Header header 00271 string laser_id 00272 sensor_msgs/JointState[] joint_points 00273 00274 # True -> The extra debugging fields are populated 00275 bool verbose 00276 00277 # Extra, partially processed data. Only needed for debugging 00278 calibration_msgs/DenseLaserSnapshot snapshot 00279 sensor_msgs/Image laser_image 00280 calibration_msgs/CalibrationPattern image_features 00281 calibration_msgs/JointStateCalibrationPattern joint_features 00282 00283 ================================================================================ 00284 MSG: sensor_msgs/JointState 00285 # This is a message that holds data to describe the state of a set of torque controlled joints. 00286 # 00287 # The state of each joint (revolute or prismatic) is defined by: 00288 # * the position of the joint (rad or m), 00289 # * the velocity of the joint (rad/s or m/s) and 00290 # * the effort that is applied in the joint (Nm or N). 00291 # 00292 # Each joint is uniquely identified by its name 00293 # The header specifies the time at which the joint states were recorded. All the joint states 00294 # in one message have to be recorded at the same time. 00295 # 00296 # This message consists of a multiple arrays, one for each part of the joint state. 00297 # The goal is to make each of the fields optional. When e.g. your joints have no 00298 # effort associated with them, you can leave the effort array empty. 00299 # 00300 # All arrays in this message should have the same size, or be empty. 00301 # This is the only way to uniquely associate the joint name with the correct 00302 # states. 00303 00304 00305 Header header 00306 00307 string[] name 00308 float64[] position 00309 float64[] velocity 00310 float64[] effort 00311 00312 ================================================================================ 00313 MSG: calibration_msgs/DenseLaserSnapshot 00314 # Provides all the state & sensor information for 00315 # a single sweep of laser attached to some mechanism. 00316 # Most likely, this will be used with PR2's tilting laser mechanism 00317 Header header 00318 00319 # Store the laser intrinsics. This is very similar to the 00320 # intrinsics commonly stored in 00321 float32 angle_min # start angle of the scan [rad] 00322 float32 angle_max # end angle of the scan [rad] 00323 float32 angle_increment # angular distance between measurements [rad] 00324 float32 time_increment # time between measurements [seconds] 00325 float32 range_min # minimum range value [m] 00326 float32 range_max # maximum range value [m] 00327 00328 # Define the size of the binary data 00329 uint32 readings_per_scan # (Width) 00330 uint32 num_scans # (Height) 00331 00332 # 2D Arrays storing laser data. 00333 # We can think of each type data as being a single channel image. 00334 # Each row of the image has data from a single scan, and scans are 00335 # concatenated to form the entire 'image'. 00336 float32[] ranges # (Image data) 00337 float32[] intensities # (Image data) 00338 00339 # Store the start time of each scan 00340 time[] scan_start 00341 00342 ================================================================================ 00343 MSG: calibration_msgs/JointStateCalibrationPattern 00344 Header header 00345 geometry_msgs/Point32[] object_points 00346 sensor_msgs/JointState[] joint_points 00347 00348 00349 ================================================================================ 00350 MSG: calibration_msgs/ChainMeasurement 00351 Header header 00352 string chain_id 00353 sensor_msgs/JointState chain_state 00354 00355 """ 00356 __slots__ = ['sample_id','target_id','chain_id','M_cam','M_laser','M_chain'] 00357 _slot_types = ['string','string','string','calibration_msgs/CameraMeasurement[]','calibration_msgs/LaserMeasurement[]','calibration_msgs/ChainMeasurement[]'] 00358 00359 def __init__(self, *args, **kwds): 00360 """ 00361 Constructor. Any message fields that are implicitly/explicitly 00362 set to None will be assigned a default value. The recommend 00363 use is keyword arguments as this is more robust to future message 00364 changes. You cannot mix in-order arguments and keyword arguments. 00365 00366 The available fields are: 00367 sample_id,target_id,chain_id,M_cam,M_laser,M_chain 00368 00369 @param args: complete set of field values, in .msg order 00370 @param kwds: use keyword arguments corresponding to message field names 00371 to set specific fields. 00372 """ 00373 if args or kwds: 00374 super(RobotMeasurement, self).__init__(*args, **kwds) 00375 #message fields cannot be None, assign default values for those that are 00376 if self.sample_id is None: 00377 self.sample_id = '' 00378 if self.target_id is None: 00379 self.target_id = '' 00380 if self.chain_id is None: 00381 self.chain_id = '' 00382 if self.M_cam is None: 00383 self.M_cam = [] 00384 if self.M_laser is None: 00385 self.M_laser = [] 00386 if self.M_chain is None: 00387 self.M_chain = [] 00388 else: 00389 self.sample_id = '' 00390 self.target_id = '' 00391 self.chain_id = '' 00392 self.M_cam = [] 00393 self.M_laser = [] 00394 self.M_chain = [] 00395 00396 def _get_types(self): 00397 """ 00398 internal API method 00399 """ 00400 return self._slot_types 00401 00402 def serialize(self, buff): 00403 """ 00404 serialize message into buffer 00405 @param buff: buffer 00406 @type buff: StringIO 00407 """ 00408 try: 00409 _x = self.sample_id 00410 length = len(_x) 00411 buff.write(struct.pack('<I%ss'%length, length, _x)) 00412 _x = self.target_id 00413 length = len(_x) 00414 buff.write(struct.pack('<I%ss'%length, length, _x)) 00415 _x = self.chain_id 00416 length = len(_x) 00417 buff.write(struct.pack('<I%ss'%length, length, _x)) 00418 length = len(self.M_cam) 00419 buff.write(_struct_I.pack(length)) 00420 for val1 in self.M_cam: 00421 _v1 = val1.header 00422 buff.write(_struct_I.pack(_v1.seq)) 00423 _v2 = _v1.stamp 00424 _x = _v2 00425 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00426 _x = _v1.frame_id 00427 length = len(_x) 00428 buff.write(struct.pack('<I%ss'%length, length, _x)) 00429 _x = val1.camera_id 00430 length = len(_x) 00431 buff.write(struct.pack('<I%ss'%length, length, _x)) 00432 length = len(val1.image_points) 00433 buff.write(_struct_I.pack(length)) 00434 for val2 in val1.image_points: 00435 _x = val2 00436 buff.write(_struct_2f.pack(_x.x, _x.y)) 00437 _v3 = val1.cam_info 00438 _v4 = _v3.header 00439 buff.write(_struct_I.pack(_v4.seq)) 00440 _v5 = _v4.stamp 00441 _x = _v5 00442 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00443 _x = _v4.frame_id 00444 length = len(_x) 00445 buff.write(struct.pack('<I%ss'%length, length, _x)) 00446 _x = _v3 00447 buff.write(_struct_2I.pack(_x.height, _x.width)) 00448 _x = _v3.distortion_model 00449 length = len(_x) 00450 buff.write(struct.pack('<I%ss'%length, length, _x)) 00451 length = len(_v3.D) 00452 buff.write(_struct_I.pack(length)) 00453 pattern = '<%sd'%length 00454 buff.write(struct.pack(pattern, *_v3.D)) 00455 buff.write(_struct_9d.pack(*_v3.K)) 00456 buff.write(_struct_9d.pack(*_v3.R)) 00457 buff.write(_struct_12d.pack(*_v3.P)) 00458 _x = _v3 00459 buff.write(_struct_2I.pack(_x.binning_x, _x.binning_y)) 00460 _v6 = _v3.roi 00461 _x = _v6 00462 buff.write(_struct_4IB.pack(_x.x_offset, _x.y_offset, _x.height, _x.width, _x.do_rectify)) 00463 buff.write(_struct_B.pack(val1.verbose)) 00464 _v7 = val1.image 00465 _v8 = _v7.header 00466 buff.write(_struct_I.pack(_v8.seq)) 00467 _v9 = _v8.stamp 00468 _x = _v9 00469 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00470 _x = _v8.frame_id 00471 length = len(_x) 00472 buff.write(struct.pack('<I%ss'%length, length, _x)) 00473 _x = _v7 00474 buff.write(_struct_2I.pack(_x.height, _x.width)) 00475 _x = _v7.encoding 00476 length = len(_x) 00477 buff.write(struct.pack('<I%ss'%length, length, _x)) 00478 _x = _v7 00479 buff.write(_struct_BI.pack(_x.is_bigendian, _x.step)) 00480 _x = _v7.data 00481 length = len(_x) 00482 # - if encoded as a list instead, serialize as bytes instead of string 00483 if type(_x) in [list, tuple]: 00484 buff.write(struct.pack('<I%sB'%length, length, *_x)) 00485 else: 00486 buff.write(struct.pack('<I%ss'%length, length, _x)) 00487 _v10 = val1.image_rect 00488 _v11 = _v10.header 00489 buff.write(_struct_I.pack(_v11.seq)) 00490 _v12 = _v11.stamp 00491 _x = _v12 00492 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00493 _x = _v11.frame_id 00494 length = len(_x) 00495 buff.write(struct.pack('<I%ss'%length, length, _x)) 00496 _x = _v10 00497 buff.write(_struct_2I.pack(_x.height, _x.width)) 00498 _x = _v10.encoding 00499 length = len(_x) 00500 buff.write(struct.pack('<I%ss'%length, length, _x)) 00501 _x = _v10 00502 buff.write(_struct_BI.pack(_x.is_bigendian, _x.step)) 00503 _x = _v10.data 00504 length = len(_x) 00505 # - if encoded as a list instead, serialize as bytes instead of string 00506 if type(_x) in [list, tuple]: 00507 buff.write(struct.pack('<I%sB'%length, length, *_x)) 00508 else: 00509 buff.write(struct.pack('<I%ss'%length, length, _x)) 00510 _v13 = val1.features 00511 _v14 = _v13.header 00512 buff.write(_struct_I.pack(_v14.seq)) 00513 _v15 = _v14.stamp 00514 _x = _v15 00515 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00516 _x = _v14.frame_id 00517 length = len(_x) 00518 buff.write(struct.pack('<I%ss'%length, length, _x)) 00519 length = len(_v13.object_points) 00520 buff.write(_struct_I.pack(length)) 00521 for val3 in _v13.object_points: 00522 _x = val3 00523 buff.write(_struct_3f.pack(_x.x, _x.y, _x.z)) 00524 length = len(_v13.image_points) 00525 buff.write(_struct_I.pack(length)) 00526 for val3 in _v13.image_points: 00527 _x = val3 00528 buff.write(_struct_2f.pack(_x.x, _x.y)) 00529 buff.write(_struct_B.pack(_v13.success)) 00530 length = len(self.M_laser) 00531 buff.write(_struct_I.pack(length)) 00532 for val1 in self.M_laser: 00533 _v16 = val1.header 00534 buff.write(_struct_I.pack(_v16.seq)) 00535 _v17 = _v16.stamp 00536 _x = _v17 00537 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00538 _x = _v16.frame_id 00539 length = len(_x) 00540 buff.write(struct.pack('<I%ss'%length, length, _x)) 00541 _x = val1.laser_id 00542 length = len(_x) 00543 buff.write(struct.pack('<I%ss'%length, length, _x)) 00544 length = len(val1.joint_points) 00545 buff.write(_struct_I.pack(length)) 00546 for val2 in val1.joint_points: 00547 _v18 = val2.header 00548 buff.write(_struct_I.pack(_v18.seq)) 00549 _v19 = _v18.stamp 00550 _x = _v19 00551 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00552 _x = _v18.frame_id 00553 length = len(_x) 00554 buff.write(struct.pack('<I%ss'%length, length, _x)) 00555 length = len(val2.name) 00556 buff.write(_struct_I.pack(length)) 00557 for val3 in val2.name: 00558 length = len(val3) 00559 buff.write(struct.pack('<I%ss'%length, length, val3)) 00560 length = len(val2.position) 00561 buff.write(_struct_I.pack(length)) 00562 pattern = '<%sd'%length 00563 buff.write(struct.pack(pattern, *val2.position)) 00564 length = len(val2.velocity) 00565 buff.write(_struct_I.pack(length)) 00566 pattern = '<%sd'%length 00567 buff.write(struct.pack(pattern, *val2.velocity)) 00568 length = len(val2.effort) 00569 buff.write(_struct_I.pack(length)) 00570 pattern = '<%sd'%length 00571 buff.write(struct.pack(pattern, *val2.effort)) 00572 buff.write(_struct_B.pack(val1.verbose)) 00573 _v20 = val1.snapshot 00574 _v21 = _v20.header 00575 buff.write(_struct_I.pack(_v21.seq)) 00576 _v22 = _v21.stamp 00577 _x = _v22 00578 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00579 _x = _v21.frame_id 00580 length = len(_x) 00581 buff.write(struct.pack('<I%ss'%length, length, _x)) 00582 _x = _v20 00583 buff.write(_struct_6f2I.pack(_x.angle_min, _x.angle_max, _x.angle_increment, _x.time_increment, _x.range_min, _x.range_max, _x.readings_per_scan, _x.num_scans)) 00584 length = len(_v20.ranges) 00585 buff.write(_struct_I.pack(length)) 00586 pattern = '<%sf'%length 00587 buff.write(struct.pack(pattern, *_v20.ranges)) 00588 length = len(_v20.intensities) 00589 buff.write(_struct_I.pack(length)) 00590 pattern = '<%sf'%length 00591 buff.write(struct.pack(pattern, *_v20.intensities)) 00592 length = len(_v20.scan_start) 00593 buff.write(_struct_I.pack(length)) 00594 for val3 in _v20.scan_start: 00595 _x = val3 00596 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00597 _v23 = val1.laser_image 00598 _v24 = _v23.header 00599 buff.write(_struct_I.pack(_v24.seq)) 00600 _v25 = _v24.stamp 00601 _x = _v25 00602 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00603 _x = _v24.frame_id 00604 length = len(_x) 00605 buff.write(struct.pack('<I%ss'%length, length, _x)) 00606 _x = _v23 00607 buff.write(_struct_2I.pack(_x.height, _x.width)) 00608 _x = _v23.encoding 00609 length = len(_x) 00610 buff.write(struct.pack('<I%ss'%length, length, _x)) 00611 _x = _v23 00612 buff.write(_struct_BI.pack(_x.is_bigendian, _x.step)) 00613 _x = _v23.data 00614 length = len(_x) 00615 # - if encoded as a list instead, serialize as bytes instead of string 00616 if type(_x) in [list, tuple]: 00617 buff.write(struct.pack('<I%sB'%length, length, *_x)) 00618 else: 00619 buff.write(struct.pack('<I%ss'%length, length, _x)) 00620 _v26 = val1.image_features 00621 _v27 = _v26.header 00622 buff.write(_struct_I.pack(_v27.seq)) 00623 _v28 = _v27.stamp 00624 _x = _v28 00625 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00626 _x = _v27.frame_id 00627 length = len(_x) 00628 buff.write(struct.pack('<I%ss'%length, length, _x)) 00629 length = len(_v26.object_points) 00630 buff.write(_struct_I.pack(length)) 00631 for val3 in _v26.object_points: 00632 _x = val3 00633 buff.write(_struct_3f.pack(_x.x, _x.y, _x.z)) 00634 length = len(_v26.image_points) 00635 buff.write(_struct_I.pack(length)) 00636 for val3 in _v26.image_points: 00637 _x = val3 00638 buff.write(_struct_2f.pack(_x.x, _x.y)) 00639 buff.write(_struct_B.pack(_v26.success)) 00640 _v29 = val1.joint_features 00641 _v30 = _v29.header 00642 buff.write(_struct_I.pack(_v30.seq)) 00643 _v31 = _v30.stamp 00644 _x = _v31 00645 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00646 _x = _v30.frame_id 00647 length = len(_x) 00648 buff.write(struct.pack('<I%ss'%length, length, _x)) 00649 length = len(_v29.object_points) 00650 buff.write(_struct_I.pack(length)) 00651 for val3 in _v29.object_points: 00652 _x = val3 00653 buff.write(_struct_3f.pack(_x.x, _x.y, _x.z)) 00654 length = len(_v29.joint_points) 00655 buff.write(_struct_I.pack(length)) 00656 for val3 in _v29.joint_points: 00657 _v32 = val3.header 00658 buff.write(_struct_I.pack(_v32.seq)) 00659 _v33 = _v32.stamp 00660 _x = _v33 00661 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00662 _x = _v32.frame_id 00663 length = len(_x) 00664 buff.write(struct.pack('<I%ss'%length, length, _x)) 00665 length = len(val3.name) 00666 buff.write(_struct_I.pack(length)) 00667 for val4 in val3.name: 00668 length = len(val4) 00669 buff.write(struct.pack('<I%ss'%length, length, val4)) 00670 length = len(val3.position) 00671 buff.write(_struct_I.pack(length)) 00672 pattern = '<%sd'%length 00673 buff.write(struct.pack(pattern, *val3.position)) 00674 length = len(val3.velocity) 00675 buff.write(_struct_I.pack(length)) 00676 pattern = '<%sd'%length 00677 buff.write(struct.pack(pattern, *val3.velocity)) 00678 length = len(val3.effort) 00679 buff.write(_struct_I.pack(length)) 00680 pattern = '<%sd'%length 00681 buff.write(struct.pack(pattern, *val3.effort)) 00682 length = len(self.M_chain) 00683 buff.write(_struct_I.pack(length)) 00684 for val1 in self.M_chain: 00685 _v34 = val1.header 00686 buff.write(_struct_I.pack(_v34.seq)) 00687 _v35 = _v34.stamp 00688 _x = _v35 00689 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00690 _x = _v34.frame_id 00691 length = len(_x) 00692 buff.write(struct.pack('<I%ss'%length, length, _x)) 00693 _x = val1.chain_id 00694 length = len(_x) 00695 buff.write(struct.pack('<I%ss'%length, length, _x)) 00696 _v36 = val1.chain_state 00697 _v37 = _v36.header 00698 buff.write(_struct_I.pack(_v37.seq)) 00699 _v38 = _v37.stamp 00700 _x = _v38 00701 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00702 _x = _v37.frame_id 00703 length = len(_x) 00704 buff.write(struct.pack('<I%ss'%length, length, _x)) 00705 length = len(_v36.name) 00706 buff.write(_struct_I.pack(length)) 00707 for val3 in _v36.name: 00708 length = len(val3) 00709 buff.write(struct.pack('<I%ss'%length, length, val3)) 00710 length = len(_v36.position) 00711 buff.write(_struct_I.pack(length)) 00712 pattern = '<%sd'%length 00713 buff.write(struct.pack(pattern, *_v36.position)) 00714 length = len(_v36.velocity) 00715 buff.write(_struct_I.pack(length)) 00716 pattern = '<%sd'%length 00717 buff.write(struct.pack(pattern, *_v36.velocity)) 00718 length = len(_v36.effort) 00719 buff.write(_struct_I.pack(length)) 00720 pattern = '<%sd'%length 00721 buff.write(struct.pack(pattern, *_v36.effort)) 00722 except struct.error as se: self._check_types(se) 00723 except TypeError as te: self._check_types(te) 00724 00725 def deserialize(self, str): 00726 """ 00727 unpack serialized message in str into this message instance 00728 @param str: byte array of serialized message 00729 @type str: str 00730 """ 00731 try: 00732 end = 0 00733 start = end 00734 end += 4 00735 (length,) = _struct_I.unpack(str[start:end]) 00736 start = end 00737 end += length 00738 self.sample_id = str[start:end] 00739 start = end 00740 end += 4 00741 (length,) = _struct_I.unpack(str[start:end]) 00742 start = end 00743 end += length 00744 self.target_id = str[start:end] 00745 start = end 00746 end += 4 00747 (length,) = _struct_I.unpack(str[start:end]) 00748 start = end 00749 end += length 00750 self.chain_id = str[start:end] 00751 start = end 00752 end += 4 00753 (length,) = _struct_I.unpack(str[start:end]) 00754 self.M_cam = [] 00755 for i in range(0, length): 00756 val1 = calibration_msgs.msg.CameraMeasurement() 00757 _v39 = val1.header 00758 start = end 00759 end += 4 00760 (_v39.seq,) = _struct_I.unpack(str[start:end]) 00761 _v40 = _v39.stamp 00762 _x = _v40 00763 start = end 00764 end += 8 00765 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 00766 start = end 00767 end += 4 00768 (length,) = _struct_I.unpack(str[start:end]) 00769 start = end 00770 end += length 00771 _v39.frame_id = str[start:end] 00772 start = end 00773 end += 4 00774 (length,) = _struct_I.unpack(str[start:end]) 00775 start = end 00776 end += length 00777 val1.camera_id = str[start:end] 00778 start = end 00779 end += 4 00780 (length,) = _struct_I.unpack(str[start:end]) 00781 val1.image_points = [] 00782 for i in range(0, length): 00783 val2 = calibration_msgs.msg.ImagePoint() 00784 _x = val2 00785 start = end 00786 end += 8 00787 (_x.x, _x.y,) = _struct_2f.unpack(str[start:end]) 00788 val1.image_points.append(val2) 00789 _v41 = val1.cam_info 00790 _v42 = _v41.header 00791 start = end 00792 end += 4 00793 (_v42.seq,) = _struct_I.unpack(str[start:end]) 00794 _v43 = _v42.stamp 00795 _x = _v43 00796 start = end 00797 end += 8 00798 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 00799 start = end 00800 end += 4 00801 (length,) = _struct_I.unpack(str[start:end]) 00802 start = end 00803 end += length 00804 _v42.frame_id = str[start:end] 00805 _x = _v41 00806 start = end 00807 end += 8 00808 (_x.height, _x.width,) = _struct_2I.unpack(str[start:end]) 00809 start = end 00810 end += 4 00811 (length,) = _struct_I.unpack(str[start:end]) 00812 start = end 00813 end += length 00814 _v41.distortion_model = str[start:end] 00815 start = end 00816 end += 4 00817 (length,) = _struct_I.unpack(str[start:end]) 00818 pattern = '<%sd'%length 00819 start = end 00820 end += struct.calcsize(pattern) 00821 _v41.D = struct.unpack(pattern, str[start:end]) 00822 start = end 00823 end += 72 00824 _v41.K = _struct_9d.unpack(str[start:end]) 00825 start = end 00826 end += 72 00827 _v41.R = _struct_9d.unpack(str[start:end]) 00828 start = end 00829 end += 96 00830 _v41.P = _struct_12d.unpack(str[start:end]) 00831 _x = _v41 00832 start = end 00833 end += 8 00834 (_x.binning_x, _x.binning_y,) = _struct_2I.unpack(str[start:end]) 00835 _v44 = _v41.roi 00836 _x = _v44 00837 start = end 00838 end += 17 00839 (_x.x_offset, _x.y_offset, _x.height, _x.width, _x.do_rectify,) = _struct_4IB.unpack(str[start:end]) 00840 _v44.do_rectify = bool(_v44.do_rectify) 00841 start = end 00842 end += 1 00843 (val1.verbose,) = _struct_B.unpack(str[start:end]) 00844 val1.verbose = bool(val1.verbose) 00845 _v45 = val1.image 00846 _v46 = _v45.header 00847 start = end 00848 end += 4 00849 (_v46.seq,) = _struct_I.unpack(str[start:end]) 00850 _v47 = _v46.stamp 00851 _x = _v47 00852 start = end 00853 end += 8 00854 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 00855 start = end 00856 end += 4 00857 (length,) = _struct_I.unpack(str[start:end]) 00858 start = end 00859 end += length 00860 _v46.frame_id = str[start:end] 00861 _x = _v45 00862 start = end 00863 end += 8 00864 (_x.height, _x.width,) = _struct_2I.unpack(str[start:end]) 00865 start = end 00866 end += 4 00867 (length,) = _struct_I.unpack(str[start:end]) 00868 start = end 00869 end += length 00870 _v45.encoding = str[start:end] 00871 _x = _v45 00872 start = end 00873 end += 5 00874 (_x.is_bigendian, _x.step,) = _struct_BI.unpack(str[start:end]) 00875 start = end 00876 end += 4 00877 (length,) = _struct_I.unpack(str[start:end]) 00878 start = end 00879 end += length 00880 _v45.data = str[start:end] 00881 _v48 = val1.image_rect 00882 _v49 = _v48.header 00883 start = end 00884 end += 4 00885 (_v49.seq,) = _struct_I.unpack(str[start:end]) 00886 _v50 = _v49.stamp 00887 _x = _v50 00888 start = end 00889 end += 8 00890 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 00891 start = end 00892 end += 4 00893 (length,) = _struct_I.unpack(str[start:end]) 00894 start = end 00895 end += length 00896 _v49.frame_id = str[start:end] 00897 _x = _v48 00898 start = end 00899 end += 8 00900 (_x.height, _x.width,) = _struct_2I.unpack(str[start:end]) 00901 start = end 00902 end += 4 00903 (length,) = _struct_I.unpack(str[start:end]) 00904 start = end 00905 end += length 00906 _v48.encoding = str[start:end] 00907 _x = _v48 00908 start = end 00909 end += 5 00910 (_x.is_bigendian, _x.step,) = _struct_BI.unpack(str[start:end]) 00911 start = end 00912 end += 4 00913 (length,) = _struct_I.unpack(str[start:end]) 00914 start = end 00915 end += length 00916 _v48.data = str[start:end] 00917 _v51 = val1.features 00918 _v52 = _v51.header 00919 start = end 00920 end += 4 00921 (_v52.seq,) = _struct_I.unpack(str[start:end]) 00922 _v53 = _v52.stamp 00923 _x = _v53 00924 start = end 00925 end += 8 00926 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 00927 start = end 00928 end += 4 00929 (length,) = _struct_I.unpack(str[start:end]) 00930 start = end 00931 end += length 00932 _v52.frame_id = str[start:end] 00933 start = end 00934 end += 4 00935 (length,) = _struct_I.unpack(str[start:end]) 00936 _v51.object_points = [] 00937 for i in range(0, length): 00938 val3 = geometry_msgs.msg.Point32() 00939 _x = val3 00940 start = end 00941 end += 12 00942 (_x.x, _x.y, _x.z,) = _struct_3f.unpack(str[start:end]) 00943 _v51.object_points.append(val3) 00944 start = end 00945 end += 4 00946 (length,) = _struct_I.unpack(str[start:end]) 00947 _v51.image_points = [] 00948 for i in range(0, length): 00949 val3 = calibration_msgs.msg.ImagePoint() 00950 _x = val3 00951 start = end 00952 end += 8 00953 (_x.x, _x.y,) = _struct_2f.unpack(str[start:end]) 00954 _v51.image_points.append(val3) 00955 start = end 00956 end += 1 00957 (_v51.success,) = _struct_B.unpack(str[start:end]) 00958 self.M_cam.append(val1) 00959 start = end 00960 end += 4 00961 (length,) = _struct_I.unpack(str[start:end]) 00962 self.M_laser = [] 00963 for i in range(0, length): 00964 val1 = calibration_msgs.msg.LaserMeasurement() 00965 _v54 = val1.header 00966 start = end 00967 end += 4 00968 (_v54.seq,) = _struct_I.unpack(str[start:end]) 00969 _v55 = _v54.stamp 00970 _x = _v55 00971 start = end 00972 end += 8 00973 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 00974 start = end 00975 end += 4 00976 (length,) = _struct_I.unpack(str[start:end]) 00977 start = end 00978 end += length 00979 _v54.frame_id = str[start:end] 00980 start = end 00981 end += 4 00982 (length,) = _struct_I.unpack(str[start:end]) 00983 start = end 00984 end += length 00985 val1.laser_id = str[start:end] 00986 start = end 00987 end += 4 00988 (length,) = _struct_I.unpack(str[start:end]) 00989 val1.joint_points = [] 00990 for i in range(0, length): 00991 val2 = sensor_msgs.msg.JointState() 00992 _v56 = val2.header 00993 start = end 00994 end += 4 00995 (_v56.seq,) = _struct_I.unpack(str[start:end]) 00996 _v57 = _v56.stamp 00997 _x = _v57 00998 start = end 00999 end += 8 01000 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 01001 start = end 01002 end += 4 01003 (length,) = _struct_I.unpack(str[start:end]) 01004 start = end 01005 end += length 01006 _v56.frame_id = str[start:end] 01007 start = end 01008 end += 4 01009 (length,) = _struct_I.unpack(str[start:end]) 01010 val2.name = [] 01011 for i in range(0, length): 01012 start = end 01013 end += 4 01014 (length,) = _struct_I.unpack(str[start:end]) 01015 start = end 01016 end += length 01017 val3 = str[start:end] 01018 val2.name.append(val3) 01019 start = end 01020 end += 4 01021 (length,) = _struct_I.unpack(str[start:end]) 01022 pattern = '<%sd'%length 01023 start = end 01024 end += struct.calcsize(pattern) 01025 val2.position = struct.unpack(pattern, str[start:end]) 01026 start = end 01027 end += 4 01028 (length,) = _struct_I.unpack(str[start:end]) 01029 pattern = '<%sd'%length 01030 start = end 01031 end += struct.calcsize(pattern) 01032 val2.velocity = struct.unpack(pattern, str[start:end]) 01033 start = end 01034 end += 4 01035 (length,) = _struct_I.unpack(str[start:end]) 01036 pattern = '<%sd'%length 01037 start = end 01038 end += struct.calcsize(pattern) 01039 val2.effort = struct.unpack(pattern, str[start:end]) 01040 val1.joint_points.append(val2) 01041 start = end 01042 end += 1 01043 (val1.verbose,) = _struct_B.unpack(str[start:end]) 01044 val1.verbose = bool(val1.verbose) 01045 _v58 = val1.snapshot 01046 _v59 = _v58.header 01047 start = end 01048 end += 4 01049 (_v59.seq,) = _struct_I.unpack(str[start:end]) 01050 _v60 = _v59.stamp 01051 _x = _v60 01052 start = end 01053 end += 8 01054 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 01055 start = end 01056 end += 4 01057 (length,) = _struct_I.unpack(str[start:end]) 01058 start = end 01059 end += length 01060 _v59.frame_id = str[start:end] 01061 _x = _v58 01062 start = end 01063 end += 32 01064 (_x.angle_min, _x.angle_max, _x.angle_increment, _x.time_increment, _x.range_min, _x.range_max, _x.readings_per_scan, _x.num_scans,) = _struct_6f2I.unpack(str[start:end]) 01065 start = end 01066 end += 4 01067 (length,) = _struct_I.unpack(str[start:end]) 01068 pattern = '<%sf'%length 01069 start = end 01070 end += struct.calcsize(pattern) 01071 _v58.ranges = struct.unpack(pattern, str[start:end]) 01072 start = end 01073 end += 4 01074 (length,) = _struct_I.unpack(str[start:end]) 01075 pattern = '<%sf'%length 01076 start = end 01077 end += struct.calcsize(pattern) 01078 _v58.intensities = struct.unpack(pattern, str[start:end]) 01079 start = end 01080 end += 4 01081 (length,) = _struct_I.unpack(str[start:end]) 01082 _v58.scan_start = [] 01083 for i in range(0, length): 01084 val3 = roslib.rostime.Time() 01085 _x = val3 01086 start = end 01087 end += 8 01088 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 01089 _v58.scan_start.append(val3) 01090 _v61 = val1.laser_image 01091 _v62 = _v61.header 01092 start = end 01093 end += 4 01094 (_v62.seq,) = _struct_I.unpack(str[start:end]) 01095 _v63 = _v62.stamp 01096 _x = _v63 01097 start = end 01098 end += 8 01099 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 01100 start = end 01101 end += 4 01102 (length,) = _struct_I.unpack(str[start:end]) 01103 start = end 01104 end += length 01105 _v62.frame_id = str[start:end] 01106 _x = _v61 01107 start = end 01108 end += 8 01109 (_x.height, _x.width,) = _struct_2I.unpack(str[start:end]) 01110 start = end 01111 end += 4 01112 (length,) = _struct_I.unpack(str[start:end]) 01113 start = end 01114 end += length 01115 _v61.encoding = str[start:end] 01116 _x = _v61 01117 start = end 01118 end += 5 01119 (_x.is_bigendian, _x.step,) = _struct_BI.unpack(str[start:end]) 01120 start = end 01121 end += 4 01122 (length,) = _struct_I.unpack(str[start:end]) 01123 start = end 01124 end += length 01125 _v61.data = str[start:end] 01126 _v64 = val1.image_features 01127 _v65 = _v64.header 01128 start = end 01129 end += 4 01130 (_v65.seq,) = _struct_I.unpack(str[start:end]) 01131 _v66 = _v65.stamp 01132 _x = _v66 01133 start = end 01134 end += 8 01135 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 01136 start = end 01137 end += 4 01138 (length,) = _struct_I.unpack(str[start:end]) 01139 start = end 01140 end += length 01141 _v65.frame_id = str[start:end] 01142 start = end 01143 end += 4 01144 (length,) = _struct_I.unpack(str[start:end]) 01145 _v64.object_points = [] 01146 for i in range(0, length): 01147 val3 = geometry_msgs.msg.Point32() 01148 _x = val3 01149 start = end 01150 end += 12 01151 (_x.x, _x.y, _x.z,) = _struct_3f.unpack(str[start:end]) 01152 _v64.object_points.append(val3) 01153 start = end 01154 end += 4 01155 (length,) = _struct_I.unpack(str[start:end]) 01156 _v64.image_points = [] 01157 for i in range(0, length): 01158 val3 = calibration_msgs.msg.ImagePoint() 01159 _x = val3 01160 start = end 01161 end += 8 01162 (_x.x, _x.y,) = _struct_2f.unpack(str[start:end]) 01163 _v64.image_points.append(val3) 01164 start = end 01165 end += 1 01166 (_v64.success,) = _struct_B.unpack(str[start:end]) 01167 _v67 = val1.joint_features 01168 _v68 = _v67.header 01169 start = end 01170 end += 4 01171 (_v68.seq,) = _struct_I.unpack(str[start:end]) 01172 _v69 = _v68.stamp 01173 _x = _v69 01174 start = end 01175 end += 8 01176 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 01177 start = end 01178 end += 4 01179 (length,) = _struct_I.unpack(str[start:end]) 01180 start = end 01181 end += length 01182 _v68.frame_id = str[start:end] 01183 start = end 01184 end += 4 01185 (length,) = _struct_I.unpack(str[start:end]) 01186 _v67.object_points = [] 01187 for i in range(0, length): 01188 val3 = geometry_msgs.msg.Point32() 01189 _x = val3 01190 start = end 01191 end += 12 01192 (_x.x, _x.y, _x.z,) = _struct_3f.unpack(str[start:end]) 01193 _v67.object_points.append(val3) 01194 start = end 01195 end += 4 01196 (length,) = _struct_I.unpack(str[start:end]) 01197 _v67.joint_points = [] 01198 for i in range(0, length): 01199 val3 = sensor_msgs.msg.JointState() 01200 _v70 = val3.header 01201 start = end 01202 end += 4 01203 (_v70.seq,) = _struct_I.unpack(str[start:end]) 01204 _v71 = _v70.stamp 01205 _x = _v71 01206 start = end 01207 end += 8 01208 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 01209 start = end 01210 end += 4 01211 (length,) = _struct_I.unpack(str[start:end]) 01212 start = end 01213 end += length 01214 _v70.frame_id = str[start:end] 01215 start = end 01216 end += 4 01217 (length,) = _struct_I.unpack(str[start:end]) 01218 val3.name = [] 01219 for i in range(0, length): 01220 start = end 01221 end += 4 01222 (length,) = _struct_I.unpack(str[start:end]) 01223 start = end 01224 end += length 01225 val4 = str[start:end] 01226 val3.name.append(val4) 01227 start = end 01228 end += 4 01229 (length,) = _struct_I.unpack(str[start:end]) 01230 pattern = '<%sd'%length 01231 start = end 01232 end += struct.calcsize(pattern) 01233 val3.position = struct.unpack(pattern, str[start:end]) 01234 start = end 01235 end += 4 01236 (length,) = _struct_I.unpack(str[start:end]) 01237 pattern = '<%sd'%length 01238 start = end 01239 end += struct.calcsize(pattern) 01240 val3.velocity = struct.unpack(pattern, str[start:end]) 01241 start = end 01242 end += 4 01243 (length,) = _struct_I.unpack(str[start:end]) 01244 pattern = '<%sd'%length 01245 start = end 01246 end += struct.calcsize(pattern) 01247 val3.effort = struct.unpack(pattern, str[start:end]) 01248 _v67.joint_points.append(val3) 01249 self.M_laser.append(val1) 01250 start = end 01251 end += 4 01252 (length,) = _struct_I.unpack(str[start:end]) 01253 self.M_chain = [] 01254 for i in range(0, length): 01255 val1 = calibration_msgs.msg.ChainMeasurement() 01256 _v72 = val1.header 01257 start = end 01258 end += 4 01259 (_v72.seq,) = _struct_I.unpack(str[start:end]) 01260 _v73 = _v72.stamp 01261 _x = _v73 01262 start = end 01263 end += 8 01264 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 01265 start = end 01266 end += 4 01267 (length,) = _struct_I.unpack(str[start:end]) 01268 start = end 01269 end += length 01270 _v72.frame_id = str[start:end] 01271 start = end 01272 end += 4 01273 (length,) = _struct_I.unpack(str[start:end]) 01274 start = end 01275 end += length 01276 val1.chain_id = str[start:end] 01277 _v74 = val1.chain_state 01278 _v75 = _v74.header 01279 start = end 01280 end += 4 01281 (_v75.seq,) = _struct_I.unpack(str[start:end]) 01282 _v76 = _v75.stamp 01283 _x = _v76 01284 start = end 01285 end += 8 01286 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 01287 start = end 01288 end += 4 01289 (length,) = _struct_I.unpack(str[start:end]) 01290 start = end 01291 end += length 01292 _v75.frame_id = str[start:end] 01293 start = end 01294 end += 4 01295 (length,) = _struct_I.unpack(str[start:end]) 01296 _v74.name = [] 01297 for i in range(0, length): 01298 start = end 01299 end += 4 01300 (length,) = _struct_I.unpack(str[start:end]) 01301 start = end 01302 end += length 01303 val3 = str[start:end] 01304 _v74.name.append(val3) 01305 start = end 01306 end += 4 01307 (length,) = _struct_I.unpack(str[start:end]) 01308 pattern = '<%sd'%length 01309 start = end 01310 end += struct.calcsize(pattern) 01311 _v74.position = struct.unpack(pattern, str[start:end]) 01312 start = end 01313 end += 4 01314 (length,) = _struct_I.unpack(str[start:end]) 01315 pattern = '<%sd'%length 01316 start = end 01317 end += struct.calcsize(pattern) 01318 _v74.velocity = struct.unpack(pattern, str[start:end]) 01319 start = end 01320 end += 4 01321 (length,) = _struct_I.unpack(str[start:end]) 01322 pattern = '<%sd'%length 01323 start = end 01324 end += struct.calcsize(pattern) 01325 _v74.effort = struct.unpack(pattern, str[start:end]) 01326 self.M_chain.append(val1) 01327 return self 01328 except struct.error as e: 01329 raise roslib.message.DeserializationError(e) #most likely buffer underfill 01330 01331 01332 def serialize_numpy(self, buff, numpy): 01333 """ 01334 serialize message with numpy array types into buffer 01335 @param buff: buffer 01336 @type buff: StringIO 01337 @param numpy: numpy python module 01338 @type numpy module 01339 """ 01340 try: 01341 _x = self.sample_id 01342 length = len(_x) 01343 buff.write(struct.pack('<I%ss'%length, length, _x)) 01344 _x = self.target_id 01345 length = len(_x) 01346 buff.write(struct.pack('<I%ss'%length, length, _x)) 01347 _x = self.chain_id 01348 length = len(_x) 01349 buff.write(struct.pack('<I%ss'%length, length, _x)) 01350 length = len(self.M_cam) 01351 buff.write(_struct_I.pack(length)) 01352 for val1 in self.M_cam: 01353 _v77 = val1.header 01354 buff.write(_struct_I.pack(_v77.seq)) 01355 _v78 = _v77.stamp 01356 _x = _v78 01357 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 01358 _x = _v77.frame_id 01359 length = len(_x) 01360 buff.write(struct.pack('<I%ss'%length, length, _x)) 01361 _x = val1.camera_id 01362 length = len(_x) 01363 buff.write(struct.pack('<I%ss'%length, length, _x)) 01364 length = len(val1.image_points) 01365 buff.write(_struct_I.pack(length)) 01366 for val2 in val1.image_points: 01367 _x = val2 01368 buff.write(_struct_2f.pack(_x.x, _x.y)) 01369 _v79 = val1.cam_info 01370 _v80 = _v79.header 01371 buff.write(_struct_I.pack(_v80.seq)) 01372 _v81 = _v80.stamp 01373 _x = _v81 01374 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 01375 _x = _v80.frame_id 01376 length = len(_x) 01377 buff.write(struct.pack('<I%ss'%length, length, _x)) 01378 _x = _v79 01379 buff.write(_struct_2I.pack(_x.height, _x.width)) 01380 _x = _v79.distortion_model 01381 length = len(_x) 01382 buff.write(struct.pack('<I%ss'%length, length, _x)) 01383 length = len(_v79.D) 01384 buff.write(_struct_I.pack(length)) 01385 pattern = '<%sd'%length 01386 buff.write(_v79.D.tostring()) 01387 buff.write(_v79.K.tostring()) 01388 buff.write(_v79.R.tostring()) 01389 buff.write(_v79.P.tostring()) 01390 _x = _v79 01391 buff.write(_struct_2I.pack(_x.binning_x, _x.binning_y)) 01392 _v82 = _v79.roi 01393 _x = _v82 01394 buff.write(_struct_4IB.pack(_x.x_offset, _x.y_offset, _x.height, _x.width, _x.do_rectify)) 01395 buff.write(_struct_B.pack(val1.verbose)) 01396 _v83 = val1.image 01397 _v84 = _v83.header 01398 buff.write(_struct_I.pack(_v84.seq)) 01399 _v85 = _v84.stamp 01400 _x = _v85 01401 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 01402 _x = _v84.frame_id 01403 length = len(_x) 01404 buff.write(struct.pack('<I%ss'%length, length, _x)) 01405 _x = _v83 01406 buff.write(_struct_2I.pack(_x.height, _x.width)) 01407 _x = _v83.encoding 01408 length = len(_x) 01409 buff.write(struct.pack('<I%ss'%length, length, _x)) 01410 _x = _v83 01411 buff.write(_struct_BI.pack(_x.is_bigendian, _x.step)) 01412 _x = _v83.data 01413 length = len(_x) 01414 # - if encoded as a list instead, serialize as bytes instead of string 01415 if type(_x) in [list, tuple]: 01416 buff.write(struct.pack('<I%sB'%length, length, *_x)) 01417 else: 01418 buff.write(struct.pack('<I%ss'%length, length, _x)) 01419 _v86 = val1.image_rect 01420 _v87 = _v86.header 01421 buff.write(_struct_I.pack(_v87.seq)) 01422 _v88 = _v87.stamp 01423 _x = _v88 01424 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 01425 _x = _v87.frame_id 01426 length = len(_x) 01427 buff.write(struct.pack('<I%ss'%length, length, _x)) 01428 _x = _v86 01429 buff.write(_struct_2I.pack(_x.height, _x.width)) 01430 _x = _v86.encoding 01431 length = len(_x) 01432 buff.write(struct.pack('<I%ss'%length, length, _x)) 01433 _x = _v86 01434 buff.write(_struct_BI.pack(_x.is_bigendian, _x.step)) 01435 _x = _v86.data 01436 length = len(_x) 01437 # - if encoded as a list instead, serialize as bytes instead of string 01438 if type(_x) in [list, tuple]: 01439 buff.write(struct.pack('<I%sB'%length, length, *_x)) 01440 else: 01441 buff.write(struct.pack('<I%ss'%length, length, _x)) 01442 _v89 = val1.features 01443 _v90 = _v89.header 01444 buff.write(_struct_I.pack(_v90.seq)) 01445 _v91 = _v90.stamp 01446 _x = _v91 01447 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 01448 _x = _v90.frame_id 01449 length = len(_x) 01450 buff.write(struct.pack('<I%ss'%length, length, _x)) 01451 length = len(_v89.object_points) 01452 buff.write(_struct_I.pack(length)) 01453 for val3 in _v89.object_points: 01454 _x = val3 01455 buff.write(_struct_3f.pack(_x.x, _x.y, _x.z)) 01456 length = len(_v89.image_points) 01457 buff.write(_struct_I.pack(length)) 01458 for val3 in _v89.image_points: 01459 _x = val3 01460 buff.write(_struct_2f.pack(_x.x, _x.y)) 01461 buff.write(_struct_B.pack(_v89.success)) 01462 length = len(self.M_laser) 01463 buff.write(_struct_I.pack(length)) 01464 for val1 in self.M_laser: 01465 _v92 = val1.header 01466 buff.write(_struct_I.pack(_v92.seq)) 01467 _v93 = _v92.stamp 01468 _x = _v93 01469 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 01470 _x = _v92.frame_id 01471 length = len(_x) 01472 buff.write(struct.pack('<I%ss'%length, length, _x)) 01473 _x = val1.laser_id 01474 length = len(_x) 01475 buff.write(struct.pack('<I%ss'%length, length, _x)) 01476 length = len(val1.joint_points) 01477 buff.write(_struct_I.pack(length)) 01478 for val2 in val1.joint_points: 01479 _v94 = val2.header 01480 buff.write(_struct_I.pack(_v94.seq)) 01481 _v95 = _v94.stamp 01482 _x = _v95 01483 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 01484 _x = _v94.frame_id 01485 length = len(_x) 01486 buff.write(struct.pack('<I%ss'%length, length, _x)) 01487 length = len(val2.name) 01488 buff.write(_struct_I.pack(length)) 01489 for val3 in val2.name: 01490 length = len(val3) 01491 buff.write(struct.pack('<I%ss'%length, length, val3)) 01492 length = len(val2.position) 01493 buff.write(_struct_I.pack(length)) 01494 pattern = '<%sd'%length 01495 buff.write(val2.position.tostring()) 01496 length = len(val2.velocity) 01497 buff.write(_struct_I.pack(length)) 01498 pattern = '<%sd'%length 01499 buff.write(val2.velocity.tostring()) 01500 length = len(val2.effort) 01501 buff.write(_struct_I.pack(length)) 01502 pattern = '<%sd'%length 01503 buff.write(val2.effort.tostring()) 01504 buff.write(_struct_B.pack(val1.verbose)) 01505 _v96 = val1.snapshot 01506 _v97 = _v96.header 01507 buff.write(_struct_I.pack(_v97.seq)) 01508 _v98 = _v97.stamp 01509 _x = _v98 01510 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 01511 _x = _v97.frame_id 01512 length = len(_x) 01513 buff.write(struct.pack('<I%ss'%length, length, _x)) 01514 _x = _v96 01515 buff.write(_struct_6f2I.pack(_x.angle_min, _x.angle_max, _x.angle_increment, _x.time_increment, _x.range_min, _x.range_max, _x.readings_per_scan, _x.num_scans)) 01516 length = len(_v96.ranges) 01517 buff.write(_struct_I.pack(length)) 01518 pattern = '<%sf'%length 01519 buff.write(_v96.ranges.tostring()) 01520 length = len(_v96.intensities) 01521 buff.write(_struct_I.pack(length)) 01522 pattern = '<%sf'%length 01523 buff.write(_v96.intensities.tostring()) 01524 length = len(_v96.scan_start) 01525 buff.write(_struct_I.pack(length)) 01526 for val3 in _v96.scan_start: 01527 _x = val3 01528 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 01529 _v99 = val1.laser_image 01530 _v100 = _v99.header 01531 buff.write(_struct_I.pack(_v100.seq)) 01532 _v101 = _v100.stamp 01533 _x = _v101 01534 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 01535 _x = _v100.frame_id 01536 length = len(_x) 01537 buff.write(struct.pack('<I%ss'%length, length, _x)) 01538 _x = _v99 01539 buff.write(_struct_2I.pack(_x.height, _x.width)) 01540 _x = _v99.encoding 01541 length = len(_x) 01542 buff.write(struct.pack('<I%ss'%length, length, _x)) 01543 _x = _v99 01544 buff.write(_struct_BI.pack(_x.is_bigendian, _x.step)) 01545 _x = _v99.data 01546 length = len(_x) 01547 # - if encoded as a list instead, serialize as bytes instead of string 01548 if type(_x) in [list, tuple]: 01549 buff.write(struct.pack('<I%sB'%length, length, *_x)) 01550 else: 01551 buff.write(struct.pack('<I%ss'%length, length, _x)) 01552 _v102 = val1.image_features 01553 _v103 = _v102.header 01554 buff.write(_struct_I.pack(_v103.seq)) 01555 _v104 = _v103.stamp 01556 _x = _v104 01557 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 01558 _x = _v103.frame_id 01559 length = len(_x) 01560 buff.write(struct.pack('<I%ss'%length, length, _x)) 01561 length = len(_v102.object_points) 01562 buff.write(_struct_I.pack(length)) 01563 for val3 in _v102.object_points: 01564 _x = val3 01565 buff.write(_struct_3f.pack(_x.x, _x.y, _x.z)) 01566 length = len(_v102.image_points) 01567 buff.write(_struct_I.pack(length)) 01568 for val3 in _v102.image_points: 01569 _x = val3 01570 buff.write(_struct_2f.pack(_x.x, _x.y)) 01571 buff.write(_struct_B.pack(_v102.success)) 01572 _v105 = val1.joint_features 01573 _v106 = _v105.header 01574 buff.write(_struct_I.pack(_v106.seq)) 01575 _v107 = _v106.stamp 01576 _x = _v107 01577 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 01578 _x = _v106.frame_id 01579 length = len(_x) 01580 buff.write(struct.pack('<I%ss'%length, length, _x)) 01581 length = len(_v105.object_points) 01582 buff.write(_struct_I.pack(length)) 01583 for val3 in _v105.object_points: 01584 _x = val3 01585 buff.write(_struct_3f.pack(_x.x, _x.y, _x.z)) 01586 length = len(_v105.joint_points) 01587 buff.write(_struct_I.pack(length)) 01588 for val3 in _v105.joint_points: 01589 _v108 = val3.header 01590 buff.write(_struct_I.pack(_v108.seq)) 01591 _v109 = _v108.stamp 01592 _x = _v109 01593 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 01594 _x = _v108.frame_id 01595 length = len(_x) 01596 buff.write(struct.pack('<I%ss'%length, length, _x)) 01597 length = len(val3.name) 01598 buff.write(_struct_I.pack(length)) 01599 for val4 in val3.name: 01600 length = len(val4) 01601 buff.write(struct.pack('<I%ss'%length, length, val4)) 01602 length = len(val3.position) 01603 buff.write(_struct_I.pack(length)) 01604 pattern = '<%sd'%length 01605 buff.write(val3.position.tostring()) 01606 length = len(val3.velocity) 01607 buff.write(_struct_I.pack(length)) 01608 pattern = '<%sd'%length 01609 buff.write(val3.velocity.tostring()) 01610 length = len(val3.effort) 01611 buff.write(_struct_I.pack(length)) 01612 pattern = '<%sd'%length 01613 buff.write(val3.effort.tostring()) 01614 length = len(self.M_chain) 01615 buff.write(_struct_I.pack(length)) 01616 for val1 in self.M_chain: 01617 _v110 = val1.header 01618 buff.write(_struct_I.pack(_v110.seq)) 01619 _v111 = _v110.stamp 01620 _x = _v111 01621 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 01622 _x = _v110.frame_id 01623 length = len(_x) 01624 buff.write(struct.pack('<I%ss'%length, length, _x)) 01625 _x = val1.chain_id 01626 length = len(_x) 01627 buff.write(struct.pack('<I%ss'%length, length, _x)) 01628 _v112 = val1.chain_state 01629 _v113 = _v112.header 01630 buff.write(_struct_I.pack(_v113.seq)) 01631 _v114 = _v113.stamp 01632 _x = _v114 01633 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 01634 _x = _v113.frame_id 01635 length = len(_x) 01636 buff.write(struct.pack('<I%ss'%length, length, _x)) 01637 length = len(_v112.name) 01638 buff.write(_struct_I.pack(length)) 01639 for val3 in _v112.name: 01640 length = len(val3) 01641 buff.write(struct.pack('<I%ss'%length, length, val3)) 01642 length = len(_v112.position) 01643 buff.write(_struct_I.pack(length)) 01644 pattern = '<%sd'%length 01645 buff.write(_v112.position.tostring()) 01646 length = len(_v112.velocity) 01647 buff.write(_struct_I.pack(length)) 01648 pattern = '<%sd'%length 01649 buff.write(_v112.velocity.tostring()) 01650 length = len(_v112.effort) 01651 buff.write(_struct_I.pack(length)) 01652 pattern = '<%sd'%length 01653 buff.write(_v112.effort.tostring()) 01654 except struct.error as se: self._check_types(se) 01655 except TypeError as te: self._check_types(te) 01656 01657 def deserialize_numpy(self, str, numpy): 01658 """ 01659 unpack serialized message in str into this message instance using numpy for array types 01660 @param str: byte array of serialized message 01661 @type str: str 01662 @param numpy: numpy python module 01663 @type numpy: module 01664 """ 01665 try: 01666 end = 0 01667 start = end 01668 end += 4 01669 (length,) = _struct_I.unpack(str[start:end]) 01670 start = end 01671 end += length 01672 self.sample_id = str[start:end] 01673 start = end 01674 end += 4 01675 (length,) = _struct_I.unpack(str[start:end]) 01676 start = end 01677 end += length 01678 self.target_id = str[start:end] 01679 start = end 01680 end += 4 01681 (length,) = _struct_I.unpack(str[start:end]) 01682 start = end 01683 end += length 01684 self.chain_id = str[start:end] 01685 start = end 01686 end += 4 01687 (length,) = _struct_I.unpack(str[start:end]) 01688 self.M_cam = [] 01689 for i in range(0, length): 01690 val1 = calibration_msgs.msg.CameraMeasurement() 01691 _v115 = val1.header 01692 start = end 01693 end += 4 01694 (_v115.seq,) = _struct_I.unpack(str[start:end]) 01695 _v116 = _v115.stamp 01696 _x = _v116 01697 start = end 01698 end += 8 01699 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 01700 start = end 01701 end += 4 01702 (length,) = _struct_I.unpack(str[start:end]) 01703 start = end 01704 end += length 01705 _v115.frame_id = str[start:end] 01706 start = end 01707 end += 4 01708 (length,) = _struct_I.unpack(str[start:end]) 01709 start = end 01710 end += length 01711 val1.camera_id = str[start:end] 01712 start = end 01713 end += 4 01714 (length,) = _struct_I.unpack(str[start:end]) 01715 val1.image_points = [] 01716 for i in range(0, length): 01717 val2 = calibration_msgs.msg.ImagePoint() 01718 _x = val2 01719 start = end 01720 end += 8 01721 (_x.x, _x.y,) = _struct_2f.unpack(str[start:end]) 01722 val1.image_points.append(val2) 01723 _v117 = val1.cam_info 01724 _v118 = _v117.header 01725 start = end 01726 end += 4 01727 (_v118.seq,) = _struct_I.unpack(str[start:end]) 01728 _v119 = _v118.stamp 01729 _x = _v119 01730 start = end 01731 end += 8 01732 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 01733 start = end 01734 end += 4 01735 (length,) = _struct_I.unpack(str[start:end]) 01736 start = end 01737 end += length 01738 _v118.frame_id = str[start:end] 01739 _x = _v117 01740 start = end 01741 end += 8 01742 (_x.height, _x.width,) = _struct_2I.unpack(str[start:end]) 01743 start = end 01744 end += 4 01745 (length,) = _struct_I.unpack(str[start:end]) 01746 start = end 01747 end += length 01748 _v117.distortion_model = str[start:end] 01749 start = end 01750 end += 4 01751 (length,) = _struct_I.unpack(str[start:end]) 01752 pattern = '<%sd'%length 01753 start = end 01754 end += struct.calcsize(pattern) 01755 _v117.D = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) 01756 start = end 01757 end += 72 01758 _v117.K = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=9) 01759 start = end 01760 end += 72 01761 _v117.R = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=9) 01762 start = end 01763 end += 96 01764 _v117.P = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=12) 01765 _x = _v117 01766 start = end 01767 end += 8 01768 (_x.binning_x, _x.binning_y,) = _struct_2I.unpack(str[start:end]) 01769 _v120 = _v117.roi 01770 _x = _v120 01771 start = end 01772 end += 17 01773 (_x.x_offset, _x.y_offset, _x.height, _x.width, _x.do_rectify,) = _struct_4IB.unpack(str[start:end]) 01774 _v120.do_rectify = bool(_v120.do_rectify) 01775 start = end 01776 end += 1 01777 (val1.verbose,) = _struct_B.unpack(str[start:end]) 01778 val1.verbose = bool(val1.verbose) 01779 _v121 = val1.image 01780 _v122 = _v121.header 01781 start = end 01782 end += 4 01783 (_v122.seq,) = _struct_I.unpack(str[start:end]) 01784 _v123 = _v122.stamp 01785 _x = _v123 01786 start = end 01787 end += 8 01788 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 01789 start = end 01790 end += 4 01791 (length,) = _struct_I.unpack(str[start:end]) 01792 start = end 01793 end += length 01794 _v122.frame_id = str[start:end] 01795 _x = _v121 01796 start = end 01797 end += 8 01798 (_x.height, _x.width,) = _struct_2I.unpack(str[start:end]) 01799 start = end 01800 end += 4 01801 (length,) = _struct_I.unpack(str[start:end]) 01802 start = end 01803 end += length 01804 _v121.encoding = str[start:end] 01805 _x = _v121 01806 start = end 01807 end += 5 01808 (_x.is_bigendian, _x.step,) = _struct_BI.unpack(str[start:end]) 01809 start = end 01810 end += 4 01811 (length,) = _struct_I.unpack(str[start:end]) 01812 start = end 01813 end += length 01814 _v121.data = str[start:end] 01815 _v124 = val1.image_rect 01816 _v125 = _v124.header 01817 start = end 01818 end += 4 01819 (_v125.seq,) = _struct_I.unpack(str[start:end]) 01820 _v126 = _v125.stamp 01821 _x = _v126 01822 start = end 01823 end += 8 01824 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 01825 start = end 01826 end += 4 01827 (length,) = _struct_I.unpack(str[start:end]) 01828 start = end 01829 end += length 01830 _v125.frame_id = str[start:end] 01831 _x = _v124 01832 start = end 01833 end += 8 01834 (_x.height, _x.width,) = _struct_2I.unpack(str[start:end]) 01835 start = end 01836 end += 4 01837 (length,) = _struct_I.unpack(str[start:end]) 01838 start = end 01839 end += length 01840 _v124.encoding = str[start:end] 01841 _x = _v124 01842 start = end 01843 end += 5 01844 (_x.is_bigendian, _x.step,) = _struct_BI.unpack(str[start:end]) 01845 start = end 01846 end += 4 01847 (length,) = _struct_I.unpack(str[start:end]) 01848 start = end 01849 end += length 01850 _v124.data = str[start:end] 01851 _v127 = val1.features 01852 _v128 = _v127.header 01853 start = end 01854 end += 4 01855 (_v128.seq,) = _struct_I.unpack(str[start:end]) 01856 _v129 = _v128.stamp 01857 _x = _v129 01858 start = end 01859 end += 8 01860 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 01861 start = end 01862 end += 4 01863 (length,) = _struct_I.unpack(str[start:end]) 01864 start = end 01865 end += length 01866 _v128.frame_id = str[start:end] 01867 start = end 01868 end += 4 01869 (length,) = _struct_I.unpack(str[start:end]) 01870 _v127.object_points = [] 01871 for i in range(0, length): 01872 val3 = geometry_msgs.msg.Point32() 01873 _x = val3 01874 start = end 01875 end += 12 01876 (_x.x, _x.y, _x.z,) = _struct_3f.unpack(str[start:end]) 01877 _v127.object_points.append(val3) 01878 start = end 01879 end += 4 01880 (length,) = _struct_I.unpack(str[start:end]) 01881 _v127.image_points = [] 01882 for i in range(0, length): 01883 val3 = calibration_msgs.msg.ImagePoint() 01884 _x = val3 01885 start = end 01886 end += 8 01887 (_x.x, _x.y,) = _struct_2f.unpack(str[start:end]) 01888 _v127.image_points.append(val3) 01889 start = end 01890 end += 1 01891 (_v127.success,) = _struct_B.unpack(str[start:end]) 01892 self.M_cam.append(val1) 01893 start = end 01894 end += 4 01895 (length,) = _struct_I.unpack(str[start:end]) 01896 self.M_laser = [] 01897 for i in range(0, length): 01898 val1 = calibration_msgs.msg.LaserMeasurement() 01899 _v130 = val1.header 01900 start = end 01901 end += 4 01902 (_v130.seq,) = _struct_I.unpack(str[start:end]) 01903 _v131 = _v130.stamp 01904 _x = _v131 01905 start = end 01906 end += 8 01907 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 01908 start = end 01909 end += 4 01910 (length,) = _struct_I.unpack(str[start:end]) 01911 start = end 01912 end += length 01913 _v130.frame_id = str[start:end] 01914 start = end 01915 end += 4 01916 (length,) = _struct_I.unpack(str[start:end]) 01917 start = end 01918 end += length 01919 val1.laser_id = str[start:end] 01920 start = end 01921 end += 4 01922 (length,) = _struct_I.unpack(str[start:end]) 01923 val1.joint_points = [] 01924 for i in range(0, length): 01925 val2 = sensor_msgs.msg.JointState() 01926 _v132 = val2.header 01927 start = end 01928 end += 4 01929 (_v132.seq,) = _struct_I.unpack(str[start:end]) 01930 _v133 = _v132.stamp 01931 _x = _v133 01932 start = end 01933 end += 8 01934 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 01935 start = end 01936 end += 4 01937 (length,) = _struct_I.unpack(str[start:end]) 01938 start = end 01939 end += length 01940 _v132.frame_id = str[start:end] 01941 start = end 01942 end += 4 01943 (length,) = _struct_I.unpack(str[start:end]) 01944 val2.name = [] 01945 for i in range(0, length): 01946 start = end 01947 end += 4 01948 (length,) = _struct_I.unpack(str[start:end]) 01949 start = end 01950 end += length 01951 val3 = str[start:end] 01952 val2.name.append(val3) 01953 start = end 01954 end += 4 01955 (length,) = _struct_I.unpack(str[start:end]) 01956 pattern = '<%sd'%length 01957 start = end 01958 end += struct.calcsize(pattern) 01959 val2.position = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) 01960 start = end 01961 end += 4 01962 (length,) = _struct_I.unpack(str[start:end]) 01963 pattern = '<%sd'%length 01964 start = end 01965 end += struct.calcsize(pattern) 01966 val2.velocity = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) 01967 start = end 01968 end += 4 01969 (length,) = _struct_I.unpack(str[start:end]) 01970 pattern = '<%sd'%length 01971 start = end 01972 end += struct.calcsize(pattern) 01973 val2.effort = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) 01974 val1.joint_points.append(val2) 01975 start = end 01976 end += 1 01977 (val1.verbose,) = _struct_B.unpack(str[start:end]) 01978 val1.verbose = bool(val1.verbose) 01979 _v134 = val1.snapshot 01980 _v135 = _v134.header 01981 start = end 01982 end += 4 01983 (_v135.seq,) = _struct_I.unpack(str[start:end]) 01984 _v136 = _v135.stamp 01985 _x = _v136 01986 start = end 01987 end += 8 01988 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 01989 start = end 01990 end += 4 01991 (length,) = _struct_I.unpack(str[start:end]) 01992 start = end 01993 end += length 01994 _v135.frame_id = str[start:end] 01995 _x = _v134 01996 start = end 01997 end += 32 01998 (_x.angle_min, _x.angle_max, _x.angle_increment, _x.time_increment, _x.range_min, _x.range_max, _x.readings_per_scan, _x.num_scans,) = _struct_6f2I.unpack(str[start:end]) 01999 start = end 02000 end += 4 02001 (length,) = _struct_I.unpack(str[start:end]) 02002 pattern = '<%sf'%length 02003 start = end 02004 end += struct.calcsize(pattern) 02005 _v134.ranges = numpy.frombuffer(str[start:end], dtype=numpy.float32, count=length) 02006 start = end 02007 end += 4 02008 (length,) = _struct_I.unpack(str[start:end]) 02009 pattern = '<%sf'%length 02010 start = end 02011 end += struct.calcsize(pattern) 02012 _v134.intensities = numpy.frombuffer(str[start:end], dtype=numpy.float32, count=length) 02013 start = end 02014 end += 4 02015 (length,) = _struct_I.unpack(str[start:end]) 02016 _v134.scan_start = [] 02017 for i in range(0, length): 02018 val3 = roslib.rostime.Time() 02019 _x = val3 02020 start = end 02021 end += 8 02022 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 02023 _v134.scan_start.append(val3) 02024 _v137 = val1.laser_image 02025 _v138 = _v137.header 02026 start = end 02027 end += 4 02028 (_v138.seq,) = _struct_I.unpack(str[start:end]) 02029 _v139 = _v138.stamp 02030 _x = _v139 02031 start = end 02032 end += 8 02033 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 02034 start = end 02035 end += 4 02036 (length,) = _struct_I.unpack(str[start:end]) 02037 start = end 02038 end += length 02039 _v138.frame_id = str[start:end] 02040 _x = _v137 02041 start = end 02042 end += 8 02043 (_x.height, _x.width,) = _struct_2I.unpack(str[start:end]) 02044 start = end 02045 end += 4 02046 (length,) = _struct_I.unpack(str[start:end]) 02047 start = end 02048 end += length 02049 _v137.encoding = str[start:end] 02050 _x = _v137 02051 start = end 02052 end += 5 02053 (_x.is_bigendian, _x.step,) = _struct_BI.unpack(str[start:end]) 02054 start = end 02055 end += 4 02056 (length,) = _struct_I.unpack(str[start:end]) 02057 start = end 02058 end += length 02059 _v137.data = str[start:end] 02060 _v140 = val1.image_features 02061 _v141 = _v140.header 02062 start = end 02063 end += 4 02064 (_v141.seq,) = _struct_I.unpack(str[start:end]) 02065 _v142 = _v141.stamp 02066 _x = _v142 02067 start = end 02068 end += 8 02069 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 02070 start = end 02071 end += 4 02072 (length,) = _struct_I.unpack(str[start:end]) 02073 start = end 02074 end += length 02075 _v141.frame_id = str[start:end] 02076 start = end 02077 end += 4 02078 (length,) = _struct_I.unpack(str[start:end]) 02079 _v140.object_points = [] 02080 for i in range(0, length): 02081 val3 = geometry_msgs.msg.Point32() 02082 _x = val3 02083 start = end 02084 end += 12 02085 (_x.x, _x.y, _x.z,) = _struct_3f.unpack(str[start:end]) 02086 _v140.object_points.append(val3) 02087 start = end 02088 end += 4 02089 (length,) = _struct_I.unpack(str[start:end]) 02090 _v140.image_points = [] 02091 for i in range(0, length): 02092 val3 = calibration_msgs.msg.ImagePoint() 02093 _x = val3 02094 start = end 02095 end += 8 02096 (_x.x, _x.y,) = _struct_2f.unpack(str[start:end]) 02097 _v140.image_points.append(val3) 02098 start = end 02099 end += 1 02100 (_v140.success,) = _struct_B.unpack(str[start:end]) 02101 _v143 = val1.joint_features 02102 _v144 = _v143.header 02103 start = end 02104 end += 4 02105 (_v144.seq,) = _struct_I.unpack(str[start:end]) 02106 _v145 = _v144.stamp 02107 _x = _v145 02108 start = end 02109 end += 8 02110 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 02111 start = end 02112 end += 4 02113 (length,) = _struct_I.unpack(str[start:end]) 02114 start = end 02115 end += length 02116 _v144.frame_id = str[start:end] 02117 start = end 02118 end += 4 02119 (length,) = _struct_I.unpack(str[start:end]) 02120 _v143.object_points = [] 02121 for i in range(0, length): 02122 val3 = geometry_msgs.msg.Point32() 02123 _x = val3 02124 start = end 02125 end += 12 02126 (_x.x, _x.y, _x.z,) = _struct_3f.unpack(str[start:end]) 02127 _v143.object_points.append(val3) 02128 start = end 02129 end += 4 02130 (length,) = _struct_I.unpack(str[start:end]) 02131 _v143.joint_points = [] 02132 for i in range(0, length): 02133 val3 = sensor_msgs.msg.JointState() 02134 _v146 = val3.header 02135 start = end 02136 end += 4 02137 (_v146.seq,) = _struct_I.unpack(str[start:end]) 02138 _v147 = _v146.stamp 02139 _x = _v147 02140 start = end 02141 end += 8 02142 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 02143 start = end 02144 end += 4 02145 (length,) = _struct_I.unpack(str[start:end]) 02146 start = end 02147 end += length 02148 _v146.frame_id = str[start:end] 02149 start = end 02150 end += 4 02151 (length,) = _struct_I.unpack(str[start:end]) 02152 val3.name = [] 02153 for i in range(0, length): 02154 start = end 02155 end += 4 02156 (length,) = _struct_I.unpack(str[start:end]) 02157 start = end 02158 end += length 02159 val4 = str[start:end] 02160 val3.name.append(val4) 02161 start = end 02162 end += 4 02163 (length,) = _struct_I.unpack(str[start:end]) 02164 pattern = '<%sd'%length 02165 start = end 02166 end += struct.calcsize(pattern) 02167 val3.position = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) 02168 start = end 02169 end += 4 02170 (length,) = _struct_I.unpack(str[start:end]) 02171 pattern = '<%sd'%length 02172 start = end 02173 end += struct.calcsize(pattern) 02174 val3.velocity = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) 02175 start = end 02176 end += 4 02177 (length,) = _struct_I.unpack(str[start:end]) 02178 pattern = '<%sd'%length 02179 start = end 02180 end += struct.calcsize(pattern) 02181 val3.effort = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) 02182 _v143.joint_points.append(val3) 02183 self.M_laser.append(val1) 02184 start = end 02185 end += 4 02186 (length,) = _struct_I.unpack(str[start:end]) 02187 self.M_chain = [] 02188 for i in range(0, length): 02189 val1 = calibration_msgs.msg.ChainMeasurement() 02190 _v148 = val1.header 02191 start = end 02192 end += 4 02193 (_v148.seq,) = _struct_I.unpack(str[start:end]) 02194 _v149 = _v148.stamp 02195 _x = _v149 02196 start = end 02197 end += 8 02198 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 02199 start = end 02200 end += 4 02201 (length,) = _struct_I.unpack(str[start:end]) 02202 start = end 02203 end += length 02204 _v148.frame_id = str[start:end] 02205 start = end 02206 end += 4 02207 (length,) = _struct_I.unpack(str[start:end]) 02208 start = end 02209 end += length 02210 val1.chain_id = str[start:end] 02211 _v150 = val1.chain_state 02212 _v151 = _v150.header 02213 start = end 02214 end += 4 02215 (_v151.seq,) = _struct_I.unpack(str[start:end]) 02216 _v152 = _v151.stamp 02217 _x = _v152 02218 start = end 02219 end += 8 02220 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 02221 start = end 02222 end += 4 02223 (length,) = _struct_I.unpack(str[start:end]) 02224 start = end 02225 end += length 02226 _v151.frame_id = str[start:end] 02227 start = end 02228 end += 4 02229 (length,) = _struct_I.unpack(str[start:end]) 02230 _v150.name = [] 02231 for i in range(0, length): 02232 start = end 02233 end += 4 02234 (length,) = _struct_I.unpack(str[start:end]) 02235 start = end 02236 end += length 02237 val3 = str[start:end] 02238 _v150.name.append(val3) 02239 start = end 02240 end += 4 02241 (length,) = _struct_I.unpack(str[start:end]) 02242 pattern = '<%sd'%length 02243 start = end 02244 end += struct.calcsize(pattern) 02245 _v150.position = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) 02246 start = end 02247 end += 4 02248 (length,) = _struct_I.unpack(str[start:end]) 02249 pattern = '<%sd'%length 02250 start = end 02251 end += struct.calcsize(pattern) 02252 _v150.velocity = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) 02253 start = end 02254 end += 4 02255 (length,) = _struct_I.unpack(str[start:end]) 02256 pattern = '<%sd'%length 02257 start = end 02258 end += struct.calcsize(pattern) 02259 _v150.effort = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) 02260 self.M_chain.append(val1) 02261 return self 02262 except struct.error as e: 02263 raise roslib.message.DeserializationError(e) #most likely buffer underfill 02264 02265 _struct_I = roslib.message.struct_I 02266 _struct_B = struct.Struct("<B") 02267 _struct_12d = struct.Struct("<12d") 02268 _struct_9d = struct.Struct("<9d") 02269 _struct_BI = struct.Struct("<BI") 02270 _struct_3f = struct.Struct("<3f") 02271 _struct_2f = struct.Struct("<2f") 02272 _struct_6f2I = struct.Struct("<6f2I") 02273 _struct_2I = struct.Struct("<2I") 02274 _struct_4IB = struct.Struct("<4IB")