Class: Visualization_msgs::InteractiveMarker

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

Constant Summary collapse

@@struct_d7 =
::ROS::Struct.new("d7")
@@struct_f =
::ROS::Struct.new("f")
@@struct_l3 =
::ROS::Struct.new("l3")
@@struct_l2 =
::ROS::Struct.new("l2")
@@struct_L3 =
::ROS::Struct.new("L3")
@@struct_C =
::ROS::Struct.new("C")
@@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 =
['Header','geometry_msgs/Pose','string','string','float32','visualization_msgs/MenuEntry[]','visualization_msgs/InteractiveMarkerControl[]']

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args = {}) ⇒ InteractiveMarker

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

Parameters:

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

    keyword for initializing values

Options Hash (args):

  • :header (Header)

    initialize value

  • :pose (geometry_msgs/Pose)

    initialize value

  • :name (string)

    initialize value

  • :description (string)

    initialize value

  • :scale (float32)

    initialize value

  • :menu_entries (visualization_msgs/MenuEntry[])

    initialize value

  • :controls (visualization_msgs/InteractiveMarkerControl[])

    initialize value



317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
# File 'lib/visualization_msgs/InteractiveMarker.rb', line 317

def initialize(args={})
  # message fields cannot be None, assign default values for those that are
  if args[:header]
    @header = args[:header]
  else
    @header = Std_msgs::Header.new
  end
  if args[:pose]
    @pose = args[:pose]
  else
    @pose = Geometry_msgs::Pose.new
  end
  if args[:name]
    @name = args[:name]
  else
    @name = ''
  end
  if args[:description]
    @description = args[:description]
  else
    @description = ''
  end
  if args[:scale]
    @scale = args[:scale]
  else
    @scale = 0.0
  end
  if args[:menu_entries]
    @menu_entries = args[:menu_entries]
  else
    @menu_entries = []
  end
  if args[:controls]
    @controls = args[:controls]
  else
    @controls = []
  end
end

Instance Attribute Details

#controlsObject

Returns the value of attribute controls.



290
291
292
# File 'lib/visualization_msgs/InteractiveMarker.rb', line 290

def controls
  @controls
end

#descriptionObject

Returns the value of attribute description.



290
291
292
# File 'lib/visualization_msgs/InteractiveMarker.rb', line 290

def description
  @description
end

#headerObject

Returns the value of attribute header.



290
291
292
# File 'lib/visualization_msgs/InteractiveMarker.rb', line 290

def header
  @header
end

Returns the value of attribute menu_entries.



290
291
292
# File 'lib/visualization_msgs/InteractiveMarker.rb', line 290

def menu_entries
  @menu_entries
end

#nameObject

Returns the value of attribute name.



290
291
292
# File 'lib/visualization_msgs/InteractiveMarker.rb', line 290

def name
  @name
end

#poseObject

Returns the value of attribute pose.



290
291
292
# File 'lib/visualization_msgs/InteractiveMarker.rb', line 290

def pose
  @pose
end

#scaleObject

Returns the value of attribute scale.



290
291
292
# File 'lib/visualization_msgs/InteractiveMarker.rb', line 290

def scale
  @scale
end

Class Method Details

.md5sumObject



18
19
20
# File 'lib/visualization_msgs/InteractiveMarker.rb', line 18

def self.md5sum
  "97d10a9c6371692b469f5814d4156b68"
end

.typeObject



22
23
24
# File 'lib/visualization_msgs/InteractiveMarker.rb', line 22

def self.type
  "visualization_msgs/InteractiveMarker"
end

Instance Method Details

#_get_typesString

internal API method

Returns:

  • (String)

    Message type string.



358
359
360
# File 'lib/visualization_msgs/InteractiveMarker.rb', line 358

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


468
469
470
471
472
473
474
475
476
477
478
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
# File 'lib/visualization_msgs/InteractiveMarker.rb', line 468

