Class: Visualization_msgs::InteractiveMarkerUpdate

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

Constant Summary collapse

KEEP_ALIVE =

Pseudo-constants

0
UPDATE =
1
@@struct_C =
::ROS::Struct.new("C")
@@struct_f =
::ROS::Struct.new("f")
@@struct_l2 =
::ROS::Struct.new("l2")
@@struct_l3 =
::ROS::Struct.new("l3")
@@struct_QC =
::ROS::Struct.new("QC")
@@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','uint8','visualization_msgs/InteractiveMarker[]','visualization_msgs/InteractiveMarkerPose[]','string[]']

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args = {}) ⇒ InteractiveMarkerUpdate

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

  • :type (uint8)

    initialize value

  • :markers (visualization_msgs/InteractiveMarker[])

    initialize value

  • :poses (visualization_msgs/InteractiveMarkerPose[])

    initialize value

  • :erases (string[])

    initialize value



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

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[:type]
    @type = args[:type]
  else
    @type = 0
  end
  if args[:markers]
    @markers = args[:markers]
  else
    @markers = []
  end
  if args[:poses]
    @poses = args[:poses]
  else
    @poses = []
  end
  if args[:erases]
    @erases = args[:erases]
  else
    @erases = []
  end
end

Instance Attribute Details

#erasesObject

Returns the value of attribute erases.



342
343
344
# File 'lib/visualization_msgs/InteractiveMarkerUpdate.rb', line 342

def erases
  @erases
end

#markersObject

Returns the value of attribute markers.



342
343
344
# File 'lib/visualization_msgs/InteractiveMarkerUpdate.rb', line 342

def markers
  @markers
end

#posesObject

Returns the value of attribute poses.



342
343
344
# File 'lib/visualization_msgs/InteractiveMarkerUpdate.rb', line 342

def poses
  @poses
end

#seq_numObject

Returns the value of attribute seq_num.



342
343
344
# File 'lib/visualization_msgs/InteractiveMarkerUpdate.rb', line 342

def seq_num
  @seq_num
end

#server_idObject

Returns the value of attribute server_id.



342
343
344
# File 'lib/visualization_msgs/InteractiveMarkerUpdate.rb', line 342

def server_id
  @server_id
end

#typeObject

Returns the value of attribute type.



342
343
344
# File 'lib/visualization_msgs/InteractiveMarkerUpdate.rb', line 342

def type
  @type
end

Class Method Details

.md5sumObject



20
21
22
# File 'lib/visualization_msgs/InteractiveMarkerUpdate.rb', line 20

def self.md5sum
  "f9687b34e042d26cfd564728fc644bff"
end

.typeObject



24
25
26
# File 'lib/visualization_msgs/InteractiveMarkerUpdate.rb', line 24

def self.type
  "visualization_msgs/InteractiveMarkerUpdate"
end

Instance Method Details

#_get_typesString

internal API method

Returns:

  • (String)

    Message type string.



403
404
405
# File 'lib/visualization_msgs/InteractiveMarkerUpdate.rb', line 403

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


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
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
# File 'lib/visualization_msgs/InteractiveMarkerUpdate.rb', line 559

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('QC')
    (@seq_num, @type,) = @@struct_QC.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
      _v96 = val1.header
      start = end_point
      end_point += ROS::Struct::calc_size('L')
      (_v96.seq,) = @@struct_L.unpack(str[start..(end_point-1)])
      _v97 = _v96.stamp
      _x = _v97
      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
      _v96.frame_id = str[start..(end_point-1)]
      _v98 = val1.pose
      _v99 = _v98.position
      _x = _v99
      start = end_point
      end_point += ROS::Struct::calc_size('d3')
      (_x.x, _x.y, _x.z,) = @@struct_d3.unpack(str[start..(end_point-1)])
      _v100 = _v98.orientation
      _x = _v100
      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)]
        _v101 = val2.orientation
        _x = _v101
        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
          _v102 = val3.header
          start = end_point
          end_point += ROS::Struct::calc_size('L')
          (_v102.seq,) = @@struct_L.unpack(str[start..(end_point-1)])
          _v103 = _v102.stamp
          _x = _v103
          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
          _v102.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)])
          _v104 = val3.pose
          _v105 = _v104.position
          _x = _v105
          start = end_point
          end_point += ROS::Struct::calc_size('d3')
          (_x.x, _x.y, _x.z,) = @@struct_d3.unpack(str[start..(end_point-1)])
          _v106 = _v104.orientation
          _x = _v106
          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)])
          _v107 = val3.scale
          _x = _v107
          start = end_point
          end_point += ROS::Struct::calc_size('d3')
          (_x.x, _x.y, _x.z,) = @@struct_d3.unpack(str[start..(end_point-1)])
          _v108 = val3.color
          _x = _v108
          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)])
          _v109 = val3.lifetime
          _x = _v109
          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
    start = end_point
    end_point += 4
    (length,) = @@struct_L.unpack(str[start..(end_point-1)])
    @poses = []
    length.times do
      val1 = Visualization_msgs::InteractiveMarkerPose.new
      _v110 = val1.header
      start = end_point
      end_point += ROS::Struct::calc_size('L')
      (_v110.seq,) = @@struct_L.unpack(str[start..(end_point-1)])
      _v111 = _v110.stamp
      _x = _v111
      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
      _v110.frame_id = str[start..(end_point-1)]
      _v112 = val1.pose
      _v113 = _v112.position
      _x = _v113
      start = end_point
      end_point += ROS::Struct::calc_size('d3')
      (_x.x, _x.y, _x.z,) = @@struct_d3.unpack(str[start..(end_point-1)])
      _v114 = _v112.orientation
      _x = _v114
      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)]
      @poses.push(val1)
    end
    start = end_point
    end_point += 4
    (length,) = @@struct_L.unpack(str[start..(end_point-1)])
    @erases = []
    length.times do
      start = end_point
      end_point += 4
      (length,) = @@struct_L.unpack(str[start..(end_point-1)])
      start = end_point
      end_point += length
      val1 = str[start..(end_point-1)]
      @erases.push(val1)
    end
    return self
  rescue => exception
    raise "message DeserializationError: #{exception}" #most likely buffer underfill
  end
