rosruby_msgs 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/actionlib_msgs/GoalID.rb +106 -0
- data/lib/actionlib_msgs/GoalStatus.rb +160 -0
- data/lib/actionlib_msgs/GoalStatusArray.rb +207 -0
- data/lib/actionlib_tutorials/AveragingAction.rb +322 -0
- data/lib/actionlib_tutorials/AveragingActionFeedback.rb +213 -0
- data/lib/actionlib_tutorials/AveragingActionGoal.rb +167 -0
- data/lib/actionlib_tutorials/AveragingActionResult.rb +209 -0
- data/lib/actionlib_tutorials/AveragingFeedback.rb +93 -0
- data/lib/actionlib_tutorials/AveragingGoal.rb +85 -0
- data/lib/actionlib_tutorials/AveragingResult.rb +87 -0
- data/lib/actionlib_tutorials/FibonacciAction.rb +334 -0
- data/lib/actionlib_tutorials/FibonacciActionFeedback.rb +216 -0
- data/lib/actionlib_tutorials/FibonacciActionGoal.rb +167 -0
- data/lib/actionlib_tutorials/FibonacciActionResult.rb +214 -0
- data/lib/actionlib_tutorials/FibonacciFeedback.rb +93 -0
- data/lib/actionlib_tutorials/FibonacciGoal.rb +85 -0
- data/lib/actionlib_tutorials/FibonacciResult.rb +91 -0
- data/lib/geometry_msgs/Point.rb +88 -0
- data/lib/geometry_msgs/Point32.rb +94 -0
- data/lib/geometry_msgs/PointStamped.rb +133 -0
- data/lib/geometry_msgs/Polygon.rb +112 -0
- data/lib/geometry_msgs/PolygonStamped.rb +159 -0
- data/lib/geometry_msgs/Pose.rb +110 -0
- data/lib/geometry_msgs/Pose2D.rb +88 -0
- data/lib/geometry_msgs/PoseArray.rb +174 -0
- data/lib/geometry_msgs/PoseStamped.rb +150 -0
- data/lib/geometry_msgs/PoseWithCovariance.rb +125 -0
- data/lib/geometry_msgs/PoseWithCovarianceStamped.rb +169 -0
- data/lib/geometry_msgs/Quaternion.rb +91 -0
- data/lib/geometry_msgs/QuaternionStamped.rb +136 -0
- data/lib/geometry_msgs/Transform.rb +111 -0
- data/lib/geometry_msgs/TransformStamped.rb +168 -0
- data/lib/geometry_msgs/Twist.rb +100 -0
- data/lib/geometry_msgs/TwistStamped.rb +140 -0
- data/lib/geometry_msgs/TwistWithCovariance.rb +115 -0
- data/lib/geometry_msgs/TwistWithCovarianceStamped.rb +158 -0
- data/lib/geometry_msgs/Vector3.rb +88 -0
- data/lib/geometry_msgs/Vector3Stamped.rb +133 -0
- data/lib/geometry_msgs/Wrench.rb +101 -0
- data/lib/geometry_msgs/WrenchStamped.rb +141 -0
- data/lib/nav_msgs/GetMap.rb +280 -0
- data/lib/nav_msgs/GetPlan.rb +406 -0
- data/lib/nav_msgs/GridCells.rb +153 -0
- data/lib/nav_msgs/MapMetaData.rb +130 -0
- data/lib/nav_msgs/OccupancyGrid.rb +187 -0
- data/lib/nav_msgs/Odometry.rb +223 -0
- data/lib/nav_msgs/Path.rb +205 -0
- data/lib/roscpp/Empty.rb +166 -0
- data/lib/roscpp/GetLoggers.rb +205 -0
- data/lib/roscpp/Logger.rb +98 -0
- data/lib/roscpp/SetLoggerLevel.rb +189 -0
- data/lib/roscpp_tutorials/TwoInts.rb +185 -0
- data/lib/rosgraph_msgs/Clock.rb +90 -0
- data/lib/rosgraph_msgs/Log.rb +210 -0
- data/lib/sensor_msgs/CameraInfo.rb +325 -0
- data/lib/sensor_msgs/ChannelFloat32.rb +122 -0
- data/lib/sensor_msgs/CompressedImage.rb +151 -0
- data/lib/sensor_msgs/Image.rb +179 -0
- data/lib/sensor_msgs/Imu.rb +193 -0
- data/lib/sensor_msgs/JointState.rb +195 -0
- data/lib/sensor_msgs/Joy.rb +141 -0
- data/lib/sensor_msgs/JoyFeedback.rb +104 -0
- data/lib/sensor_msgs/JoyFeedbackArray.rb +116 -0
- data/lib/sensor_msgs/LaserScan.rb +178 -0
- data/lib/sensor_msgs/NavSatFix.rb +215 -0
- data/lib/sensor_msgs/NavSatStatus.rb +115 -0
- data/lib/sensor_msgs/PointCloud.rb +222 -0
- data/lib/sensor_msgs/PointCloud2.rb +226 -0
- data/lib/sensor_msgs/PointField.rb +119 -0
- data/lib/sensor_msgs/Range.rb +157 -0
- data/lib/sensor_msgs/RegionOfInterest.rb +106 -0
- data/lib/sensor_msgs/SetCameraInfo.rb +437 -0
- data/lib/sensor_msgs/TimeReference.rb +140 -0
- data/lib/std_msgs/Bool.rb +83 -0
- data/lib/std_msgs/Byte.rb +83 -0
- data/lib/std_msgs/ByteMultiArray.rb +165 -0
- data/lib/std_msgs/Char.rb +82 -0
- data/lib/std_msgs/ColorRGBA.rb +89 -0
- data/lib/std_msgs/Duration.rb +87 -0
- data/lib/std_msgs/Empty.rb +75 -0
- data/lib/std_msgs/Float32.rb +82 -0
- data/lib/std_msgs/Float32MultiArray.rb +165 -0
- data/lib/std_msgs/Float64.rb +82 -0
- data/lib/std_msgs/Float64MultiArray.rb +165 -0
- data/lib/std_msgs/Header.rb +112 -0
- data/lib/std_msgs/Int16.rb +83 -0
- data/lib/std_msgs/Int16MultiArray.rb +165 -0
- data/lib/std_msgs/Int32.rb +82 -0
- data/lib/std_msgs/Int32MultiArray.rb +165 -0
- data/lib/std_msgs/Int64.rb +82 -0
- data/lib/std_msgs/Int64MultiArray.rb +165 -0
- data/lib/std_msgs/Int8.rb +83 -0
- data/lib/std_msgs/Int8MultiArray.rb +165 -0
- data/lib/std_msgs/MultiArrayDimension.rb +95 -0
- data/lib/std_msgs/MultiArrayLayout.rb +141 -0
- data/lib/std_msgs/String.rb +87 -0
- data/lib/std_msgs/Time.rb +87 -0
- data/lib/std_msgs/UInt16.rb +83 -0
- data/lib/std_msgs/UInt16MultiArray.rb +165 -0
- data/lib/std_msgs/UInt32.rb +81 -0
- data/lib/std_msgs/UInt32MultiArray.rb +165 -0
- data/lib/std_msgs/UInt64.rb +82 -0
- data/lib/std_msgs/UInt64MultiArray.rb +165 -0
- data/lib/std_msgs/UInt8.rb +83 -0
- data/lib/std_msgs/UInt8MultiArray.rb +168 -0
- data/lib/std_srvs/Empty.rb +166 -0
- data/lib/stereo_msgs/DisparityImage.rb +261 -0
- data/lib/tf/FrameGraph.rb +179 -0
- data/lib/tf/tfMessage.rb +202 -0
- data/lib/trajectory_msgs/JointTrajectory.rb +198 -0
- data/lib/trajectory_msgs/JointTrajectoryPoint.rb +125 -0
- data/lib/visualization_msgs/ImageMarker.rb +238 -0
- data/lib/visualization_msgs/InteractiveMarker.rb +651 -0
- data/lib/visualization_msgs/InteractiveMarkerControl.rb +469 -0
- data/lib/visualization_msgs/InteractiveMarkerFeedback.rb +235 -0
- data/lib/visualization_msgs/InteractiveMarkerInit.rb +707 -0
- data/lib/visualization_msgs/InteractiveMarkerPose.rb +166 -0
- data/lib/visualization_msgs/InteractiveMarkerUpdate.rb +825 -0
- data/lib/visualization_msgs/Marker.rb +318 -0
- data/lib/visualization_msgs/MarkerArray.rb +349 -0
- data/lib/visualization_msgs/MenuEntry.rb +168 -0
- metadata +123 -2
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# autogenerated by genmsg_ruby from String.msg. Do not edit.
|
|
2
|
+
require 'ros/message'
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
module Std_msgs
|
|
6
|
+
|
|
7
|
+
class String <::ROS::Message
|
|
8
|
+
def self.md5sum
|
|
9
|
+
"992ce8a1687cec8c8bd883ec73ca41d1"
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def self.type
|
|
13
|
+
"std_msgs/String"
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def has_header?
|
|
17
|
+
false
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def message_definition
|
|
21
|
+
"string data
|
|
22
|
+
|
|
23
|
+
"
|
|
24
|
+
end
|
|
25
|
+
attr_accessor :data
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
@@struct_L = ::ROS::Struct.new("L")
|
|
29
|
+
@@slot_types = ['string']
|
|
30
|
+
|
|
31
|
+
def initialize
|
|
32
|
+
# Constructor. Any message fields that are implicitly/explicitly
|
|
33
|
+
# set to None will be assigned a default value. The recommend
|
|
34
|
+
# use is keyword arguments as this is more robust to future message
|
|
35
|
+
# changes. You cannot mix in-order arguments and keyword arguments.
|
|
36
|
+
#
|
|
37
|
+
# The available fields are:
|
|
38
|
+
# data
|
|
39
|
+
#
|
|
40
|
+
# @param args: complete set of field values, in .msg order
|
|
41
|
+
# @param kwds: use keyword arguments corresponding to message field names
|
|
42
|
+
# to set specific fields.
|
|
43
|
+
#
|
|
44
|
+
|
|
45
|
+
# message fields cannot be None, assign default values for those that are
|
|
46
|
+
@data = ''
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
def _get_types
|
|
50
|
+
# internal API method
|
|
51
|
+
return @slot_types
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
def serialize(buff)
|
|
55
|
+
# serialize message into buffer
|
|
56
|
+
# @param buff: buffer
|
|
57
|
+
# @type buff: StringIO
|
|
58
|
+
begin
|
|
59
|
+
_x = @data
|
|
60
|
+
length = _x.length
|
|
61
|
+
buff.write([length, _x].pack("La#{length}"))
|
|
62
|
+
rescue => exception
|
|
63
|
+
raise "some erro in serialize: #{exception}"
|
|
64
|
+
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
def deserialize(str)
|
|
69
|
+
# unpack serialized message in str into this message instance
|
|
70
|
+
# @param str: byte array of serialized message
|
|
71
|
+
# @type str: str
|
|
72
|
+
|
|
73
|
+
begin
|
|
74
|
+
end_point = 0
|
|
75
|
+
start = end_point
|
|
76
|
+
end_point += 4
|
|
77
|
+
(length,) = @@struct_L.unpack(str[start..(end_point-1)])
|
|
78
|
+
start = end_point
|
|
79
|
+
end_point += length
|
|
80
|
+
@data = str[start..(end_point-1)]
|
|
81
|
+
return self
|
|
82
|
+
rescue => exception
|
|
83
|
+
raise "message DeserializationError: #{exception}" #most likely buffer underfill
|
|
84
|
+
end
|
|
85
|
+
end
|
|
86
|
+
end # end of class
|
|
87
|
+
end # end of module
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# autogenerated by genmsg_ruby from Time.msg. Do not edit.
|
|
2
|
+
require 'ros/message'
|
|
3
|
+
|
|
4
|
+
require "ros/time"
|
|
5
|
+
|
|
6
|
+
module Std_msgs
|
|
7
|
+
|
|
8
|
+
class Time <::ROS::Message
|
|
9
|
+
def self.md5sum
|
|
10
|
+
"cd7166c74c552c311fbcc2fe5a7bc289"
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def self.type
|
|
14
|
+
"std_msgs/Time"
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def has_header?
|
|
18
|
+
false
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def message_definition
|
|
22
|
+
"time data
|
|
23
|
+
|
|
24
|
+
"
|
|
25
|
+
end
|
|
26
|
+
attr_accessor :data
|
|
27
|
+
|
|
28
|
+
@@struct_L2 = ::ROS::Struct.new("L2")
|
|
29
|
+
|
|
30
|
+
@@struct_L = ::ROS::Struct.new("L")
|
|
31
|
+
@@slot_types = ['time']
|
|
32
|
+
|
|
33
|
+
def initialize
|
|
34
|
+
# Constructor. Any message fields that are implicitly/explicitly
|
|
35
|
+
# set to None will be assigned a default value. The recommend
|
|
36
|
+
# use is keyword arguments as this is more robust to future message
|
|
37
|
+
# changes. You cannot mix in-order arguments and keyword arguments.
|
|
38
|
+
#
|
|
39
|
+
# The available fields are:
|
|
40
|
+
# data
|
|
41
|
+
#
|
|
42
|
+
# @param args: complete set of field values, in .msg order
|
|
43
|
+
# @param kwds: use keyword arguments corresponding to message field names
|
|
44
|
+
# to set specific fields.
|
|
45
|
+
#
|
|
46
|
+
|
|
47
|
+
# message fields cannot be None, assign default values for those that are
|
|
48
|
+
@data = ROS::Time.new
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
def _get_types
|
|
52
|
+
# internal API method
|
|
53
|
+
return @slot_types
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
def serialize(buff)
|
|
57
|
+
# serialize message into buffer
|
|
58
|
+
# @param buff: buffer
|
|
59
|
+
# @type buff: StringIO
|
|
60
|
+
begin
|
|
61
|
+
buff.write(@@struct_L2.pack(@data.secs, @data.nsecs))
|
|
62
|
+
rescue => exception
|
|
63
|
+
raise "some erro in serialize: #{exception}"
|
|
64
|
+
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
def deserialize(str)
|
|
69
|
+
# unpack serialized message in str into this message instance
|
|
70
|
+
# @param str: byte array of serialized message
|
|
71
|
+
# @type str: str
|
|
72
|
+
|
|
73
|
+
begin
|
|
74
|
+
if @data == nil
|
|
75
|
+
@data = ROS::Time.new
|
|
76
|
+
end
|
|
77
|
+
end_point = 0
|
|
78
|
+
start = end_point
|
|
79
|
+
end_point += ROS::Struct::calc_size('L2')
|
|
80
|
+
(@data.secs, @data.nsecs,) = @@struct_L2.unpack(str[start..(end_point-1)])
|
|
81
|
+
return self
|
|
82
|
+
rescue => exception
|
|
83
|
+
raise "message DeserializationError: #{exception}" #most likely buffer underfill
|
|
84
|
+
end
|
|
85
|
+
end
|
|
86
|
+
end # end of class
|
|
87
|
+
end # end of module
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# autogenerated by genmsg_ruby from UInt16.msg. Do not edit.
|
|
2
|
+
require 'ros/message'
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
module Std_msgs
|
|
6
|
+
|
|
7
|
+
class UInt16 <::ROS::Message
|
|
8
|
+
def self.md5sum
|
|
9
|
+
"1df79edf208b629fe6b81923a544552d"
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def self.type
|
|
13
|
+
"std_msgs/UInt16"
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def has_header?
|
|
17
|
+
false
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def message_definition
|
|
21
|
+
"uint16 data
|
|
22
|
+
|
|
23
|
+
"
|
|
24
|
+
end
|
|
25
|
+
attr_accessor :data
|
|
26
|
+
|
|
27
|
+
@@struct_S = ::ROS::Struct.new("S")
|
|
28
|
+
|
|
29
|
+
@@struct_L = ::ROS::Struct.new("L")
|
|
30
|
+
@@slot_types = ['uint16']
|
|
31
|
+
|
|
32
|
+
def initialize
|
|
33
|
+
# Constructor. Any message fields that are implicitly/explicitly
|
|
34
|
+
# set to None will be assigned a default value. The recommend
|
|
35
|
+
# use is keyword arguments as this is more robust to future message
|
|
36
|
+
# changes. You cannot mix in-order arguments and keyword arguments.
|
|
37
|
+
#
|
|
38
|
+
# The available fields are:
|
|
39
|
+
# data
|
|
40
|
+
#
|
|
41
|
+
# @param args: complete set of field values, in .msg order
|
|
42
|
+
# @param kwds: use keyword arguments corresponding to message field names
|
|
43
|
+
# to set specific fields.
|
|
44
|
+
#
|
|
45
|
+
|
|
46
|
+
# message fields cannot be None, assign default values for those that are
|
|
47
|
+
@data = 0
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
def _get_types
|
|
51
|
+
# internal API method
|
|
52
|
+
return @slot_types
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
def serialize(buff)
|
|
56
|
+
# serialize message into buffer
|
|
57
|
+
# @param buff: buffer
|
|
58
|
+
# @type buff: StringIO
|
|
59
|
+
begin
|
|
60
|
+
buff.write(@@struct_S.pack(@data))
|
|
61
|
+
rescue => exception
|
|
62
|
+
raise "some erro in serialize: #{exception}"
|
|
63
|
+
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
def deserialize(str)
|
|
68
|
+
# unpack serialized message in str into this message instance
|
|
69
|
+
# @param str: byte array of serialized message
|
|
70
|
+
# @type str: str
|
|
71
|
+
|
|
72
|
+
begin
|
|
73
|
+
end_point = 0
|
|
74
|
+
start = end_point
|
|
75
|
+
end_point += ROS::Struct::calc_size('S')
|
|
76
|
+
(@data,) = @@struct_S.unpack(str[start..(end_point-1)])
|
|
77
|
+
return self
|
|
78
|
+
rescue => exception
|
|
79
|
+
raise "message DeserializationError: #{exception}" #most likely buffer underfill
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
end # end of class
|
|
83
|
+
end # end of module
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
# autogenerated by genmsg_ruby from UInt16MultiArray.msg. Do not edit.
|
|
2
|
+
require 'ros/message'
|
|
3
|
+
|
|
4
|
+
require "std_msgs/MultiArrayDimension"
|
|
5
|
+
require "std_msgs/MultiArrayLayout"
|
|
6
|
+
|
|
7
|
+
module Std_msgs
|
|
8
|
+
|
|
9
|
+
class UInt16MultiArray <::ROS::Message
|
|
10
|
+
def self.md5sum
|
|
11
|
+
"52f264f1c973c4b73790d384c6cb4484"
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
def self.type
|
|
15
|
+
"std_msgs/UInt16MultiArray"
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def has_header?
|
|
19
|
+
false
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
def message_definition
|
|
23
|
+
"# Please look at the MultiArrayLayout message definition for
|
|
24
|
+
# documentation on all multiarrays.
|
|
25
|
+
|
|
26
|
+
MultiArrayLayout layout # specification of data layout
|
|
27
|
+
uint16[] data # array of data
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
================================================================================
|
|
31
|
+
MSG: std_msgs/MultiArrayLayout
|
|
32
|
+
# The multiarray declares a generic multi-dimensional array of a
|
|
33
|
+
# particular data type. Dimensions are ordered from outer most
|
|
34
|
+
# to inner most.
|
|
35
|
+
|
|
36
|
+
MultiArrayDimension[] dim # Array of dimension properties
|
|
37
|
+
uint32 data_offset # padding bytes at front of data
|
|
38
|
+
|
|
39
|
+
# Accessors should ALWAYS be written in terms of dimension stride
|
|
40
|
+
# and specified outer-most dimension first.
|
|
41
|
+
#
|
|
42
|
+
# multiarray(i,j,k) = data[data_offset + dim_stride[1]*i + dim_stride[2]*j + k]
|
|
43
|
+
#
|
|
44
|
+
# A standard, 3-channel 640x480 image with interleaved color channels
|
|
45
|
+
# would be specified as:
|
|
46
|
+
#
|
|
47
|
+
# dim[0].label = \"height\"
|
|
48
|
+
# dim[0].size = 480
|
|
49
|
+
# dim[0].stride = 3*640*480 = 921600 (note dim[0] stride is just size of image)
|
|
50
|
+
# dim[1].label = \"width\"
|
|
51
|
+
# dim[1].size = 640
|
|
52
|
+
# dim[1].stride = 3*640 = 1920
|
|
53
|
+
# dim[2].label = \"channel\"
|
|
54
|
+
# dim[2].size = 3
|
|
55
|
+
# dim[2].stride = 3
|
|
56
|
+
#
|
|
57
|
+
# multiarray(i,j,k) refers to the ith row, jth column, and kth channel.
|
|
58
|
+
================================================================================
|
|
59
|
+
MSG: std_msgs/MultiArrayDimension
|
|
60
|
+
string label # label of given dimension
|
|
61
|
+
uint32 size # size of given dimension (in type units)
|
|
62
|
+
uint32 stride # stride of given dimension
|
|
63
|
+
"
|
|
64
|
+
end
|
|
65
|
+
attr_accessor :layout, :data
|
|
66
|
+
|
|
67
|
+
@@struct_L2 = ::ROS::Struct.new("L2")
|
|
68
|
+
|
|
69
|
+
@@struct_L = ::ROS::Struct.new("L")
|
|
70
|
+
@@slot_types = ['std_msgs/MultiArrayLayout','uint16[]']
|
|
71
|
+
|
|
72
|
+
def initialize
|
|
73
|
+
# Constructor. Any message fields that are implicitly/explicitly
|
|
74
|
+
# set to None will be assigned a default value. The recommend
|
|
75
|
+
# use is keyword arguments as this is more robust to future message
|
|
76
|
+
# changes. You cannot mix in-order arguments and keyword arguments.
|
|
77
|
+
#
|
|
78
|
+
# The available fields are:
|
|
79
|
+
# layout,data
|
|
80
|
+
#
|
|
81
|
+
# @param args: complete set of field values, in .msg order
|
|
82
|
+
# @param kwds: use keyword arguments corresponding to message field names
|
|
83
|
+
# to set specific fields.
|
|
84
|
+
#
|
|
85
|
+
|
|
86
|
+
# message fields cannot be None, assign default values for those that are
|
|
87
|
+
@layout = Std_msgs::MultiArrayLayout.new
|
|
88
|
+
@data = []
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
def _get_types
|
|
92
|
+
# internal API method
|
|
93
|
+
return @slot_types
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
def serialize(buff)
|
|
97
|
+
# serialize message into buffer
|
|
98
|
+
# @param buff: buffer
|
|
99
|
+
# @type buff: StringIO
|
|
100
|
+
begin
|
|
101
|
+
length = @layout.dim.length
|
|
102
|
+
buff.write(@@struct_L.pack(length))
|
|
103
|
+
for val1 in @layout.dim
|
|
104
|
+
_x = val1.label
|
|
105
|
+
length = _x.length
|
|
106
|
+
buff.write([length, _x].pack("La#{length}"))
|
|
107
|
+
_x = val1
|
|
108
|
+
buff.write(@@struct_L2.pack(_x.size, _x.stride))
|
|
109
|
+
end
|
|
110
|
+
buff.write(@@struct_L.pack(@layout.data_offset))
|
|
111
|
+
length = @data.length
|
|
112
|
+
buff.write(@@struct_L.pack(length))
|
|
113
|
+
pattern = "S#{length}"
|
|
114
|
+
buff.write(*@data.pack(pattern))
|
|
115
|
+
rescue => exception
|
|
116
|
+
raise "some erro in serialize: #{exception}"
|
|
117
|
+
|
|
118
|
+
end
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
def deserialize(str)
|
|
122
|
+
# unpack serialized message in str into this message instance
|
|
123
|
+
# @param str: byte array of serialized message
|
|
124
|
+
# @type str: str
|
|
125
|
+
|
|
126
|
+
begin
|
|
127
|
+
if @layout == nil
|
|
128
|
+
@layout = Std_msgs::MultiArrayLayout.new
|
|
129
|
+
end
|
|
130
|
+
end_point = 0
|
|
131
|
+
start = end_point
|
|
132
|
+
end_point += 4
|
|
133
|
+
(length,) = @@struct_L.unpack(str[start..(end_point-1)])
|
|
134
|
+
@layout.dim = []
|
|
135
|
+
length.times do
|
|
136
|
+
val1 = Std_msgs::MultiArrayDimension.new
|
|
137
|
+
start = end_point
|
|
138
|
+
end_point += 4
|
|
139
|
+
(length,) = @@struct_L.unpack(str[start..(end_point-1)])
|
|
140
|
+
start = end_point
|
|
141
|
+
end_point += length
|
|
142
|
+
val1.label = str[start..(end_point-1)]
|
|
143
|
+
_x = val1
|
|
144
|
+
start = end_point
|
|
145
|
+
end_point += ROS::Struct::calc_size('L2')
|
|
146
|
+
(_x.size, _x.stride,) = @@struct_L2.unpack(str[start..(end_point-1)])
|
|
147
|
+
@layout.dim.push(val1)
|
|
148
|
+
end
|
|
149
|
+
start = end_point
|
|
150
|
+
end_point += ROS::Struct::calc_size('L')
|
|
151
|
+
(@layout.data_offset,) = @@struct_L.unpack(str[start..(end_point-1)])
|
|
152
|
+
start = end_point
|
|
153
|
+
end_point += 4
|
|
154
|
+
(length,) = @@struct_L.unpack(str[start..(end_point-1)])
|
|
155
|
+
pattern = "S#{length}"
|
|
156
|
+
start = end_point
|
|
157
|
+
end_point += ROS::Struct::calc_size("#{pattern}")
|
|
158
|
+
@data = str[start..(end_point-1)].unpack(pattern)
|
|
159
|
+
return self
|
|
160
|
+
rescue => exception
|
|
161
|
+
raise "message DeserializationError: #{exception}" #most likely buffer underfill
|
|
162
|
+
end
|
|
163
|
+
end
|
|
164
|
+
end # end of class
|
|
165
|
+
end # end of module
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# autogenerated by genmsg_ruby from UInt32.msg. Do not edit.
|
|
2
|
+
require 'ros/message'
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
module Std_msgs
|
|
6
|
+
|
|
7
|
+
class UInt32 <::ROS::Message
|
|
8
|
+
def self.md5sum
|
|
9
|
+
"304a39449588c7f8ce2df6e8001c5fce"
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def self.type
|
|
13
|
+
"std_msgs/UInt32"
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def has_header?
|
|
17
|
+
false
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def message_definition
|
|
21
|
+
"uint32 data
|
|
22
|
+
"
|
|
23
|
+
end
|
|
24
|
+
attr_accessor :data
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
@@struct_L = ::ROS::Struct.new("L")
|
|
28
|
+
@@slot_types = ['uint32']
|
|
29
|
+
|
|
30
|
+
def initialize
|
|
31
|
+
# Constructor. Any message fields that are implicitly/explicitly
|
|
32
|
+
# set to None will be assigned a default value. The recommend
|
|
33
|
+
# use is keyword arguments as this is more robust to future message
|
|
34
|
+
# changes. You cannot mix in-order arguments and keyword arguments.
|
|
35
|
+
#
|
|
36
|
+
# The available fields are:
|
|
37
|
+
# data
|
|
38
|
+
#
|
|
39
|
+
# @param args: complete set of field values, in .msg order
|
|
40
|
+
# @param kwds: use keyword arguments corresponding to message field names
|
|
41
|
+
# to set specific fields.
|
|
42
|
+
#
|
|
43
|
+
|
|
44
|
+
# message fields cannot be None, assign default values for those that are
|
|
45
|
+
@data = 0
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
def _get_types
|
|
49
|
+
# internal API method
|
|
50
|
+
return @slot_types
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
def serialize(buff)
|
|
54
|
+
# serialize message into buffer
|
|
55
|
+
# @param buff: buffer
|
|
56
|
+
# @type buff: StringIO
|
|
57
|
+
begin
|
|
58
|
+
buff.write(@@struct_L.pack(@data))
|
|
59
|
+
rescue => exception
|
|
60
|
+
raise "some erro in serialize: #{exception}"
|
|
61
|
+
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
def deserialize(str)
|
|
66
|
+
# unpack serialized message in str into this message instance
|
|
67
|
+
# @param str: byte array of serialized message
|
|
68
|
+
# @type str: str
|
|
69
|
+
|
|
70
|
+
begin
|
|
71
|
+
end_point = 0
|
|
72
|
+
start = end_point
|
|
73
|
+
end_point += ROS::Struct::calc_size('L')
|
|
74
|
+
(@data,) = @@struct_L.unpack(str[start..(end_point-1)])
|
|
75
|
+
return self
|
|
76
|
+
rescue => exception
|
|
77
|
+
raise "message DeserializationError: #{exception}" #most likely buffer underfill
|
|
78
|
+
end
|
|
79
|
+
end
|
|
80
|
+
end # end of class
|
|
81
|
+
end # end of module
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
# autogenerated by genmsg_ruby from UInt32MultiArray.msg. Do not edit.
|
|
2
|
+
require 'ros/message'
|
|
3
|
+
|
|
4
|
+
require "std_msgs/MultiArrayDimension"
|
|
5
|
+
require "std_msgs/MultiArrayLayout"
|
|
6
|
+
|
|
7
|
+
module Std_msgs
|
|
8
|
+
|
|
9
|
+
class UInt32MultiArray <::ROS::Message
|
|
10
|
+
def self.md5sum
|
|
11
|
+
"4d6a180abc9be191b96a7eda6c8a233d"
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
def self.type
|
|
15
|
+
"std_msgs/UInt32MultiArray"
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def has_header?
|
|
19
|
+
false
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
def message_definition
|
|
23
|
+
"# Please look at the MultiArrayLayout message definition for
|
|
24
|
+
# documentation on all multiarrays.
|
|
25
|
+
|
|
26
|
+
MultiArrayLayout layout # specification of data layout
|
|
27
|
+
uint32[] data # array of data
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
================================================================================
|
|
31
|
+
MSG: std_msgs/MultiArrayLayout
|
|
32
|
+
# The multiarray declares a generic multi-dimensional array of a
|
|
33
|
+
# particular data type. Dimensions are ordered from outer most
|
|
34
|
+
# to inner most.
|
|
35
|
+
|
|
36
|
+
MultiArrayDimension[] dim # Array of dimension properties
|
|
37
|
+
uint32 data_offset # padding bytes at front of data
|
|
38
|
+
|
|
39
|
+
# Accessors should ALWAYS be written in terms of dimension stride
|
|
40
|
+
# and specified outer-most dimension first.
|
|
41
|
+
#
|
|
42
|
+
# multiarray(i,j,k) = data[data_offset + dim_stride[1]*i + dim_stride[2]*j + k]
|
|
43
|
+
#
|
|
44
|
+
# A standard, 3-channel 640x480 image with interleaved color channels
|
|
45
|
+
# would be specified as:
|
|
46
|
+
#
|
|
47
|
+
# dim[0].label = \"height\"
|
|
48
|
+
# dim[0].size = 480
|
|
49
|
+
# dim[0].stride = 3*640*480 = 921600 (note dim[0] stride is just size of image)
|
|
50
|
+
# dim[1].label = \"width\"
|
|
51
|
+
# dim[1].size = 640
|
|
52
|
+
# dim[1].stride = 3*640 = 1920
|
|
53
|
+
# dim[2].label = \"channel\"
|
|
54
|
+
# dim[2].size = 3
|
|
55
|
+
# dim[2].stride = 3
|
|
56
|
+
#
|
|
57
|
+
# multiarray(i,j,k) refers to the ith row, jth column, and kth channel.
|
|
58
|
+
================================================================================
|
|
59
|
+
MSG: std_msgs/MultiArrayDimension
|
|
60
|
+
string label # label of given dimension
|
|
61
|
+
uint32 size # size of given dimension (in type units)
|
|
62
|
+
uint32 stride # stride of given dimension
|
|
63
|
+
"
|
|
64
|
+
end
|
|
65
|
+
attr_accessor :layout, :data
|
|
66
|
+
|
|
67
|
+
@@struct_L2 = ::ROS::Struct.new("L2")
|
|
68
|
+
|
|
69
|
+
@@struct_L = ::ROS::Struct.new("L")
|
|
70
|
+
@@slot_types = ['std_msgs/MultiArrayLayout','uint32[]']
|
|
71
|
+
|
|
72
|
+
def initialize
|
|
73
|
+
# Constructor. Any message fields that are implicitly/explicitly
|
|
74
|
+
# set to None will be assigned a default value. The recommend
|
|
75
|
+
# use is keyword arguments as this is more robust to future message
|
|
76
|
+
# changes. You cannot mix in-order arguments and keyword arguments.
|
|
77
|
+
#
|
|
78
|
+
# The available fields are:
|
|
79
|
+
# layout,data
|
|
80
|
+
#
|
|
81
|
+
# @param args: complete set of field values, in .msg order
|
|
82
|
+
# @param kwds: use keyword arguments corresponding to message field names
|
|
83
|
+
# to set specific fields.
|
|
84
|
+
#
|
|
85
|
+
|
|
86
|
+
# message fields cannot be None, assign default values for those that are
|
|
87
|
+
@layout = Std_msgs::MultiArrayLayout.new
|
|
88
|
+
@data = []
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
def _get_types
|
|
92
|
+
# internal API method
|
|
93
|
+
return @slot_types
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
def serialize(buff)
|
|
97
|
+
# serialize message into buffer
|
|
98
|
+
# @param buff: buffer
|
|
99
|
+
# @type buff: StringIO
|
|
100
|
+
begin
|
|
101
|
+
length = @layout.dim.length
|
|
102
|
+
buff.write(@@struct_L.pack(length))
|
|
103
|
+
for val1 in @layout.dim
|
|
104
|
+
_x = val1.label
|
|
105
|
+
length = _x.length
|
|
106
|
+
buff.write([length, _x].pack("La#{length}"))
|
|
107
|
+
_x = val1
|
|
108
|
+
buff.write(@@struct_L2.pack(_x.size, _x.stride))
|
|
109
|
+
end
|
|
110
|
+
buff.write(@@struct_L.pack(@layout.data_offset))
|
|
111
|
+
length = @data.length
|
|
112
|
+
buff.write(@@struct_L.pack(length))
|
|
113
|
+
pattern = "L#{length}"
|
|
114
|
+
buff.write(*@data.pack(pattern))
|
|
115
|
+
rescue => exception
|
|
116
|
+
raise "some erro in serialize: #{exception}"
|
|
117
|
+
|
|
118
|
+
end
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
def deserialize(str)
|
|
122
|
+
# unpack serialized message in str into this message instance
|
|
123
|
+
# @param str: byte array of serialized message
|
|
124
|
+
# @type str: str
|
|
125
|
+
|
|
126
|
+
begin
|
|
127
|
+
if @layout == nil
|
|
128
|
+
@layout = Std_msgs::MultiArrayLayout.new
|
|
129
|
+
end
|
|
130
|
+
end_point = 0
|
|
131
|
+
start = end_point
|
|
132
|
+
end_point += 4
|
|
133
|
+
(length,) = @@struct_L.unpack(str[start..(end_point-1)])
|
|
134
|
+
@layout.dim = []
|
|
135
|
+
length.times do
|
|
136
|
+
val1 = Std_msgs::MultiArrayDimension.new
|
|
137
|
+
start = end_point
|
|
138
|
+
end_point += 4
|
|
139
|
+
(length,) = @@struct_L.unpack(str[start..(end_point-1)])
|
|
140
|
+
start = end_point
|
|
141
|
+
end_point += length
|
|
142
|
+
val1.label = str[start..(end_point-1)]
|
|
143
|
+
_x = val1
|
|
144
|
+
start = end_point
|
|
145
|
+
end_point += ROS::Struct::calc_size('L2')
|
|
146
|
+
(_x.size, _x.stride,) = @@struct_L2.unpack(str[start..(end_point-1)])
|
|
147
|
+
@layout.dim.push(val1)
|
|
148
|
+
end
|
|
149
|
+
start = end_point
|
|
150
|
+
end_point += ROS::Struct::calc_size('L')
|
|
151
|
+
(@layout.data_offset,) = @@struct_L.unpack(str[start..(end_point-1)])
|
|
152
|
+
start = end_point
|
|
153
|
+
end_point += 4
|
|
154
|
+
(length,) = @@struct_L.unpack(str[start..(end_point-1)])
|
|
155
|
+
pattern = "L#{length}"
|
|
156
|
+
start = end_point
|
|
157
|
+
end_point += ROS::Struct::calc_size("#{pattern}")
|
|
158
|
+
@data = str[start..(end_point-1)].unpack(pattern)
|
|
159
|
+
return self
|
|
160
|
+
rescue => exception
|
|
161
|
+
raise "message DeserializationError: #{exception}" #most likely buffer underfill
|
|
162
|
+
end
|
|
163
|
+
end
|
|
164
|
+
end # end of class
|
|
165
|
+
end # end of module
|