Class: Visualization_msgs::InteractiveMarkerInit

Inherits:
ROS::Message
  • Object
show all
Defined in:
lib/visualization_msgs/InteractiveMarkerInit.rb

Constant Summary collapse

@@struct_C =
::ROS::Struct.new("C")
@@struct_f =
::ROS::Struct.new("f")
@@struct_l2 =
::ROS::Struct.new("l2")
@@struct_Q =
::ROS::Struct.new("Q")
@@struct_l3 =
::ROS::Struct.new("l3")
@@struct_f4 =
::ROS::Struct.new("f4")
@@struct_C3 =
::ROS::Struct.new("C3")
@@struct_d4 =
::ROS::Struct.new("d4")
@@struct_L2 =
::ROS::Struct.new("L2")
@@struct_d3 =
::ROS::Struct.new("d3")
@@struct_L =
::ROS::Struct.new("L")
@@slot_types =
['string','uint64','visualization_msgs/InteractiveMarker[]']

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args = {}) ⇒ InteractiveMarkerInit

Constructor. You can set the default values using keyword operators.

Parameters:

  • args (Hash) (defaults to: {})

    keyword for initializing values

Options Hash (args):

  • :server_id (string)

    initialize value

  • :seq_num (uint64)

    initialize value

  • :markers (visualization_msgs/InteractiveMarker[])

    initialize value



330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
# File 'lib/visualization_msgs/InteractiveMarkerInit.rb', line 330

def initialize(args={})
  # message fields cannot be None, assign default values for those that are
  if args[:server_id]
    @server_id = args[:server_id]
  else
    @server_id = ''
  end
  if args[:seq_num]
    @seq_num = args[:seq_num]
  else
    @seq_num = 0
  end
  if args[:markers]
    @markers = args[:markers]
  else
    @markers = []
  end
end

Instance Attribute Details

#markersObject

Returns the value of attribute markers.



308
309
310
# File 'lib/visualization_msgs/InteractiveMarkerInit.rb', line 308

def markers
  @markers
end

#seq_numObject

Returns the value of attribute seq_num.



308
309
310
# File 'lib/visualization_msgs/InteractiveMarkerInit.rb', line 308

def seq_num
  @seq_num
end

#server_idObject

Returns the value of attribute server_id.



308
309
310
# File 'lib/visualization_msgs/InteractiveMarkerInit.rb', line 308

def server_id
  @server_id
end

Class Method Details

.md5sumObject



19
20
21
# File 'lib/visualization_msgs/InteractiveMarkerInit.rb', line 19

def self.md5sum
  "467a93e72a544fd966aafe47c72160b7"
end

.typeObject



23
24
25
# File 'lib/visualization_msgs/InteractiveMarkerInit.rb', line 23

def self.type
  "visualization_msgs/InteractiveMarkerInit"
end

Instance Method Details

#_get_typesString

internal API method

Returns:

  • (String)

    Message type string.



351
352
353
# File 'lib/visualization_msgs/InteractiveMarkerInit.rb', line 351

def _get_types
  @slot_types
end

#deserialize(str) ⇒ Object

unpack serialized message in str into this message instance

@param [String] str: byte array of serialized message


479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
# File 'lib/visualization_msgs/InteractiveMarkerInit.rb', line 479

