$search
00001 """autogenerated by genmsg_py from InteractiveMarkerUpdateWeb.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import roslib.rostime 00006 import geometry_msgs.msg 00007 import visualization_msgs.msg 00008 import std_msgs.msg 00009 00010 class InteractiveMarkerUpdateWeb(roslib.message.Message): 00011 _md5sum = "013c4168234093a459ba5d484dfe5cd2" 00012 _type = "interactive_marker_client/InteractiveMarkerUpdateWeb" 00013 _has_header = False #flag to mark the presence of a Header object 00014 _full_text = """# Identifying string. Must be unique in the topic namespace 00015 # that this server works on. 00016 string server_id 00017 00018 # Sequence number. 00019 # The client will use this to detect if it has missed an update. 00020 uint64 seq_num 00021 00022 # Type holds the purpose of this message. It must be one of UPDATE or KEEP_ALIVE. 00023 # UPDATE: Incremental update to previous state. 00024 # The sequence number must be 1 higher than for 00025 # the previous update. 00026 # KEEP_ALIVE: Indicates the that the server is still living. 00027 # The sequence number does not increase. 00028 # No payload data should be filled out (markers, poses, or erases). 00029 uint8 KEEP_ALIVE = 0 00030 uint8 UPDATE = 1 00031 uint8 INIT = 2 00032 00033 uint8 type 00034 00035 #Note: No guarantees on the order of processing. 00036 # Contents must be kept consistent by sender. 00037 00038 #Markers to be added or updated 00039 visualization_msgs/InteractiveMarker[] markers 00040 00041 #Poses of markers that should be moved 00042 visualization_msgs/InteractiveMarkerPose[] poses 00043 00044 #Names of markers to be erased 00045 string[] erases 00046 00047 00048 ================================================================================ 00049 MSG: visualization_msgs/InteractiveMarker 00050 # Time/frame info. 00051 # If header.time is set to 0, the marker will be retransformed into 00052 # its frame on each timestep. You will receive the pose feedback 00053 # in the same frame. 00054 # Otherwise, you might receive feedback in a different frame. 00055 # For rviz, this will be the current 'fixed frame' set by the user. 00056 Header header 00057 00058 # Initial pose. Also, defines the pivot point for rotations. 00059 geometry_msgs/Pose pose 00060 00061 # Identifying string. Must be globally unique in 00062 # the topic that this message is sent through. 00063 string name 00064 00065 # Short description (< 40 characters). 00066 string description 00067 00068 # Scale to be used for default controls (default=1). 00069 float32 scale 00070 00071 # All menu and submenu entries associated with this marker. 00072 MenuEntry[] menu_entries 00073 00074 # List of controls displayed for this marker. 00075 InteractiveMarkerControl[] controls 00076 00077 ================================================================================ 00078 MSG: std_msgs/Header 00079 # Standard metadata for higher-level stamped data types. 00080 # This is generally used to communicate timestamped data 00081 # in a particular coordinate frame. 00082 # 00083 # sequence ID: consecutively increasing ID 00084 uint32 seq 00085 #Two-integer timestamp that is expressed as: 00086 # * stamp.secs: seconds (stamp_secs) since epoch 00087 # * stamp.nsecs: nanoseconds since stamp_secs 00088 # time-handling sugar is provided by the client library 00089 time stamp 00090 #Frame this data is associated with 00091 # 0: no frame 00092 # 1: global frame 00093 string frame_id 00094 00095 ================================================================================ 00096 MSG: geometry_msgs/Pose 00097 # A representation of pose in free space, composed of postion and orientation. 00098 Point position 00099 Quaternion orientation 00100 00101 ================================================================================ 00102 MSG: geometry_msgs/Point 00103 # This contains the position of a point in free space 00104 float64 x 00105 float64 y 00106 float64 z 00107 00108 ================================================================================ 00109 MSG: geometry_msgs/Quaternion 00110 # This represents an orientation in free space in quaternion form. 00111 00112 float64 x 00113 float64 y 00114 float64 z 00115 float64 w 00116 00117 ================================================================================ 00118 MSG: visualization_msgs/MenuEntry 00119 # MenuEntry message. 00120 00121 # Each InteractiveMarker message has an array of MenuEntry messages. 00122 # A collection of MenuEntries together describe a 00123 # menu/submenu/subsubmenu/etc tree, though they are stored in a flat 00124 # array. The tree structure is represented by giving each menu entry 00125 # an ID number and a "parent_id" field. Top-level entries are the 00126 # ones with parent_id = 0. Menu entries are ordered within their 00127 # level the same way they are ordered in the containing array. Parent 00128 # entries must appear before their children. 00129 00130 # Example: 00131 # - id = 3 00132 # parent_id = 0 00133 # title = "fun" 00134 # - id = 2 00135 # parent_id = 0 00136 # title = "robot" 00137 # - id = 4 00138 # parent_id = 2 00139 # title = "pr2" 00140 # - id = 5 00141 # parent_id = 2 00142 # title = "turtle" 00143 # 00144 # Gives a menu tree like this: 00145 # - fun 00146 # - robot 00147 # - pr2 00148 # - turtle 00149 00150 # ID is a number for each menu entry. Must be unique within the 00151 # control, and should never be 0. 00152 uint32 id 00153 00154 # ID of the parent of this menu entry, if it is a submenu. If this 00155 # menu entry is a top-level entry, set parent_id to 0. 00156 uint32 parent_id 00157 00158 # menu / entry title 00159 string title 00160 00161 # Arguments to command indicated by command_type (below) 00162 string command 00163 00164 # Command_type stores the type of response desired when this menu 00165 # entry is clicked. 00166 # FEEDBACK: send an InteractiveMarkerFeedback message with menu_entry_id set to this entry's id. 00167 # ROSRUN: execute "rosrun" with arguments given in the command field (above). 00168 # ROSLAUNCH: execute "roslaunch" with arguments given in the command field (above). 00169 uint8 FEEDBACK=0 00170 uint8 ROSRUN=1 00171 uint8 ROSLAUNCH=2 00172 uint8 command_type 00173 00174 ================================================================================ 00175 MSG: visualization_msgs/InteractiveMarkerControl 00176 # Represents a control that is to be displayed together with an interactive marker 00177 00178 # Identifying string for this control. 00179 # You need to assign a unique value to this to receive feedback from the GUI 00180 # on what actions the user performs on this control (e.g. a button click). 00181 string name 00182 00183 00184 # Defines the local coordinate frame (relative to the pose of the parent 00185 # interactive marker) in which is being rotated and translated. 00186 # Default: Identity 00187 geometry_msgs/Quaternion orientation 00188 00189 00190 # Orientation mode: controls how orientation changes. 00191 # INHERIT: Follow orientation of interactive marker 00192 # FIXED: Keep orientation fixed at initial state 00193 # VIEW_FACING: Align y-z plane with screen (x: forward, y:left, z:up). 00194 uint8 INHERIT = 0 00195 uint8 FIXED = 1 00196 uint8 VIEW_FACING = 2 00197 00198 uint8 orientation_mode 00199 00200 # Interaction mode for this control 00201 # 00202 # NONE: This control is only meant for visualization; no context menu. 00203 # MENU: Like NONE, but right-click menu is active. 00204 # BUTTON: Element can be left-clicked. 00205 # MOVE_AXIS: Translate along local x-axis. 00206 # MOVE_PLANE: Translate in local y-z plane. 00207 # ROTATE_AXIS: Rotate around local x-axis. 00208 # MOVE_ROTATE: Combines MOVE_PLANE and ROTATE_AXIS. 00209 uint8 NONE = 0 00210 uint8 MENU = 1 00211 uint8 BUTTON = 2 00212 uint8 MOVE_AXIS = 3 00213 uint8 MOVE_PLANE = 4 00214 uint8 ROTATE_AXIS = 5 00215 uint8 MOVE_ROTATE = 6 00216 00217 uint8 interaction_mode 00218 00219 00220 # If true, the contained markers will also be visible 00221 # when the gui is not in interactive mode. 00222 bool always_visible 00223 00224 00225 # Markers to be displayed as custom visual representation. 00226 # Leave this empty to use the default control handles. 00227 # 00228 # Note: 00229 # - The markers can be defined in an arbitrary coordinate frame, 00230 # but will be transformed into the local frame of the interactive marker. 00231 # - If the header of a marker is empty, its pose will be interpreted as 00232 # relative to the pose of the parent interactive marker. 00233 Marker[] markers 00234 00235 00236 # In VIEW_FACING mode, set this to true if you don't want the markers 00237 # to be aligned with the camera view point. The markers will show up 00238 # as in INHERIT mode. 00239 bool independent_marker_orientation 00240 00241 00242 # Short description (< 40 characters) of what this control does, 00243 # e.g. "Move the robot". 00244 # Default: A generic description based on the interaction mode 00245 string description 00246 00247 ================================================================================ 00248 MSG: visualization_msgs/Marker 00249 # See http://www.ros.org/wiki/rviz/DisplayTypes/Marker and http://www.ros.org/wiki/rviz/Tutorials/Markers%3A%20Basic%20Shapes for more information on using this message with rviz 00250 00251 uint8 ARROW=0 00252 uint8 CUBE=1 00253 uint8 SPHERE=2 00254 uint8 CYLINDER=3 00255 uint8 LINE_STRIP=4 00256 uint8 LINE_LIST=5 00257 uint8 CUBE_LIST=6 00258 uint8 SPHERE_LIST=7 00259 uint8 POINTS=8 00260 uint8 TEXT_VIEW_FACING=9 00261 uint8 MESH_RESOURCE=10 00262 uint8 TRIANGLE_LIST=11 00263 00264 uint8 ADD=0 00265 uint8 MODIFY=0 00266 uint8 DELETE=2 00267 00268 Header header # header for time/frame information 00269 string ns # Namespace to place this object in... used in conjunction with id to create a unique name for the object 00270 int32 id # object ID useful in conjunction with the namespace for manipulating and deleting the object later 00271 int32 type # Type of object 00272 int32 action # 0 add/modify an object, 1 (deprecated), 2 deletes an object 00273 geometry_msgs/Pose pose # Pose of the object 00274 geometry_msgs/Vector3 scale # Scale of the object 1,1,1 means default (usually 1 meter square) 00275 std_msgs/ColorRGBA color # Color [0.0-1.0] 00276 duration lifetime # How long the object should last before being automatically deleted. 0 means forever 00277 bool frame_locked # If this marker should be frame-locked, i.e. retransformed into its frame every timestep 00278 00279 #Only used if the type specified has some use for them (eg. POINTS, LINE_STRIP, ...) 00280 geometry_msgs/Point[] points 00281 #Only used if the type specified has some use for them (eg. POINTS, LINE_STRIP, ...) 00282 #number of colors must either be 0 or equal to the number of points 00283 #NOTE: alpha is not yet used 00284 std_msgs/ColorRGBA[] colors 00285 00286 # NOTE: only used for text markers 00287 string text 00288 00289 # NOTE: only used for MESH_RESOURCE markers 00290 string mesh_resource 00291 bool mesh_use_embedded_materials 00292 00293 ================================================================================ 00294 MSG: geometry_msgs/Vector3 00295 # This represents a vector in free space. 00296 00297 float64 x 00298 float64 y 00299 float64 z 00300 ================================================================================ 00301 MSG: std_msgs/ColorRGBA 00302 float32 r 00303 float32 g 00304 float32 b 00305 float32 a 00306 00307 ================================================================================ 00308 MSG: visualization_msgs/InteractiveMarkerPose 00309 # Time/frame info. 00310 Header header 00311 00312 # Initial pose. Also, defines the pivot point for rotations. 00313 geometry_msgs/Pose pose 00314 00315 # Identifying string. Must be globally unique in 00316 # the topic that this message is sent through. 00317 string name 00318 00319 """ 00320 # Pseudo-constants 00321 KEEP_ALIVE = 0 00322 UPDATE = 1 00323 INIT = 2 00324 00325 __slots__ = ['server_id','seq_num','type','markers','poses','erases'] 00326 _slot_types = ['string','uint64','uint8','visualization_msgs/InteractiveMarker[]','visualization_msgs/InteractiveMarkerPose[]','string[]'] 00327 00328 def __init__(self, *args, **kwds): 00329 """ 00330 Constructor. Any message fields that are implicitly/explicitly 00331 set to None will be assigned a default value. The recommend 00332 use is keyword arguments as this is more robust to future message 00333 changes. You cannot mix in-order arguments and keyword arguments. 00334 00335 The available fields are: 00336 server_id,seq_num,type,markers,poses,erases 00337 00338 @param args: complete set of field values, in .msg order 00339 @param kwds: use keyword arguments corresponding to message field names 00340 to set specific fields. 00341 """ 00342 if args or kwds: 00343 super(InteractiveMarkerUpdateWeb, self).__init__(*args, **kwds) 00344 #message fields cannot be None, assign default values for those that are 00345 if self.server_id is None: 00346 self.server_id = '' 00347 if self.seq_num is None: 00348 self.seq_num = 0 00349 if self.type is None: 00350 self.type = 0 00351 if self.markers is None: 00352 self.markers = [] 00353 if self.poses is None: 00354 self.poses = [] 00355 if self.erases is None: 00356 self.erases = [] 00357 else: 00358 self.server_id = '' 00359 self.seq_num = 0 00360 self.type = 0 00361 self.markers = [] 00362 self.poses = [] 00363 self.erases = [] 00364 00365 def _get_types(self): 00366 """ 00367 internal API method 00368 """ 00369 return self._slot_types 00370 00371 def serialize(self, buff): 00372 """ 00373 serialize message into buffer 00374 @param buff: buffer 00375 @type buff: StringIO 00376 """ 00377 try: 00378 _x = self.server_id 00379 length = len(_x) 00380 buff.write(struct.pack('<I%ss'%length, length, _x)) 00381 _x = self 00382 buff.write(_struct_QB.pack(_x.seq_num, _x.type)) 00383 length = len(self.markers) 00384 buff.write(_struct_I.pack(length)) 00385 for val1 in self.markers: 00386 _v1 = val1.header 00387 buff.write(_struct_I.pack(_v1.seq)) 00388 _v2 = _v1.stamp 00389 _x = _v2 00390 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00391 _x = _v1.frame_id 00392 length = len(_x) 00393 buff.write(struct.pack('<I%ss'%length, length, _x)) 00394 _v3 = val1.pose 00395 _v4 = _v3.position 00396 _x = _v4 00397 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00398 _v5 = _v3.orientation 00399 _x = _v5 00400 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 00401 _x = val1.name 00402 length = len(_x) 00403 buff.write(struct.pack('<I%ss'%length, length, _x)) 00404 _x = val1.description 00405 length = len(_x) 00406 buff.write(struct.pack('<I%ss'%length, length, _x)) 00407 buff.write(_struct_f.pack(val1.scale)) 00408 length = len(val1.menu_entries) 00409 buff.write(_struct_I.pack(length)) 00410 for val2 in val1.menu_entries: 00411 _x = val2 00412 buff.write(_struct_2I.pack(_x.id, _x.parent_id)) 00413 _x = val2.title 00414 length = len(_x) 00415 buff.write(struct.pack('<I%ss'%length, length, _x)) 00416 _x = val2.command 00417 length = len(_x) 00418 buff.write(struct.pack('<I%ss'%length, length, _x)) 00419 buff.write(_struct_B.pack(val2.command_type)) 00420 length = len(val1.controls) 00421 buff.write(_struct_I.pack(length)) 00422 for val2 in val1.controls: 00423 _x = val2.name 00424 length = len(_x) 00425 buff.write(struct.pack('<I%ss'%length, length, _x)) 00426 _v6 = val2.orientation 00427 _x = _v6 00428 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 00429 _x = val2 00430 buff.write(_struct_3B.pack(_x.orientation_mode, _x.interaction_mode, _x.always_visible)) 00431 length = len(val2.markers) 00432 buff.write(_struct_I.pack(length)) 00433 for val3 in val2.markers: 00434 _v7 = val3.header 00435 buff.write(_struct_I.pack(_v7.seq)) 00436 _v8 = _v7.stamp 00437 _x = _v8 00438 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00439 _x = _v7.frame_id 00440 length = len(_x) 00441 buff.write(struct.pack('<I%ss'%length, length, _x)) 00442 _x = val3.ns 00443 length = len(_x) 00444 buff.write(struct.pack('<I%ss'%length, length, _x)) 00445 _x = val3 00446 buff.write(_struct_3i.pack(_x.id, _x.type, _x.action)) 00447 _v9 = val3.pose 00448 _v10 = _v9.position 00449 _x = _v10 00450 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00451 _v11 = _v9.orientation 00452 _x = _v11 00453 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 00454 _v12 = val3.scale 00455 _x = _v12 00456 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00457 _v13 = val3.color 00458 _x = _v13 00459 buff.write(_struct_4f.pack(_x.r, _x.g, _x.b, _x.a)) 00460 _v14 = val3.lifetime 00461 _x = _v14 00462 buff.write(_struct_2i.pack(_x.secs, _x.nsecs)) 00463 buff.write(_struct_B.pack(val3.frame_locked)) 00464 length = len(val3.points) 00465 buff.write(_struct_I.pack(length)) 00466 for val4 in val3.points: 00467 _x = val4 00468 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00469 length = len(val3.colors) 00470 buff.write(_struct_I.pack(length)) 00471 for val4 in val3.colors: 00472 _x = val4 00473 buff.write(_struct_4f.pack(_x.r, _x.g, _x.b, _x.a)) 00474 _x = val3.text 00475 length = len(_x) 00476 buff.write(struct.pack('<I%ss'%length, length, _x)) 00477 _x = val3.mesh_resource 00478 length = len(_x) 00479 buff.write(struct.pack('<I%ss'%length, length, _x)) 00480 buff.write(_struct_B.pack(val3.mesh_use_embedded_materials)) 00481 buff.write(_struct_B.pack(val2.independent_marker_orientation)) 00482 _x = val2.description 00483 length = len(_x) 00484 buff.write(struct.pack('<I%ss'%length, length, _x)) 00485 length = len(self.poses) 00486 buff.write(_struct_I.pack(length)) 00487 for val1 in self.poses: 00488 _v15 = val1.header 00489 buff.write(_struct_I.pack(_v15.seq)) 00490 _v16 = _v15.stamp 00491 _x = _v16 00492 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00493 _x = _v15.frame_id 00494 length = len(_x) 00495 buff.write(struct.pack('<I%ss'%length, length, _x)) 00496 _v17 = val1.pose 00497 _v18 = _v17.position 00498 _x = _v18 00499 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00500 _v19 = _v17.orientation 00501 _x = _v19 00502 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 00503 _x = val1.name 00504 length = len(_x) 00505 buff.write(struct.pack('<I%ss'%length, length, _x)) 00506 length = len(self.erases) 00507 buff.write(_struct_I.pack(length)) 00508 for val1 in self.erases: 00509 length = len(val1) 00510 buff.write(struct.pack('<I%ss'%length, length, val1)) 00511 except struct.error as se: self._check_types(se) 00512 except TypeError as te: self._check_types(te) 00513 00514 def deserialize(self, str): 00515 """ 00516 unpack serialized message in str into this message instance 00517 @param str: byte array of serialized message 00518 @type str: str 00519 """ 00520 try: 00521 end = 0 00522 start = end 00523 end += 4 00524 (length,) = _struct_I.unpack(str[start:end]) 00525 start = end 00526 end += length 00527 self.server_id = str[start:end] 00528 _x = self 00529 start = end 00530 end += 9 00531 (_x.seq_num, _x.type,) = _struct_QB.unpack(str[start:end]) 00532 start = end 00533 end += 4 00534 (length,) = _struct_I.unpack(str[start:end]) 00535 self.markers = [] 00536 for i in range(0, length): 00537 val1 = visualization_msgs.msg.InteractiveMarker() 00538 _v20 = val1.header 00539 start = end 00540 end += 4 00541 (_v20.seq,) = _struct_I.unpack(str[start:end]) 00542 _v21 = _v20.stamp 00543 _x = _v21 00544 start = end 00545 end += 8 00546 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 00547 start = end 00548 end += 4 00549 (length,) = _struct_I.unpack(str[start:end]) 00550 start = end 00551 end += length 00552 _v20.frame_id = str[start:end] 00553 _v22 = val1.pose 00554 _v23 = _v22.position 00555 _x = _v23 00556 start = end 00557 end += 24 00558 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00559 _v24 = _v22.orientation 00560 _x = _v24 00561 start = end 00562 end += 32 00563 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 00564 start = end 00565 end += 4 00566 (length,) = _struct_I.unpack(str[start:end]) 00567 start = end 00568 end += length 00569 val1.name = str[start:end] 00570 start = end 00571 end += 4 00572 (length,) = _struct_I.unpack(str[start:end]) 00573 start = end 00574 end += length 00575 val1.description = str[start:end] 00576 start = end 00577 end += 4 00578 (val1.scale,) = _struct_f.unpack(str[start:end]) 00579 start = end 00580 end += 4 00581 (length,) = _struct_I.unpack(str[start:end]) 00582 val1.menu_entries = [] 00583 for i in range(0, length): 00584 val2 = visualization_msgs.msg.MenuEntry() 00585 _x = val2 00586 start = end 00587 end += 8 00588 (_x.id, _x.parent_id,) = _struct_2I.unpack(str[start:end]) 00589 start = end 00590 end += 4 00591 (length,) = _struct_I.unpack(str[start:end]) 00592 start = end 00593 end += length 00594 val2.title = str[start:end] 00595 start = end 00596 end += 4 00597 (length,) = _struct_I.unpack(str[start:end]) 00598 start = end 00599 end += length 00600 val2.command = str[start:end] 00601 start = end 00602 end += 1 00603 (val2.command_type,) = _struct_B.unpack(str[start:end]) 00604 val1.menu_entries.append(val2) 00605 start = end 00606 end += 4 00607 (length,) = _struct_I.unpack(str[start:end]) 00608 val1.controls = [] 00609 for i in range(0, length): 00610 val2 = visualization_msgs.msg.InteractiveMarkerControl() 00611 start = end 00612 end += 4 00613 (length,) = _struct_I.unpack(str[start:end]) 00614 start = end 00615 end += length 00616 val2.name = str[start:end] 00617 _v25 = val2.orientation 00618 _x = _v25 00619 start = end 00620 end += 32 00621 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 00622 _x = val2 00623 start = end 00624 end += 3 00625 (_x.orientation_mode, _x.interaction_mode, _x.always_visible,) = _struct_3B.unpack(str[start:end]) 00626 val2.always_visible = bool(val2.always_visible) 00627 start = end 00628 end += 4 00629 (length,) = _struct_I.unpack(str[start:end]) 00630 val2.markers = [] 00631 for i in range(0, length): 00632 val3 = visualization_msgs.msg.Marker() 00633 _v26 = val3.header 00634 start = end 00635 end += 4 00636 (_v26.seq,) = _struct_I.unpack(str[start:end]) 00637 _v27 = _v26.stamp 00638 _x = _v27 00639 start = end 00640 end += 8 00641 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 00642 start = end 00643 end += 4 00644 (length,) = _struct_I.unpack(str[start:end]) 00645 start = end 00646 end += length 00647 _v26.frame_id = str[start:end] 00648 start = end 00649 end += 4 00650 (length,) = _struct_I.unpack(str[start:end]) 00651 start = end 00652 end += length 00653 val3.ns = str[start:end] 00654 _x = val3 00655 start = end 00656 end += 12 00657 (_x.id, _x.type, _x.action,) = _struct_3i.unpack(str[start:end]) 00658 _v28 = val3.pose 00659 _v29 = _v28.position 00660 _x = _v29 00661 start = end 00662 end += 24 00663 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00664 _v30 = _v28.orientation 00665 _x = _v30 00666 start = end 00667 end += 32 00668 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 00669 _v31 = val3.scale 00670 _x = _v31 00671 start = end 00672 end += 24 00673 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00674 _v32 = val3.color 00675 _x = _v32 00676 start = end 00677 end += 16 00678 (_x.r, _x.g, _x.b, _x.a,) = _struct_4f.unpack(str[start:end]) 00679 _v33 = val3.lifetime 00680 _x = _v33 00681 start = end 00682 end += 8 00683 (_x.secs, _x.nsecs,) = _struct_2i.unpack(str[start:end]) 00684 start = end 00685 end += 1 00686 (val3.frame_locked,) = _struct_B.unpack(str[start:end]) 00687 val3.frame_locked = bool(val3.frame_locked) 00688 start = end 00689 end += 4 00690 (length,) = _struct_I.unpack(str[start:end]) 00691 val3.points = [] 00692 for i in range(0, length): 00693 val4 = geometry_msgs.msg.Point() 00694 _x = val4 00695 start = end 00696 end += 24 00697 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00698 val3.points.append(val4) 00699 start = end 00700 end += 4 00701 (length,) = _struct_I.unpack(str[start:end]) 00702 val3.colors = [] 00703 for i in range(0, length): 00704 val4 = std_msgs.msg.ColorRGBA() 00705 _x = val4 00706 start = end 00707 end += 16 00708 (_x.r, _x.g, _x.b, _x.a,) = _struct_4f.unpack(str[start:end]) 00709 val3.colors.append(val4) 00710 start = end 00711 end += 4 00712 (length,) = _struct_I.unpack(str[start:end]) 00713 start = end 00714 end += length 00715 val3.text = str[start:end] 00716 start = end 00717 end += 4 00718 (length,) = _struct_I.unpack(str[start:end]) 00719 start = end 00720 end += length 00721 val3.mesh_resource = str[start:end] 00722 start = end 00723 end += 1 00724 (val3.mesh_use_embedded_materials,) = _struct_B.unpack(str[start:end]) 00725 val3.mesh_use_embedded_materials = bool(val3.mesh_use_embedded_materials) 00726 val2.markers.append(val3) 00727 start = end 00728 end += 1 00729 (val2.independent_marker_orientation,) = _struct_B.unpack(str[start:end]) 00730 val2.independent_marker_orientation = bool(val2.independent_marker_orientation) 00731 start = end 00732 end += 4 00733 (length,) = _struct_I.unpack(str[start:end]) 00734 start = end 00735 end += length 00736 val2.description = str[start:end] 00737 val1.controls.append(val2) 00738 self.markers.append(val1) 00739 start = end 00740 end += 4 00741 (length,) = _struct_I.unpack(str[start:end]) 00742 self.poses = [] 00743 for i in range(0, length): 00744 val1 = visualization_msgs.msg.InteractiveMarkerPose() 00745 _v34 = val1.header 00746 start = end 00747 end += 4 00748 (_v34.seq,) = _struct_I.unpack(str[start:end]) 00749 _v35 = _v34.stamp 00750 _x = _v35 00751 start = end 00752 end += 8 00753 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 00754 start = end 00755 end += 4 00756 (length,) = _struct_I.unpack(str[start:end]) 00757 start = end 00758 end += length 00759 _v34.frame_id = str[start:end] 00760 _v36 = val1.pose 00761 _v37 = _v36.position 00762 _x = _v37 00763 start = end 00764 end += 24 00765 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00766 _v38 = _v36.orientation 00767 _x = _v38 00768 start = end 00769 end += 32 00770 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 00771 start = end 00772 end += 4 00773 (length,) = _struct_I.unpack(str[start:end]) 00774 start = end 00775 end += length 00776 val1.name = str[start:end] 00777 self.poses.append(val1) 00778 start = end 00779 end += 4 00780 (length,) = _struct_I.unpack(str[start:end]) 00781 self.erases = [] 00782 for i in range(0, length): 00783 start = end 00784 end += 4 00785 (length,) = _struct_I.unpack(str[start:end]) 00786 start = end 00787 end += length 00788 val1 = str[start:end] 00789 self.erases.append(val1) 00790 return self 00791 except struct.error as e: 00792 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00793 00794 00795 def serialize_numpy(self, buff, numpy): 00796 """ 00797 serialize message with numpy array types into buffer 00798 @param buff: buffer 00799 @type buff: StringIO 00800 @param numpy: numpy python module 00801 @type numpy module 00802 """ 00803 try: 00804 _x = self.server_id 00805 length = len(_x) 00806 buff.write(struct.pack('<I%ss'%length, length, _x)) 00807 _x = self 00808 buff.write(_struct_QB.pack(_x.seq_num, _x.type)) 00809 length = len(self.markers) 00810 buff.write(_struct_I.pack(length)) 00811 for val1 in self.markers: 00812 _v39 = val1.header 00813 buff.write(_struct_I.pack(_v39.seq)) 00814 _v40 = _v39.stamp 00815 _x = _v40 00816 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00817 _x = _v39.frame_id 00818 length = len(_x) 00819 buff.write(struct.pack('<I%ss'%length, length, _x)) 00820 _v41 = val1.pose 00821 _v42 = _v41.position 00822 _x = _v42 00823 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00824 _v43 = _v41.orientation 00825 _x = _v43 00826 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 00827 _x = val1.name 00828 length = len(_x) 00829 buff.write(struct.pack('<I%ss'%length, length, _x)) 00830 _x = val1.description 00831 length = len(_x) 00832 buff.write(struct.pack('<I%ss'%length, length, _x)) 00833 buff.write(_struct_f.pack(val1.scale)) 00834 length = len(val1.menu_entries) 00835 buff.write(_struct_I.pack(length)) 00836 for val2 in val1.menu_entries: 00837 _x = val2 00838 buff.write(_struct_2I.pack(_x.id, _x.parent_id)) 00839 _x = val2.title 00840 length = len(_x) 00841 buff.write(struct.pack('<I%ss'%length, length, _x)) 00842 _x = val2.command 00843 length = len(_x) 00844 buff.write(struct.pack('<I%ss'%length, length, _x)) 00845 buff.write(_struct_B.pack(val2.command_type)) 00846 length = len(val1.controls) 00847 buff.write(_struct_I.pack(length)) 00848 for val2 in val1.controls: 00849 _x = val2.name 00850 length = len(_x) 00851 buff.write(struct.pack('<I%ss'%length, length, _x)) 00852 _v44 = val2.orientation 00853 _x = _v44 00854 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 00855 _x = val2 00856 buff.write(_struct_3B.pack(_x.orientation_mode, _x.interaction_mode, _x.always_visible)) 00857 length = len(val2.markers) 00858 buff.write(_struct_I.pack(length)) 00859 for val3 in val2.markers: 00860 _v45 = val3.header 00861 buff.write(_struct_I.pack(_v45.seq)) 00862 _v46 = _v45.stamp 00863 _x = _v46 00864 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00865 _x = _v45.frame_id 00866 length = len(_x) 00867 buff.write(struct.pack('<I%ss'%length, length, _x)) 00868 _x = val3.ns 00869 length = len(_x) 00870 buff.write(struct.pack('<I%ss'%length, length, _x)) 00871 _x = val3 00872 buff.write(_struct_3i.pack(_x.id, _x.type, _x.action)) 00873 _v47 = val3.pose 00874 _v48 = _v47.position 00875 _x = _v48 00876 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00877 _v49 = _v47.orientation 00878 _x = _v49 00879 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 00880 _v50 = val3.scale 00881 _x = _v50 00882 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00883 _v51 = val3.color 00884 _x = _v51 00885 buff.write(_struct_4f.pack(_x.r, _x.g, _x.b, _x.a)) 00886 _v52 = val3.lifetime 00887 _x = _v52 00888 buff.write(_struct_2i.pack(_x.secs, _x.nsecs)) 00889 buff.write(_struct_B.pack(val3.frame_locked)) 00890 length = len(val3.points) 00891 buff.write(_struct_I.pack(length)) 00892 for val4 in val3.points: 00893 _x = val4 00894 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00895 length = len(val3.colors) 00896 buff.write(_struct_I.pack(length)) 00897 for val4 in val3.colors: 00898 _x = val4 00899 buff.write(_struct_4f.pack(_x.r, _x.g, _x.b, _x.a)) 00900 _x = val3.text 00901 length = len(_x) 00902 buff.write(struct.pack('<I%ss'%length, length, _x)) 00903 _x = val3.mesh_resource 00904 length = len(_x) 00905 buff.write(struct.pack('<I%ss'%length, length, _x)) 00906 buff.write(_struct_B.pack(val3.mesh_use_embedded_materials)) 00907 buff.write(_struct_B.pack(val2.independent_marker_orientation)) 00908 _x = val2.description 00909 length = len(_x) 00910 buff.write(struct.pack('<I%ss'%length, length, _x)) 00911 length = len(self.poses) 00912 buff.write(_struct_I.pack(length)) 00913 for val1 in self.poses: 00914 _v53 = val1.header 00915 buff.write(_struct_I.pack(_v53.seq)) 00916 _v54 = _v53.stamp 00917 _x = _v54 00918 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00919 _x = _v53.frame_id 00920 length = len(_x) 00921 buff.write(struct.pack('<I%ss'%length, length, _x)) 00922 _v55 = val1.pose 00923 _v56 = _v55.position 00924 _x = _v56 00925 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00926 _v57 = _v55.orientation 00927 _x = _v57 00928 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 00929 _x = val1.name 00930 length = len(_x) 00931 buff.write(struct.pack('<I%ss'%length, length, _x)) 00932 length = len(self.erases) 00933 buff.write(_struct_I.pack(length)) 00934 for val1 in self.erases: 00935 length = len(val1) 00936 buff.write(struct.pack('<I%ss'%length, length, val1)) 00937 except struct.error as se: self._check_types(se) 00938 except TypeError as te: self._check_types(te) 00939 00940 def deserialize_numpy(self, str, numpy): 00941 """ 00942 unpack serialized message in str into this message instance using numpy for array types 00943 @param str: byte array of serialized message 00944 @type str: str 00945 @param numpy: numpy python module 00946 @type numpy: module 00947 """ 00948 try: 00949 end = 0 00950 start = end 00951 end += 4 00952 (length,) = _struct_I.unpack(str[start:end]) 00953 start = end 00954 end += length 00955 self.server_id = str[start:end] 00956 _x = self 00957 start = end 00958 end += 9 00959 (_x.seq_num, _x.type,) = _struct_QB.unpack(str[start:end]) 00960 start = end 00961 end += 4 00962 (length,) = _struct_I.unpack(str[start:end]) 00963 self.markers = [] 00964 for i in range(0, length): 00965 val1 = visualization_msgs.msg.InteractiveMarker() 00966 _v58 = val1.header 00967 start = end 00968 end += 4 00969 (_v58.seq,) = _struct_I.unpack(str[start:end]) 00970 _v59 = _v58.stamp 00971 _x = _v59 00972 start = end 00973 end += 8 00974 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 00975 start = end 00976 end += 4 00977 (length,) = _struct_I.unpack(str[start:end]) 00978 start = end 00979 end += length 00980 _v58.frame_id = str[start:end] 00981 _v60 = val1.pose 00982 _v61 = _v60.position 00983 _x = _v61 00984 start = end 00985 end += 24 00986 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00987 _v62 = _v60.orientation 00988 _x = _v62 00989 start = end 00990 end += 32 00991 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 00992 start = end 00993 end += 4 00994 (length,) = _struct_I.unpack(str[start:end]) 00995 start = end 00996 end += length 00997 val1.name = str[start:end] 00998 start = end 00999 end += 4 01000 (length,) = _struct_I.unpack(str[start:end]) 01001 start = end 01002 end += length 01003 val1.description = str[start:end] 01004 start = end 01005 end += 4 01006 (val1.scale,) = _struct_f.unpack(str[start:end]) 01007 start = end 01008 end += 4 01009 (length,) = _struct_I.unpack(str[start:end]) 01010 val1.menu_entries = [] 01011 for i in range(0, length): 01012 val2 = visualization_msgs.msg.MenuEntry() 01013 _x = val2 01014 start = end 01015 end += 8 01016 (_x.id, _x.parent_id,) = _struct_2I.unpack(str[start:end]) 01017 start = end 01018 end += 4 01019 (length,) = _struct_I.unpack(str[start:end]) 01020 start = end 01021 end += length 01022 val2.title = str[start:end] 01023 start = end 01024 end += 4 01025 (length,) = _struct_I.unpack(str[start:end]) 01026 start = end 01027 end += length 01028 val2.command = str[start:end] 01029 start = end 01030 end += 1 01031 (val2.command_type,) = _struct_B.unpack(str[start:end]) 01032 val1.menu_entries.append(val2) 01033 start = end 01034 end += 4 01035 (length,) = _struct_I.unpack(str[start:end]) 01036 val1.controls = [] 01037 for i in range(0, length): 01038 val2 = visualization_msgs.msg.InteractiveMarkerControl() 01039 start = end 01040 end += 4 01041 (length,) = _struct_I.unpack(str[start:end]) 01042 start = end 01043 end += length 01044 val2.name = str[start:end] 01045 _v63 = val2.orientation 01046 _x = _v63 01047 start = end 01048 end += 32 01049 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 01050 _x = val2 01051 start = end 01052 end += 3 01053 (_x.orientation_mode, _x.interaction_mode, _x.always_visible,) = _struct_3B.unpack(str[start:end]) 01054 val2.always_visible = bool(val2.always_visible) 01055 start = end 01056 end += 4 01057 (length,) = _struct_I.unpack(str[start:end]) 01058 val2.markers = [] 01059 for i in range(0, length): 01060 val3 = visualization_msgs.msg.Marker() 01061 _v64 = val3.header 01062 start = end 01063 end += 4 01064 (_v64.seq,) = _struct_I.unpack(str[start:end]) 01065 _v65 = _v64.stamp 01066 _x = _v65 01067 start = end 01068 end += 8 01069 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 01070 start = end 01071 end += 4 01072 (length,) = _struct_I.unpack(str[start:end]) 01073 start = end 01074 end += length 01075 _v64.frame_id = str[start:end] 01076 start = end 01077 end += 4 01078 (length,) = _struct_I.unpack(str[start:end]) 01079 start = end 01080 end += length 01081 val3.ns = str[start:end] 01082 _x = val3 01083 start = end 01084 end += 12 01085 (_x.id, _x.type, _x.action,) = _struct_3i.unpack(str[start:end]) 01086 _v66 = val3.pose 01087 _v67 = _v66.position 01088 _x = _v67 01089 start = end 01090 end += 24 01091 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 01092 _v68 = _v66.orientation 01093 _x = _v68 01094 start = end 01095 end += 32 01096 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 01097 _v69 = val3.scale 01098 _x = _v69 01099 start = end 01100 end += 24 01101 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 01102 _v70 = val3.color 01103 _x = _v70 01104 start = end 01105 end += 16 01106 (_x.r, _x.g, _x.b, _x.a,) = _struct_4f.unpack(str[start:end]) 01107 _v71 = val3.lifetime 01108 _x = _v71 01109 start = end 01110 end += 8 01111 (_x.secs, _x.nsecs,) = _struct_2i.unpack(str[start:end]) 01112 start = end 01113 end += 1 01114 (val3.frame_locked,) = _struct_B.unpack(str[start:end]) 01115 val3.frame_locked = bool(val3.frame_locked) 01116 start = end 01117 end += 4 01118 (length,) = _struct_I.unpack(str[start:end]) 01119 val3.points = [] 01120 for i in range(0, length): 01121 val4 = geometry_msgs.msg.Point() 01122 _x = val4 01123 start = end 01124 end += 24 01125 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 01126 val3.points.append(val4) 01127 start = end 01128 end += 4 01129 (length,) = _struct_I.unpack(str[start:end]) 01130 val3.colors = [] 01131 for i in range(0, length): 01132 val4 = std_msgs.msg.ColorRGBA() 01133 _x = val4 01134 start = end 01135 end += 16 01136 (_x.r, _x.g, _x.b, _x.a,) = _struct_4f.unpack(str[start:end]) 01137 val3.colors.append(val4) 01138 start = end 01139 end += 4 01140 (length,) = _struct_I.unpack(str[start:end]) 01141 start = end 01142 end += length 01143 val3.text = str[start:end] 01144 start = end 01145 end += 4 01146 (length,) = _struct_I.unpack(str[start:end]) 01147 start = end 01148 end += length 01149 val3.mesh_resource = str[start:end] 01150 start = end 01151 end += 1 01152 (val3.mesh_use_embedded_materials,) = _struct_B.unpack(str[start:end]) 01153 val3.mesh_use_embedded_materials = bool(val3.mesh_use_embedded_materials) 01154 val2.markers.append(val3) 01155 start = end 01156 end += 1 01157 (val2.independent_marker_orientation,) = _struct_B.unpack(str[start:end]) 01158 val2.independent_marker_orientation = bool(val2.independent_marker_orientation) 01159 start = end 01160 end += 4 01161 (length,) = _struct_I.unpack(str[start:end]) 01162 start = end 01163 end += length 01164 val2.description = str[start:end] 01165 val1.controls.append(val2) 01166 self.markers.append(val1) 01167 start = end 01168 end += 4 01169 (length,) = _struct_I.unpack(str[start:end]) 01170 self.poses = [] 01171 for i in range(0, length): 01172 val1 = visualization_msgs.msg.InteractiveMarkerPose() 01173 _v72 = val1.header 01174 start = end 01175 end += 4 01176 (_v72.seq,) = _struct_I.unpack(str[start:end]) 01177 _v73 = _v72.stamp 01178 _x = _v73 01179 start = end 01180 end += 8 01181 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 01182 start = end 01183 end += 4 01184 (length,) = _struct_I.unpack(str[start:end]) 01185 start = end 01186 end += length 01187 _v72.frame_id = str[start:end] 01188 _v74 = val1.pose 01189 _v75 = _v74.position 01190 _x = _v75 01191 start = end 01192 end += 24 01193 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 01194 _v76 = _v74.orientation 01195 _x = _v76 01196 start = end 01197 end += 32 01198 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 01199 start = end 01200 end += 4 01201 (length,) = _struct_I.unpack(str[start:end]) 01202 start = end 01203 end += length 01204 val1.name = str[start:end] 01205 self.poses.append(val1) 01206 start = end 01207 end += 4 01208 (length,) = _struct_I.unpack(str[start:end]) 01209 self.erases = [] 01210 for i in range(0, length): 01211 start = end 01212 end += 4 01213 (length,) = _struct_I.unpack(str[start:end]) 01214 start = end 01215 end += length 01216 val1 = str[start:end] 01217 self.erases.append(val1) 01218 return self 01219 except struct.error as e: 01220 raise roslib.message.DeserializationError(e) #most likely buffer underfill 01221 01222 _struct_I = roslib.message.struct_I 01223 _struct_B = struct.Struct("<B") 01224 _struct_f = struct.Struct("<f") 01225 _struct_2i = struct.Struct("<2i") 01226 _struct_3i = struct.Struct("<3i") 01227 _struct_QB = struct.Struct("<QB") 01228 _struct_4f = struct.Struct("<4f") 01229 _struct_3B = struct.Struct("<3B") 01230 _struct_4d = struct.Struct("<4d") 01231 _struct_2I = struct.Struct("<2I") 01232 _struct_3d = struct.Struct("<3d")