end

#has_header?Boolean

Returns:

  • (Boolean)


28
29
30
# File 'lib/visualization_msgs/InteractiveMarkerUpdate.rb', line 28

def has_header?
  false
end

#message_definitionObject



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
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
# File 'lib/visualization_msgs/InteractiveMarkerUpdate.rb', line 32

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 an update.
uint64 seq_num

# Type holds the purpose of this message.  It must be one of UPDATE or KEEP_ALIVE.
# UPDATE: Incremental update to previous state. 
#         The sequence number must be 1 higher than for
#         the previous update.
# KEEP_ALIVE: Indicates the that the server is still living.
#             The sequence number does not increase.
#             No payload data should be filled out (markers, poses, or erases).
uint8 KEEP_ALIVE = 0
uint8 UPDATE = 1

uint8 type

#Note: No guarantees on the order of processing.
#      Contents must be kept consistent by sender.

#Markers to be added or updated
InteractiveMarker[] markers

#Poses of markers that should be moved
InteractiveMarkerPose[] poses

#Names of markers to be erased
string[] erases

================================================================================
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

================================================================================
MSG: visualization_msgs/InteractiveMarkerPose
# Time/frame info.
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

"
end

#serialize(buff) ⇒ Object

serialize message into buffer

Parameters:

  • buff (IO)

    buffer



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

def serialize(buff)
  begin
    _x = @server_id
    length = _x.length
    buff.write([length, _x].pack("La#{length}"))
    buff.write(@@struct_QC.pack(@seq_num, @type))
    length = @markers.length
    buff.write(@@struct_L.pack(length))
    for val1 in @markers
      _v77 = val1.header
      buff.write(@@struct_L.pack(_v77.seq))
      _v78 = _v77.stamp
      _x = _v78
      buff.write(@@struct_L2.pack(_x.secs, _x.nsecs))
      _x = _v77.frame_id
      length = _x.length
      buff.write([length, _x].pack("La#{length}"))
      _v79 = val1.pose
      _v80 = _v79.position
      _x = _v80
      buff.write(@@struct_d3.pack(_x.x, _x.y, _x.z))
      _v81 = _v79.orientation
      _x = _v81
      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}"))
        _v82 = val2.orientation
        _x = _v82
        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
          _v83 = val3.header
          buff.write(@@struct_L.pack(_v83.seq))
          _v84 = _v83.stamp
          _x = _v84
          buff.write(@@struct_L2.pack(_x.secs, _x.nsecs))
          _x = _v83.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))
          _v85 = val3.pose
          _v86 = _v85.position
          _x = _v86
          buff.write(@@struct_d3.pack(_x.x, _x.y, _x.z))
          _v87 = _v85.orientation
          _x = _v87
          buff.write(@@struct_d4.pack(_x.x, _x.y, _x.z, _x.w))
          _v88 = val3.scale
          _x = _v88
          buff.write(@@struct_d3.pack(_x.x, _x.y, _x.z))
          _v89 = val3.color
          _x = _v89
          buff.write(@@struct_f4.pack(_x.r, _x.g, _x.b, _x.a))
          _v90 = val3.lifetime
          _x = _v90
          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
    length = @poses.length
    buff.write(@@struct_L.pack(length))
    for val1 in @poses
      _v91 = val1.header
      buff.write(@@struct_L.pack(_v91.seq))
      _v92 = _v91.stamp
      _x = _v92
      buff.write(@@struct_L2.pack(_x.secs, _x.nsecs))
      _x = _v91.frame_id
      length = _x.length
      buff.write([length, _x].pack("La#{length}"))
      _v93 = val1.pose
      _v94 = _v93.position
      _x = _v94
      buff.write(@@struct_d3.pack(_x.x, _x.y, _x.z))
      _v95 = _v93.orientation
      _x = _v95
      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}"))
    end
    length = @erases.length
    buff.write(@@struct_L.pack(length))
    for val1 in @erases
      length = val1.length
      buff.write([length, val1].pack("La#{length}"))
    end
  rescue => exception
    raise "some erro in serialize: #{exception}"

  end
end