def deserialize(str)

  begin
    end_point = 0
    start = end_point
    end_point += 4
    (length,) = @@struct_L.unpack(str[start..(end_point-1)])
    start = end_point
    end_point += length
    @server_id = str[start..(end_point-1)]
    start = end_point
    end_point += ROS::Struct::calc_size('Q')
    (@seq_num,) = @@struct_Q.unpack(str[start..(end_point-1)])
    start = end_point
    end_point += 4
    (length,) = @@struct_L.unpack(str[start..(end_point-1)])
    @markers = []
    length.times do
      val1 = Visualization_msgs::InteractiveMarker.new
      _v129 = val1.header
      start = end_point
      end_point += ROS::Struct::calc_size('L')
      (_v129.seq,) = @@struct_L.unpack(str[start..(end_point-1)])
      _v130 = _v129.stamp
      _x = _v130
      start = end_point
      end_point += ROS::Struct::calc_size('L2')
      (_x.secs, _x.nsecs,) = @@struct_L2.unpack(str[start..(end_point-1)])
      start = end_point
      end_point += 4
      (length,) = @@struct_L.unpack(str[start..(end_point-1)])
      start = end_point
      end_point += length
      _v129.frame_id = str[start..(end_point-1)]
      _v131 = val1.pose
      _v132 = _v131.position
      _x = _v132
      start = end_point
      end_point += ROS::Struct::calc_size('d3')
      (_x.x, _x.y, _x.z,) = @@struct_d3.unpack(str[start..(end_point-1)])
      _v133 = _v131.orientation
      _x = _v133
      start = end_point
      end_point += ROS::Struct::calc_size('d4')
      (_x.x, _x.y, _x.z, _x.w,) = @@struct_d4.unpack(str[start..(end_point-1)])
      start = end_point
      end_point += 4
      (length,) = @@struct_L.unpack(str[start..(end_point-1)])
      start = end_point
      end_point += length
      val1.name = str[start..(end_point-1)]
      start = end_point
      end_point += 4
      (length,) = @@struct_L.unpack(str[start..(end_point-1)])
      start = end_point
      end_point += length
      val1.description = str[start..(end_point-1)]
      start = end_point
      end_point += ROS::Struct::calc_size('f')
      (val1.scale,) = @@struct_f.unpack(str[start..(end_point-1)])
      start = end_point
      end_point += 4
      (length,) = @@struct_L.unpack(str[start..(end_point-1)])
      val1.menu_entries = []
      length.times do
        val2 = Visualization_msgs::MenuEntry.new
        _x = val2
        start = end_point
        end_point += ROS::Struct::calc_size('L2')
        (_x.id, _x.parent_id,) = @@struct_L2.unpack(str[start..(end_point-1)])
        start = end_point
        end_point += 4
        (length,) = @@struct_L.unpack(str[start..(end_point-1)])
        start = end_point
        end_point += length
        val2.title = str[start..(end_point-1)]
        start = end_point
        end_point += 4
        (length,) = @@struct_L.unpack(str[start..(end_point-1)])
        start = end_point
        end_point += length
        val2.command = str[start..(end_point-1)]
        start = end_point
        end_point += ROS::Struct::calc_size('C')
        (val2.command_type,) = @@struct_C.unpack(str[start..(end_point-1)])
        val1.menu_entries.push(val2)
      end
      start = end_point
      end_point += 4
      (length,) = @@struct_L.unpack(str[start..(end_point-1)])
      val1.controls = []
      length.times do
        val2 = Visualization_msgs::InteractiveMarkerControl.new
        start = end_point
        end_point += 4
        (length,) = @@struct_L.unpack(str[start..(end_point-1)])
        start = end_point
        end_point += length
        val2.name = str[start..(end_point-1)]
        _v134 = val2.orientation
        _x = _v134
        start = end_point
        end_point += ROS::Struct::calc_size('d4')
        (_x.x, _x.y, _x.z, _x.w,) = @@struct_d4.unpack(str[start..(end_point-1)])
        _x = val2
        start = end_point
        end_point += ROS::Struct::calc_size('C3')
        (_x.orientation_mode, _x.interaction_mode, _x.always_visible,) = @@struct_C3.unpack(str[start..(end_point-1)])
        val2.always_visible = bool(val2.always_visible)
        start = end_point
        end_point += 4
        (length,) = @@struct_L.unpack(str[start..(end_point-1)])
        val2.markers = []
        length.times do
          val3 = Visualization_msgs::Marker.new
          _v135 = val3.header
          start = end_point
          end_point += ROS::Struct::calc_size('L')
          (_v135.seq,) = @@struct_L.unpack(str[start..(end_point-1)])
          _v136 = _v135.stamp
          _x = _v136
          start = end_point
          end_point += ROS::Struct::calc_size('L2')
          (_x.secs, _x.nsecs,) = @@struct_L2.unpack(str[start..(end_point-1)])
          start = end_point
          end_point += 4
          (length,) = @@struct_L.unpack(str[start..(end_point-1)])
          start = end_point
          end_point += length
          _v135.frame_id = str[start..(end_point-1)]
          start = end_point
          end_point += 4
          (length,) = @@struct_L.unpack(str[start..(end_point-1)])
          start = end_point
          end_point += length
          val3.ns = str[start..(end_point-1)]
          _x = val3
          start = end_point
          end_point += ROS::Struct::calc_size('l3')
          (_x.id, _x.type, _x.action,) = @@struct_l3.unpack(str[start..(end_point-1)])
          _v137 = val3.pose
          _v138 = _v137.position
          _x = _v138
          start = end_point
          end_point += ROS::Struct::calc_size('d3')
          (_x.x, _x.y, _x.z,) = @@struct_d3.unpack(str[start..(end_point-1)])
          _v139 = _v137.orientation
          _x = _v139
          start = end_point
          end_point += ROS::Struct::calc_size('d4')
          (_x.x, _x.y, _x.z, _x.w,) = @@struct_d4.unpack(str[start..(end_point-1)])
          _v140 = val3.scale
          _x = _v140
          start = end_point
          end_point += ROS::Struct::calc_size('d3')
          (_x.x, _x.y, _x.z,) = @@struct_d3.unpack(str[start..(end_point-1)])
          _v141 = val3.color
          _x = _v141
          start = end_point
          end_point += ROS::Struct::calc_size('f4')
          (_x.r, _x.g, _x.b, _x.a,) = @@struct_f4.unpack(str[start..(end_point-1)])
          _v142 = val3.lifetime
          _x = _v142
          start = end_point
          end_point += ROS::Struct::calc_size('l2')
          (_x.secs, _x.nsecs,) = @@struct_l2.unpack(str[start..(end_point-1)])
          start = end_point
          end_point += ROS::Struct::calc_size('C')
          (val3.frame_locked,) = @@struct_C.unpack(str[start..(end_point-1)])
          val3.frame_locked = bool(val3.frame_locked)
          start = end_point
          end_point += 4
          (length,) = @@struct_L.unpack(str[start..(end_point-1)])
          val3.points = []
          length.times do
            val4 = Geometry_msgs::Point.new
            _x = val4
            start = end_point
            end_point += ROS::Struct::calc_size('d3')
            (_x.x, _x.y, _x.z,) = @@struct_d3.unpack(str[start..(end_point-1)])
            val3.points.push(val4)
          end
          start = end_point
          end_point += 4
          (length,) = @@struct_L.unpack(str[start..(end_point-1)])
          val3.colors = []
          length.times do
            val4 = Std_msgs::ColorRGBA.new
            _x = val4
            start = end_point
            end_point += ROS::Struct::calc_size('f4')
            (_x.r, _x.g, _x.b, _x.a,) = @@struct_f4.unpack(str[start..(end_point-1)])
            val3.colors.push(val4)
          end
          start = end_point
          end_point += 4
          (length,) = @@struct_L.unpack(str[start..(end_point-1)])
          start = end_point
          end_point += length
          val3.text = str[start..(end_point-1)]
          start = end_point
          end_point += 4
          (length,) = @@struct_L.unpack(str[start..(end_point-1)])
          start = end_point
          end_point += length
          val3.mesh_resource = str[start..(end_point-1)]
          start = end_point
          end_point += ROS::Struct::calc_size('C')
          (val3.mesh_use_embedded_materials,) = @@struct_C.unpack(str[start..(end_point-1)])
          val3.mesh_use_embedded_materials = bool(val3.mesh_use_embedded_materials)
          val2.markers.push(val3)
        end
        start = end_point
        end_point += ROS::Struct::calc_size('C')
        (val2.independent_marker_orientation,) = @@struct_C.unpack(str[start..(end_point-1)])
        val2.independent_marker_orientation = bool(val2.independent_marker_orientation)
        start = end_point
        end_point += 4
        (length,) = @@struct_L.unpack(str[start..(end_point-1)])
        start = end_point
        end_point += length
        val2.description = str[start..(end_point-1)]
        val1.controls.push(val2)
      end
      @markers.push(val1)
    end
    return self
  rescue => exception
    raise "message DeserializationError: #{exception}" #most likely buffer underfill
  end