def deserialize(str)

  begin
    if @header == nil
      @header = Std_msgs::Header.new
    end
    if @pose == nil
      @pose = Geometry_msgs::Pose.new
    end
    end_point = 0
    start = end_point
    end_point += ROS::Struct::calc_size('L3')
    (@header.seq, @header.stamp.secs, @header.stamp.nsecs,) = @@struct_L3.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
    @header.frame_id = str[start..(end_point-1)]
    start = end_point
    end_point += ROS::Struct::calc_size('d7')
    (@pose.position.x, @pose.position.y, @pose.position.z, @pose.orientation.x, @pose.orientation.y, @pose.orientation.z, @pose.orientation.w,) = @@struct_d7.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
    @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
    @description = str[start..(end_point-1)]
    start = end_point
    end_point += ROS::Struct::calc_size('f')
    (@scale,) = @@struct_f.unpack(str[start..(end_point-1)])
    start = end_point
    end_point += 4
    (length,) = @@struct_L.unpack(str[start..(end_point-1)])
    @menu_entries = []
    length.times do
      val1 = Visualization_msgs::MenuEntry.new
      _x = val1
      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
      val1.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
      val1.command = str[start..(end_point-1)]
      start = end_point
      end_point += ROS::Struct::calc_size('C')
      (val1.command_type,) = @@struct_C.unpack(str[start..(end_point-1)])
      @menu_entries.push(val1)
    end
    start = end_point
    end_point += 4
    (length,) = @@struct_L.unpack(str[start..(end_point-1)])
    @controls = []
    length.times do
      val1 = 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
      val1.name = str[start..(end_point-1)]
      _v52 = val1.orientation
      _x = _v52
      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 = val1
      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)])
      val1.always_visible = bool(val1.always_visible)
      start = end_point
      end_point += 4
      (length,) = @@struct_L.unpack(str[start..(end_point-1)])
      val1.markers = []
      length.times do
        val2 = Visualization_msgs::Marker.new
        _v53 = val2.header
        start = end_point
        end_point += ROS::Struct::calc_size('L')
        (_v53.seq,) = @@struct_L.unpack(str[start..(end_point-1)])
        _v54 = _v53.stamp
        _x = _v54
        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
        _v53.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
        val2.ns = str[start..(end_point-1)]
        _x = val2
        start = end_point
        end_point += ROS::Struct::calc_size('l3')
        (_x.id, _x.type, _x.action,) = @@struct_l3.unpack(str[start..(end_point-1)])
        _v55 = val2.pose
        _v56 = _v55.position
        _x = _v56
        start = end_point
        end_point += ROS::Struct::calc_size('d3')
        (_x.x, _x.y, _x.z,) = @@struct_d3.unpack(str[start..(end_point-1)])
        _v57 = _v55.orientation
        _x = _v57
        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)])
        _v58 = val2.scale
        _x = _v58
        start = end_point
        end_point += ROS::Struct::calc_size('d3')
        (_x.x, _x.y, _x.z,) = @@struct_d3.unpack(str[start..(end_point-1)])
        _v59 = val2.color
        _x = _v59
        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)])
        _v60 = val2.lifetime
        _x = _v60
        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')
        (val2.frame_locked,) = @@struct_C.unpack(str[start..(end_point-1)])
        val2.frame_locked = bool(val2.frame_locked)
        start = end_point
        end_point += 4
        (length,) = @@struct_L.unpack(str[start..(end_point-1)])
        val2.points = []
        length.times do
          val3 = Geometry_msgs::Point.new
          _x = val3
          start = end_point
          end_point += ROS::Struct::calc_size('d3')
          (_x.x, _x.y, _x.z,) = @@struct_d3.unpack(str[start..(end_point-1)])
          val2.points.push(val3)
        end
        start = end_point
        end_point += 4
        (length,) = @@struct_L.unpack(str[start..(end_point-1)])
        val2.colors = []
        length.times do
          val3 = Std_msgs::ColorRGBA.new
          _x = val3
          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)])
          val2.colors.push(val3)
        end
        start = end_point
        end_point += 4
        (length,) = @@struct_L.unpack(str[start..(end_point-1)])
        start = end_point
        end_point += length
        val2.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
        val2.mesh_resource = str[start..(end_point-1)]
        start = end_point
        end_point += ROS::Struct::calc_size('C')
        (val2.mesh_use_embedded_materials,) = @@struct_C.unpack(str[start..(end_point-1)])
        val2.mesh_use_embedded_materials = bool(val2.mesh_use_embedded_materials)
        val1.markers.push(val2)
      end
      start = end_point
      end_point += ROS::Struct::calc_size('C')
      (val1.independent_marker_orientation,) = @@struct_C.unpack(str[start..(end_point-1)])
      val1.independent_marker_orientation = bool(val1.independent_marker_orientation)
      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)]
      @controls.push(val1)
    end
    return self
  rescue => exception
    raise "message DeserializationError: #{exception}" #most likely buffer underfill
  end
end

#has_header?Boolean