end

#has_header?Boolean

Returns:

  • (Boolean)


27
28
29
# File 'lib/visualization_msgs/InteractiveMarkerInit.rb', line 27

def has_header?
  false
end

#message_definitionObject



31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
# File 'lib/visualization_msgs/InteractiveMarkerInit.rb', line 31

def message_definition
  "# Identifying string. Must be unique in the topic namespace
# that this server works on.
string server_id

# Sequence number.
# The client will use this to detect if it has missed a subsequent
# update.  Every update message will have the same sequence number as
# an init message.  Clients will likely want to unsubscribe from the
# init topic after a successful initialization to avoid receiving
# duplicate data.
uint64 seq_num

# All markers.
InteractiveMarker[] markers

================================================================================
MSG: visualization_msgs/InteractiveMarker
# Time/frame info.
# If header.time is set to 0, the marker will be retransformed into
# its frame on each timestep. You will receive the pose feedback
# in the same frame.
# Otherwise, you might receive feedback in a different frame.
# For rviz, this will be the current 'fixed frame' set by the user.
Header header

# Initial pose. Also, defines the pivot point for rotations.
geometry_msgs/Pose pose

# Identifying string. Must be globally unique in
# the topic that this message is sent through.
string name

# Short description (< 40 characters).
string description

# Scale to be used for default controls (default=1).
float32 scale

# All menu and submenu entries associated with this marker.
MenuEntry[] menu_entries

# List of controls displayed for this marker.
InteractiveMarkerControl[] controls

================================================================================
MSG: std_msgs/Header
# Standard metadata for higher-level stamped data types.
# This is generally used to communicate timestamped data 
# in a particular coordinate frame.
# 
# sequence ID: consecutively increasing ID 
uint32 seq
#Two-integer timestamp that is expressed as:
# * stamp.secs: seconds (stamp_secs) since epoch
# * stamp.nsecs: nanoseconds since stamp_secs
# time-handling sugar is provided by the client library
time stamp
#Frame this data is associated with
# 0: no frame
# 1: global frame
string frame_id

================================================================================
MSG: geometry_msgs/Pose
# A representation of pose in free space, composed of postion and orientation. 
Point position
Quaternion orientation

================================================================================
MSG: geometry_msgs/Point
# This contains the position of a point in free space
float64 x
float64 y
float64 z

================================================================================
MSG: geometry_msgs/Quaternion
# This represents an orientation in free space in quaternion form.

float64 x
float64 y
float64 z
float64 w

================================================================================
MSG: visualization_msgs/MenuEntry
# MenuEntry message.

# Each InteractiveMarker message has an array of MenuEntry messages.
# A collection of MenuEntries together describe a
# menu/submenu/subsubmenu/etc tree, though they are stored in a flat
# array.  The tree structure is represented by giving each menu entry
# an ID number and a \"parent_id\" field.  Top-level entries are the
# ones with parent_id = 0.  Menu entries are ordered within their
# level the same way they are ordered in the containing array.  Parent
# entries must appear before their children.

# Example:
# - id = 3
#   parent_id = 0
#   title = \"fun\"
# - id = 2
#   parent_id = 0
#   title = \"robot\"
# - id = 4
#   parent_id = 2
#   title = \"pr2\"
# - id = 5
#   parent_id = 2
#   title = \"turtle\"
#
# Gives a menu tree like this:
#  - fun
#  - robot
#    - pr2
#    - turtle

# ID is a number for each menu entry.  Must be unique within the
# control, and should never be 0.
uint32 id

# ID of the parent of this menu entry, if it is a submenu.  If this
# menu entry is a top-level entry, set parent_id to 0.
uint32 parent_id

# menu / entry title
string title

# Arguments to command indicated by command_type (below)
string command

# Command_type stores the type of response desired when this menu
# entry is clicked.
# FEEDBACK: send an InteractiveMarkerFeedback message with menu_entry_id set to this entry's id.
# ROSRUN: execute \"rosrun\" with arguments given in the command field (above).
# ROSLAUNCH: execute \"roslaunch\" with arguments given in the command field (above).
uint8 FEEDBACK=0
uint8 ROSRUN=1
uint8 ROSLAUNCH=2
uint8 command_type

================================================================================
MSG: visualization_msgs/InteractiveMarkerControl
# Represents a control that is to be displayed together with an interactive marker

# Identifying string for this control.
# You need to assign a unique value to this to receive feedback from the GUI
# on what actions the user performs on this control (e.g. a button click).
string name


# Defines the local coordinate frame (relative to the pose of the parent
# interactive marker) in which is being rotated and translated.
# Default: Identity
geometry_msgs/Quaternion orientation