Returns:

  • (Boolean)


26
27
28
# File 'lib/visualization_msgs/InteractiveMarker.rb', line 26

def has_header?
  true
end

#message_definitionObject



30
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
# File 'lib/visualization_msgs/InteractiveMarker.rb', line 30

def message_definition
  "# 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



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
# File 'lib/visualization_msgs/InteractiveMarker.rb', line 364

def serialize(buff)
  begin
    buff.write(@@struct_L3.pack(@header.seq, @header.stamp.secs, @header.stamp.nsecs))
    _x = @header.frame_id
    length = _x.length
    buff.write([length, _x].pack("La#{length}"))
    buff.write(@@struct_d7.pack(@pose.position.x, @pose.position.y, @pose.position.z, @pose.orientation.x, @pose.orientation.y, @pose.orientation.z, @pose.orientation.w))
    _x = @name
    length = _x.length
    buff.write([length, _x].pack("La#{length}"))
    _x = @description
    length = _x.length
    buff.write([length, _x].pack("La#{length}"))
    buff.write(@@struct_f.pack(@scale))
    length = @menu_entries.length
    buff.write(@@struct_L.pack(length))
    for val1 in @menu_entries
      _x = val1
      buff.write(@@struct_L2.pack(_x.id, _x.parent_id))
      _x = val1.title
      length = _x.length
      buff.write([length, _x].pack("La#{length}"))
      _x = val1.command
      length = _x.length
      buff.write([length, _x].pack("La#{length}"))
      buff.write(@@struct_C.pack(val1.command_type))
    end
    length = @controls.length
    buff.write(@@struct_L.pack(length))
    for val1 in @controls
      _x = val1.name
      length = _x.length
      buff.write([length, _x].pack("La#{length}"))
      _v43 = val1.orientation
      _x = _v43
      buff.write(@@struct_d4.pack(_x.x, _x.y, _x.z, _x.w))
      _x = val1
      buff.write(@@struct_C3.pack(_x.orientation_mode, _x.interaction_mode, _x.always_visible))
      length = val1.markers.length
      buff.write(@@struct_L.pack(length))
      for val2 in val1.markers
        _v44 = val2.header
        buff.write(@@struct_L.pack(_v44.seq))
        _v45 = _v44.stamp
        _x = _v45
        buff.write(@@struct_L2.pack(_x.secs, _x.nsecs))
        _x = _v44.frame_id
        length = _x.length
        buff.write([length, _x].pack("La#{length}"))
        _x = val2.ns
        length = _x.length
        buff.write([length, _x].pack("La#{length}"))
        _x = val2
        buff.write(@@struct_l3.pack(_x.id, _x.type, _x.action))
        _v46 = val2.pose
        _v47 = _v46.position
        _x = _v47
        buff.write(@@struct_d3.pack(_x.x, _x.y, _x.z))
        _v48 = _v46.orientation
        _x = _v48
        buff.write(@@struct_d4.pack(_x.x, _x.y, _x.z, _x.w))
        _v49 = val2.scale
        _x = _v49
        buff.write(@@struct_d3.pack(_x.x, _x.y, _x.z))
        _v50 = val2.color
        _x = _v50
        buff.write(@@struct_f4.pack(_x.r, _x.g, _x.b, _x.a))
        _v51 = val2.lifetime
        _x = _v51
        buff.write(@@struct_l2.pack(_x.secs, _x.nsecs))
        buff.write(@@struct_C.pack(val2.frame_locked))
        length = val2.points.length
        buff.write(@@struct_L.pack(length))
        for val3 in val2.points
          _x = val3
          buff.write(@@struct_d3.pack(_x.x, _x.y, _x.z))
        end
        length = val2.colors.length
        buff.write(@@struct_L.pack(length))
        for val3 in val2.colors
          _x = val3
          buff.write(@@struct_f4.pack(_x.r, _x.g, _x.b, _x.a))
        end
        _x = val2.text
        length = _x.length
        buff.write([length, _x].pack("La#{length}"))
        _x = val2.mesh_resource
        length = _x.length
        buff.write([length, _x].pack("La#{length}"))
        buff.write(@@struct_C.pack(val2.mesh_use_embedded_materials))
      end
      buff.write(@@struct_C.pack(val1.independent_marker_orientation))
      _x = val1.description
      length = _x.length
      buff.write([length, _x].pack("La#{length}"))
    end
  rescue => exception
    raise "some erro in serialize: #{exception}"

  end
end