# Orientation mode: controls how orientation changes.
# INHERIT: Follow orientation of interactive marker
# FIXED: Keep orientation fixed at initial state
# VIEW_FACING: Align y-z plane with screen (x: forward, y:left, z:up).
uint8 INHERIT = 0 
uint8 FIXED = 1
uint8 VIEW_FACING = 2

uint8 orientation_mode

# Interaction mode for this control
# 
# NONE: This control is only meant for visualization; no context menu.
# MENU: Like NONE, but right-click menu is active.
# BUTTON: Element can be left-clicked.
# MOVE_AXIS: Translate along local x-axis.
# MOVE_PLANE: Translate in local y-z plane.
# ROTATE_AXIS: Rotate around local x-axis.
# MOVE_ROTATE: Combines MOVE_PLANE and ROTATE_AXIS.
uint8 NONE = 0 
uint8 MENU = 1
uint8 BUTTON = 2
uint8 MOVE_AXIS = 3 
uint8 MOVE_PLANE = 4
uint8 ROTATE_AXIS = 5
uint8 MOVE_ROTATE = 6

uint8 interaction_mode


# If true, the contained markers will also be visible
# when the gui is not in interactive mode.
bool always_visible


# Markers to be displayed as custom visual representation.
# Leave this empty to use the default control handles.
#
# Note: 
# - The markers can be defined in an arbitrary coordinate frame,
#   but will be transformed into the local frame of the interactive marker.
# - If the header of a marker is empty, its pose will be interpreted as 
#   relative to the pose of the parent interactive marker.
Marker[] markers


# In VIEW_FACING mode, set this to true if you don't want the markers
# to be aligned with the camera view point. The markers will show up
# as in INHERIT mode.
bool independent_marker_orientation


# Short description (< 40 characters) of what this control does,
# e.g. \"Move the robot\". 
# Default: A generic description based on the interaction mode
string description

================================================================================
MSG: visualization_msgs/Marker
# 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

uint8 ARROW=0
uint8 CUBE=1
uint8 SPHERE=2
uint8 CYLINDER=3
uint8 LINE_STRIP=4
uint8 LINE_LIST=5
uint8 CUBE_LIST=6
uint8 SPHERE_LIST=7
uint8 POINTS=8
uint8 TEXT_VIEW_FACING=9
uint8 MESH_RESOURCE=10
uint8 TRIANGLE_LIST=11

uint8 ADD=0
uint8 MODIFY=0
uint8 DELETE=2

Header header                        # header for time/frame information
string ns                            # Namespace to place this object in... used in conjunction with id to create a unique name for the object
int32 id 		                         # object ID useful in conjunction with the namespace for manipulating and deleting the object later
int32 type 		                       # Type of object
int32 action 	                       # 0 add/modify an object, 1 (deprecated), 2 deletes an object
geometry_msgs/Pose pose                 # Pose of the object
geometry_msgs/Vector3 scale             # Scale of the object 1,1,1 means default (usually 1 meter square)
std_msgs/ColorRGBA color             # Color [0.0-1.0]
duration lifetime                    # How long the object should last before being automatically deleted.  0 means forever
bool frame_locked                    # If this marker should be frame-locked, i.e. retransformed into its frame every timestep

#Only used if the type specified has some use for them (eg. POINTS, LINE_STRIP, ...)
geometry_msgs/Point[] points
#Only used if the type specified has some use for them (eg. POINTS, LINE_STRIP, ...)
#number of colors must either be 0 or equal to the number of points
#NOTE: alpha is not yet used
std_msgs/ColorRGBA[] colors

# NOTE: only used for text markers
string text

# NOTE: only used for MESH_RESOURCE markers
string mesh_resource
bool mesh_use_embedded_materials

================================================================================
MSG: geometry_msgs/Vector3
# This represents a vector in free space. 

float64 x
float64 y
float64 z
================================================================================
MSG: std_msgs/ColorRGBA
float32 r
float32 g
float32 b
float32 a

"
end

#serialize(buff) ⇒ Object

serialize message into buffer

Parameters:

  • buff (IO)

    buffer



357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
# File 'lib/visualization_msgs/InteractiveMarkerInit.rb', line 357

def serialize(buff)
  begin
    _x = @server_id
    length = _x.length
    buff.write([length, _x].pack("La#{length}"))
    buff.write(@@struct_Q.pack(@seq_num))
    length = @markers.length
    buff.write(@@struct_L.pack(length))
    for val1 in @markers
      _v115 = val1.header
      buff.write(@@struct_L.pack(_v115.seq))
      _v116 = _v115.stamp
      _x = _v116
      buff.write(@@struct_L2.pack(_x.secs, _x.nsecs))
      _x = _v115.frame_id
      length = _x.length
      buff.write([length, _x].pack("La#{length}"))
      _v117 = val1.pose
      _v118 = _v117.position
      _x = _v118
      buff.write(@@struct_d3.pack(_x.x, _x.y, _x.z))
      _v119 = _v117.orientation
      _x = _v119
      buff.write(@@struct_d4.pack(_x.x, _x.y, _x.z, _x.w))
      _x = val1.name
      length = _x.length
      buff.write([length, _x].pack("La#{length}"))
      _x = val1.description
      length = _x.length
      buff.write([length, _x].pack("La#{length}"))
      buff.write(@@struct_f.pack(val1.scale))
      length = val1.menu_entries.length
      buff.write(@@struct_L.pack(length))
      for val2 in val1.menu_entries
        _x = val2
        buff.write(@@struct_L2.pack(_x.id, _x.parent_id))
        _x = val2.title
        length = _x.length
        buff.write([length, _x].pack("La#{length}"))
        _x = val2.command
        length = _x.length
        buff.write([length, _x].pack("La#{length}"))
        buff.write(@@struct_C.pack(val2.command_type))
      end
      length = val1.controls.length
      buff.write(@@struct_L.pack(length))
      for val2 in val1.controls
        _x = val2.name
        length = _x.length
        buff.write([length, _x].pack("La#{length}"))
        _v120 = val2.orientation
        _x = _v120
        buff.write(@@struct_d4.pack(_x.x, _x.y, _x.z, _x.w))
        _x = val2
        buff.write(@@struct_C3.pack(_x.orientation_mode, _x.interaction_mode, _x.always_visible))
        length = val2.markers.length
        buff.write(@@struct_L.pack(length))
        for val3 in val2.markers
          _v121 = val3.header
          buff.write(@@struct_L.pack(_v121.seq))
          _v122 = _v121.stamp
          _x = _v122
          buff.write(@@struct_L2.pack(_x.secs, _x.nsecs))
          _x = _v121.frame_id
          length = _x.length
          buff.write([length, _x].pack("La#{length}"))
          _x = val3.ns
          length = _x.length
          buff.write([length, _x].pack("La#{length}"))
          _x = val3
          buff.write(@@struct_l3.pack(_x.id, _x.type, _x.action))
          _v123 = val3.pose
          _v124 = _v123.position
          _x = _v124
          buff.write(@@struct_d3.pack(_x.x, _x.y, _x.z))
          _v125 = _v123.orientation
          _x = _v125
          buff.write(@@struct_d4.pack(_x.x, _x.y, _x.z, _x.w))
          _v126 = val3.scale
          _x = _v126
          buff.write(@@struct_d3.pack(_x.x, _x.y, _x.z))
          _v127 = val3.color
          _x = _v127
          buff.write(@@struct_f4.pack(_x.r, _x.g, _x.b, _x.a))
          _v128 = val3.lifetime
          _x = _v128
          buff.write(@@struct_l2.pack(_x.secs, _x.nsecs))
          buff.write(@@struct_C.pack(val3.frame_locked))
          length = val3.points.length
          buff.write(@@struct_L.pack(length))
          for val4 in val3.points
            _x = val4
            buff.write(@@struct_d3.pack(_x.x, _x.y, _x.z))
          end
          length = val3.colors.length
          buff.write(@@struct_L.pack(length))
          for val4 in val3.colors
            _x = val4
            buff.write(@@struct_f4.pack(_x.r, _x.g, _x.b, _x.a))
          end
          _x = val3.text
          length = _x.length
          buff.write([length, _x].pack("La#{length}"))
          _x = val3.mesh_resource
          length = _x.length
          buff.write([length, _x].pack("La#{length}"))
          buff.write(@@struct_C.pack(val3.mesh_use_embedded_materials))
        end
        buff.write(@@struct_C.pack(val2.independent_marker_orientation))
        _x = val2.description
        length = _x.length
        buff.write([length, _x].pack("La#{length}"))
      end
    end
  rescue => exception
    raise "some erro in serialize: #{exception}"

  end
end