rosruby_msgs 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- 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,179 @@
|
|
1
|
+
# autogenerated by genmsg_ruby from Image.msg. Do not edit.
|
2
|
+
require 'ros/message'
|
3
|
+
|
4
|
+
require "std_msgs/Header"
|
5
|
+
|
6
|
+
module Sensor_msgs
|
7
|
+
|
8
|
+
class Image <::ROS::Message
|
9
|
+
def self.md5sum
|
10
|
+
"060021388200f6f0f447d0fcd9c64743"
|
11
|
+
end
|
12
|
+
|
13
|
+
def self.type
|
14
|
+
"sensor_msgs/Image"
|
15
|
+
end
|
16
|
+
|
17
|
+
def has_header?
|
18
|
+
true
|
19
|
+
end
|
20
|
+
|
21
|
+
def message_definition
|
22
|
+
"# This message contains an uncompressed image
|
23
|
+
# (0, 0) is at top-left corner of image
|
24
|
+
#
|
25
|
+
|
26
|
+
Header header # Header timestamp should be acquisition time of image
|
27
|
+
# Header frame_id should be optical frame of camera
|
28
|
+
# origin of frame should be optical center of cameara
|
29
|
+
# +x should point to the right in the image
|
30
|
+
# +y should point down in the image
|
31
|
+
# +z should point into to plane of the image
|
32
|
+
# If the frame_id here and the frame_id of the CameraInfo
|
33
|
+
# message associated with the image conflict
|
34
|
+
# the behavior is undefined
|
35
|
+
|
36
|
+
uint32 height # image height, that is, number of rows
|
37
|
+
uint32 width # image width, that is, number of columns
|
38
|
+
|
39
|
+
# The legal values for encoding are in file src/image_encodings.cpp
|
40
|
+
# If you want to standardize a new string format, join
|
41
|
+
# ros-users@lists.sourceforge.net and send an email proposing a new encoding.
|
42
|
+
|
43
|
+
string encoding # Encoding of pixels -- channel meaning, ordering, size
|
44
|
+
# taken from the list of strings in src/image_encodings.cpp
|
45
|
+
|
46
|
+
uint8 is_bigendian # is this data bigendian?
|
47
|
+
uint32 step # Full row length in bytes
|
48
|
+
uint8[] data # actual matrix data, size is (step * rows)
|
49
|
+
|
50
|
+
================================================================================
|
51
|
+
MSG: std_msgs/Header
|
52
|
+
# Standard metadata for higher-level stamped data types.
|
53
|
+
# This is generally used to communicate timestamped data
|
54
|
+
# in a particular coordinate frame.
|
55
|
+
#
|
56
|
+
# sequence ID: consecutively increasing ID
|
57
|
+
uint32 seq
|
58
|
+
#Two-integer timestamp that is expressed as:
|
59
|
+
# * stamp.secs: seconds (stamp_secs) since epoch
|
60
|
+
# * stamp.nsecs: nanoseconds since stamp_secs
|
61
|
+
# time-handling sugar is provided by the client library
|
62
|
+
time stamp
|
63
|
+
#Frame this data is associated with
|
64
|
+
# 0: no frame
|
65
|
+
# 1: global frame
|
66
|
+
string frame_id
|
67
|
+
|
68
|
+
"
|
69
|
+
end
|
70
|
+
attr_accessor :header, :height, :width, :encoding, :is_bigendian, :step, :data
|
71
|
+
|
72
|
+
@@struct_L3 = ::ROS::Struct.new("L3")
|
73
|
+
@@struct_L2 = ::ROS::Struct.new("L2")
|
74
|
+
@@struct_CL = ::ROS::Struct.new("CL")
|
75
|
+
|
76
|
+
@@struct_L = ::ROS::Struct.new("L")
|
77
|
+
@@slot_types = ['Header','uint32','uint32','string','uint8','uint32','uint8[]']
|
78
|
+
|
79
|
+
def initialize
|
80
|
+
# Constructor. Any message fields that are implicitly/explicitly
|
81
|
+
# set to None will be assigned a default value. The recommend
|
82
|
+
# use is keyword arguments as this is more robust to future message
|
83
|
+
# changes. You cannot mix in-order arguments and keyword arguments.
|
84
|
+
#
|
85
|
+
# The available fields are:
|
86
|
+
# header,height,width,encoding,is_bigendian,step,data
|
87
|
+
#
|
88
|
+
# @param args: complete set of field values, in .msg order
|
89
|
+
# @param kwds: use keyword arguments corresponding to message field names
|
90
|
+
# to set specific fields.
|
91
|
+
#
|
92
|
+
|
93
|
+
# message fields cannot be None, assign default values for those that are
|
94
|
+
@header = Std_msgs::Header.new
|
95
|
+
@height = 0
|
96
|
+
@width = 0
|
97
|
+
@encoding = ''
|
98
|
+
@is_bigendian = 0
|
99
|
+
@step = 0
|
100
|
+
@data = ''
|
101
|
+
end
|
102
|
+
|
103
|
+
def _get_types
|
104
|
+
# internal API method
|
105
|
+
return @slot_types
|
106
|
+
end
|
107
|
+
|
108
|
+
def serialize(buff)
|
109
|
+
# serialize message into buffer
|
110
|
+
# @param buff: buffer
|
111
|
+
# @type buff: StringIO
|
112
|
+
begin
|
113
|
+
buff.write(@@struct_L3.pack(@header.seq, @header.stamp.secs, @header.stamp.nsecs))
|
114
|
+
_x = @header.frame_id
|
115
|
+
length = _x.length
|
116
|
+
buff.write([length, _x].pack("La#{length}"))
|
117
|
+
buff.write(@@struct_L2.pack(@height, @width))
|
118
|
+
_x = @encoding
|
119
|
+
length = _x.length
|
120
|
+
buff.write([length, _x].pack("La#{length}"))
|
121
|
+
buff.write(@@struct_CL.pack(@is_bigendian, @step))
|
122
|
+
_x = @data
|
123
|
+
length = _x.length
|
124
|
+
# - if encoded as a list instead, serialize as bytes instead of string
|
125
|
+
if type(_x) in [list, tuple]
|
126
|
+
buff.write([length, *_x].pack("La#{length}"))
|
127
|
+
else
|
128
|
+
buff.write([length, _x].pack("La#{length}"))
|
129
|
+
end
|
130
|
+
rescue => exception
|
131
|
+
raise "some erro in serialize: #{exception}"
|
132
|
+
|
133
|
+
end
|
134
|
+
end
|
135
|
+
|
136
|
+
def deserialize(str)
|
137
|
+
# unpack serialized message in str into this message instance
|
138
|
+
# @param str: byte array of serialized message
|
139
|
+
# @type str: str
|
140
|
+
|
141
|
+
begin
|
142
|
+
if @header == nil
|
143
|
+
@header = Std_msgs::Header.new
|
144
|
+
end
|
145
|
+
end_point = 0
|
146
|
+
start = end_point
|
147
|
+
end_point += ROS::Struct::calc_size('L3')
|
148
|
+
(@header.seq, @header.stamp.secs, @header.stamp.nsecs,) = @@struct_L3.unpack(str[start..(end_point-1)])
|
149
|
+
start = end_point
|
150
|
+
end_point += 4
|
151
|
+
(length,) = @@struct_L.unpack(str[start..(end_point-1)])
|
152
|
+
start = end_point
|
153
|
+
end_point += length
|
154
|
+
@header.frame_id = str[start..(end_point-1)]
|
155
|
+
start = end_point
|
156
|
+
end_point += ROS::Struct::calc_size('L2')
|
157
|
+
(@height, @width,) = @@struct_L2.unpack(str[start..(end_point-1)])
|
158
|
+
start = end_point
|
159
|
+
end_point += 4
|
160
|
+
(length,) = @@struct_L.unpack(str[start..(end_point-1)])
|
161
|
+
start = end_point
|
162
|
+
end_point += length
|
163
|
+
@encoding = str[start..(end_point-1)]
|
164
|
+
start = end_point
|
165
|
+
end_point += ROS::Struct::calc_size('CL')
|
166
|
+
(@is_bigendian, @step,) = @@struct_CL.unpack(str[start..(end_point-1)])
|
167
|
+
start = end_point
|
168
|
+
end_point += 4
|
169
|
+
(length,) = @@struct_L.unpack(str[start..(end_point-1)])
|
170
|
+
start = end_point
|
171
|
+
end_point += length
|
172
|
+
@data = str[start..(end_point-1)]
|
173
|
+
return self
|
174
|
+
rescue => exception
|
175
|
+
raise "message DeserializationError: #{exception}" #most likely buffer underfill
|
176
|
+
end
|
177
|
+
end
|
178
|
+
end # end of class
|
179
|
+
end # end of module
|
@@ -0,0 +1,193 @@
|
|
1
|
+
# autogenerated by genmsg_ruby from Imu.msg. Do not edit.
|
2
|
+
require 'ros/message'
|
3
|
+
|
4
|
+
require "std_msgs/Header"
|
5
|
+
require "geometry_msgs/Quaternion"
|
6
|
+
require "geometry_msgs/Vector3"
|
7
|
+
|
8
|
+
module Sensor_msgs
|
9
|
+
|
10
|
+
class Imu <::ROS::Message
|
11
|
+
def self.md5sum
|
12
|
+
"6a62c6daae103f4ff57a132d6f95cec2"
|
13
|
+
end
|
14
|
+
|
15
|
+
def self.type
|
16
|
+
"sensor_msgs/Imu"
|
17
|
+
end
|
18
|
+
|
19
|
+
def has_header?
|
20
|
+
true
|
21
|
+
end
|
22
|
+
|
23
|
+
def message_definition
|
24
|
+
"# This is a message to hold data from an IMU (Inertial Measurement Unit)
|
25
|
+
#
|
26
|
+
# Accelerations should be in m/s^2 (not in g's), and rotational velocity should be in rad/sec
|
27
|
+
#
|
28
|
+
# If the covariance of the measurement is known, it should be filled in (if all you know is the variance of each measurement, e.g. from the datasheet, just put those along the diagonal)
|
29
|
+
# A covariance matrix of all zeros will be interpreted as \"covariance unknown\", and to use the data a covariance will have to be assumed or gotten from some other source
|
30
|
+
#
|
31
|
+
# If you have no estimate for one of the data elements (e.g. your IMU doesn't produce an orientation estimate), please set element 0 of the associated covariance matrix to -1
|
32
|
+
# If you are interpreting this message, please check for a value of -1 in the first element of each covariance matrix, and disregard the associated estimate.
|
33
|
+
|
34
|
+
Header header
|
35
|
+
|
36
|
+
geometry_msgs/Quaternion orientation
|
37
|
+
float64[9] orientation_covariance # Row major about x, y, z axes
|
38
|
+
|
39
|
+
geometry_msgs/Vector3 angular_velocity
|
40
|
+
float64[9] angular_velocity_covariance # Row major about x, y, z axes
|
41
|
+
|
42
|
+
geometry_msgs/Vector3 linear_acceleration
|
43
|
+
float64[9] linear_acceleration_covariance # Row major x, y z
|
44
|
+
|
45
|
+
================================================================================
|
46
|
+
MSG: std_msgs/Header
|
47
|
+
# Standard metadata for higher-level stamped data types.
|
48
|
+
# This is generally used to communicate timestamped data
|
49
|
+
# in a particular coordinate frame.
|
50
|
+
#
|
51
|
+
# sequence ID: consecutively increasing ID
|
52
|
+
uint32 seq
|
53
|
+
#Two-integer timestamp that is expressed as:
|
54
|
+
# * stamp.secs: seconds (stamp_secs) since epoch
|
55
|
+
# * stamp.nsecs: nanoseconds since stamp_secs
|
56
|
+
# time-handling sugar is provided by the client library
|
57
|
+
time stamp
|
58
|
+
#Frame this data is associated with
|
59
|
+
# 0: no frame
|
60
|
+
# 1: global frame
|
61
|
+
string frame_id
|
62
|
+
|
63
|
+
================================================================================
|
64
|
+
MSG: geometry_msgs/Quaternion
|
65
|
+
# This represents an orientation in free space in quaternion form.
|
66
|
+
|
67
|
+
float64 x
|
68
|
+
float64 y
|
69
|
+
float64 z
|
70
|
+
float64 w
|
71
|
+
|
72
|
+
================================================================================
|
73
|
+
MSG: geometry_msgs/Vector3
|
74
|
+
# This represents a vector in free space.
|
75
|
+
|
76
|
+
float64 x
|
77
|
+
float64 y
|
78
|
+
float64 z
|
79
|
+
"
|
80
|
+
end
|
81
|
+
attr_accessor :header, :orientation, :orientation_covariance, :angular_velocity, :angular_velocity_covariance, :linear_acceleration, :linear_acceleration_covariance
|
82
|
+
|
83
|
+
@@struct_L3 = ::ROS::Struct.new("L3")
|
84
|
+
@@struct_d3 = ::ROS::Struct.new("d3")
|
85
|
+
@@struct_d4 = ::ROS::Struct.new("d4")
|
86
|
+
@@struct_d9 = ::ROS::Struct.new("d9")
|
87
|
+
|
88
|
+
@@struct_L = ::ROS::Struct.new("L")
|
89
|
+
@@slot_types = ['Header','geometry_msgs/Quaternion','float64[9]','geometry_msgs/Vector3','float64[9]','geometry_msgs/Vector3','float64[9]']
|
90
|
+
|
91
|
+
def initialize
|
92
|
+
# Constructor. Any message fields that are implicitly/explicitly
|
93
|
+
# set to None will be assigned a default value. The recommend
|
94
|
+
# use is keyword arguments as this is more robust to future message
|
95
|
+
# changes. You cannot mix in-order arguments and keyword arguments.
|
96
|
+
#
|
97
|
+
# The available fields are:
|
98
|
+
# header,orientation,orientation_covariance,angular_velocity,angular_velocity_covariance,linear_acceleration,linear_acceleration_covariance
|
99
|
+
#
|
100
|
+
# @param args: complete set of field values, in .msg order
|
101
|
+
# @param kwds: use keyword arguments corresponding to message field names
|
102
|
+
# to set specific fields.
|
103
|
+
#
|
104
|
+
|
105
|
+
# message fields cannot be None, assign default values for those that are
|
106
|
+
@header = Std_msgs::Header.new
|
107
|
+
@orientation = Geometry_msgs::Quaternion.new
|
108
|
+
@orientation_covariance = [0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0]
|
109
|
+
@angular_velocity = Geometry_msgs::Vector3.new
|
110
|
+
@angular_velocity_covariance = [0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0]
|
111
|
+
@linear_acceleration = Geometry_msgs::Vector3.new
|
112
|
+
@linear_acceleration_covariance = [0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0]
|
113
|
+
end
|
114
|
+
|
115
|
+
def _get_types
|
116
|
+
# internal API method
|
117
|
+
return @slot_types
|
118
|
+
end
|
119
|
+
|
120
|
+
def serialize(buff)
|
121
|
+
# serialize message into buffer
|
122
|
+
# @param buff: buffer
|
123
|
+
# @type buff: StringIO
|
124
|
+
begin
|
125
|
+
buff.write(@@struct_L3.pack(@header.seq, @header.stamp.secs, @header.stamp.nsecs))
|
126
|
+
_x = @header.frame_id
|
127
|
+
length = _x.length
|
128
|
+
buff.write([length, _x].pack("La#{length}"))
|
129
|
+
buff.write(@@struct_d4.pack(@orientation.x, @orientation.y, @orientation.z, @orientation.w))
|
130
|
+
buff.write(@@struct_d9.pack(*@orientation_covariance))
|
131
|
+
buff.write(@@struct_d3.pack(@angular_velocity.x, @angular_velocity.y, @angular_velocity.z))
|
132
|
+
buff.write(@@struct_d9.pack(*@angular_velocity_covariance))
|
133
|
+
buff.write(@@struct_d3.pack(@linear_acceleration.x, @linear_acceleration.y, @linear_acceleration.z))
|
134
|
+
buff.write(@@struct_d9.pack(*@linear_acceleration_covariance))
|
135
|
+
rescue => exception
|
136
|
+
raise "some erro in serialize: #{exception}"
|
137
|
+
|
138
|
+
end
|
139
|
+
end
|
140
|
+
|
141
|
+
def deserialize(str)
|
142
|
+
# unpack serialized message in str into this message instance
|
143
|
+
# @param str: byte array of serialized message
|
144
|
+
# @type str: str
|
145
|
+
|
146
|
+
begin
|
147
|
+
if @header == nil
|
148
|
+
@header = Std_msgs::Header.new
|
149
|
+
end
|
150
|
+
if @orientation == nil
|
151
|
+
@orientation = Geometry_msgs::Quaternion.new
|
152
|
+
end
|
153
|
+
if @angular_velocity == nil
|
154
|
+
@angular_velocity = Geometry_msgs::Vector3.new
|
155
|
+
end
|
156
|
+
if @linear_acceleration == nil
|
157
|
+
@linear_acceleration = Geometry_msgs::Vector3.new
|
158
|
+
end
|
159
|
+
end_point = 0
|
160
|
+
start = end_point
|
161
|
+
end_point += ROS::Struct::calc_size('L3')
|
162
|
+
(@header.seq, @header.stamp.secs, @header.stamp.nsecs,) = @@struct_L3.unpack(str[start..(end_point-1)])
|
163
|
+
start = end_point
|
164
|
+
end_point += 4
|
165
|
+
(length,) = @@struct_L.unpack(str[start..(end_point-1)])
|
166
|
+
start = end_point
|
167
|
+
end_point += length
|
168
|
+
@header.frame_id = str[start..(end_point-1)]
|
169
|
+
start = end_point
|
170
|
+
end_point += ROS::Struct::calc_size('d4')
|
171
|
+
(@orientation.x, @orientation.y, @orientation.z, @orientation.w,) = @@struct_d4.unpack(str[start..(end_point-1)])
|
172
|
+
start = end_point
|
173
|
+
end_point += 8
|
174
|
+
@orientation_covariance = @@struct_d9.unpack(str[start..(end_point-1)])
|
175
|
+
start = end_point
|
176
|
+
end_point += ROS::Struct::calc_size('d3')
|
177
|
+
(@angular_velocity.x, @angular_velocity.y, @angular_velocity.z,) = @@struct_d3.unpack(str[start..(end_point-1)])
|
178
|
+
start = end_point
|
179
|
+
end_point += 8
|
180
|
+
@angular_velocity_covariance = @@struct_d9.unpack(str[start..(end_point-1)])
|
181
|
+
start = end_point
|
182
|
+
end_point += ROS::Struct::calc_size('d3')
|
183
|
+
(@linear_acceleration.x, @linear_acceleration.y, @linear_acceleration.z,) = @@struct_d3.unpack(str[start..(end_point-1)])
|
184
|
+
start = end_point
|
185
|
+
end_point += 8
|
186
|
+
@linear_acceleration_covariance = @@struct_d9.unpack(str[start..(end_point-1)])
|
187
|
+
return self
|
188
|
+
rescue => exception
|
189
|
+
raise "message DeserializationError: #{exception}" #most likely buffer underfill
|
190
|
+
end
|
191
|
+
end
|
192
|
+
end # end of class
|
193
|
+
end # end of module
|
@@ -0,0 +1,195 @@
|
|
1
|
+
# autogenerated by genmsg_ruby from JointState.msg. Do not edit.
|
2
|
+
require 'ros/message'
|
3
|
+
|
4
|
+
require "std_msgs/Header"
|
5
|
+
|
6
|
+
module Sensor_msgs
|
7
|
+
|
8
|
+
class JointState <::ROS::Message
|
9
|
+
def self.md5sum
|
10
|
+
"3066dcd76a6cfaef579bd0f34173e9fd"
|
11
|
+
end
|
12
|
+
|
13
|
+
def self.type
|
14
|
+
"sensor_msgs/JointState"
|
15
|
+
end
|
16
|
+
|
17
|
+
def has_header?
|
18
|
+
true
|
19
|
+
end
|
20
|
+
|
21
|
+
def message_definition
|
22
|
+
"# This is a message that holds data to describe the state of a set of torque controlled joints.
|
23
|
+
#
|
24
|
+
# The state of each joint (revolute or prismatic) is defined by:
|
25
|
+
# * the position of the joint (rad or m),
|
26
|
+
# * the velocity of the joint (rad/s or m/s) and
|
27
|
+
# * the effort that is applied in the joint (Nm or N).
|
28
|
+
#
|
29
|
+
# Each joint is uniquely identified by its name
|
30
|
+
# The header specifies the time at which the joint states were recorded. All the joint states
|
31
|
+
# in one message have to be recorded at the same time.
|
32
|
+
#
|
33
|
+
# This message consists of a multiple arrays, one for each part of the joint state.
|
34
|
+
# The goal is to make each of the fields optional. When e.g. your joints have no
|
35
|
+
# effort associated with them, you can leave the effort array empty.
|
36
|
+
#
|
37
|
+
# All arrays in this message should have the same size, or be empty.
|
38
|
+
# This is the only way to uniquely associate the joint name with the correct
|
39
|
+
# states.
|
40
|
+
|
41
|
+
|
42
|
+
Header header
|
43
|
+
|
44
|
+
string[] name
|
45
|
+
float64[] position
|
46
|
+
float64[] velocity
|
47
|
+
float64[] effort
|
48
|
+
|
49
|
+
================================================================================
|
50
|
+
MSG: std_msgs/Header
|
51
|
+
# Standard metadata for higher-level stamped data types.
|
52
|
+
# This is generally used to communicate timestamped data
|
53
|
+
# in a particular coordinate frame.
|
54
|
+
#
|
55
|
+
# sequence ID: consecutively increasing ID
|
56
|
+
uint32 seq
|
57
|
+
#Two-integer timestamp that is expressed as:
|
58
|
+
# * stamp.secs: seconds (stamp_secs) since epoch
|
59
|
+
# * stamp.nsecs: nanoseconds since stamp_secs
|
60
|
+
# time-handling sugar is provided by the client library
|
61
|
+
time stamp
|
62
|
+
#Frame this data is associated with
|
63
|
+
# 0: no frame
|
64
|
+
# 1: global frame
|
65
|
+
string frame_id
|
66
|
+
|
67
|
+
"
|
68
|
+
end
|
69
|
+
attr_accessor :header, :name, :position, :velocity, :effort
|
70
|
+
|
71
|
+
@@struct_L3 = ::ROS::Struct.new("L3")
|
72
|
+
|
73
|
+
@@struct_L = ::ROS::Struct.new("L")
|
74
|
+
@@slot_types = ['Header','string[]','float64[]','float64[]','float64[]']
|
75
|
+
|
76
|
+
def initialize
|
77
|
+
# Constructor. Any message fields that are implicitly/explicitly
|
78
|
+
# set to None will be assigned a default value. The recommend
|
79
|
+
# use is keyword arguments as this is more robust to future message
|
80
|
+
# changes. You cannot mix in-order arguments and keyword arguments.
|
81
|
+
#
|
82
|
+
# The available fields are:
|
83
|
+
# header,name,position,velocity,effort
|
84
|
+
#
|
85
|
+
# @param args: complete set of field values, in .msg order
|
86
|
+
# @param kwds: use keyword arguments corresponding to message field names
|
87
|
+
# to set specific fields.
|
88
|
+
#
|
89
|
+
|
90
|
+
# message fields cannot be None, assign default values for those that are
|
91
|
+
@header = Std_msgs::Header.new
|
92
|
+
@name = []
|
93
|
+
@position = []
|
94
|
+
@velocity = []
|
95
|
+
@effort = []
|
96
|
+
end
|
97
|
+
|
98
|
+
def _get_types
|
99
|
+
# internal API method
|
100
|
+
return @slot_types
|
101
|
+
end
|
102
|
+
|
103
|
+
def serialize(buff)
|
104
|
+
# serialize message into buffer
|
105
|
+
# @param buff: buffer
|
106
|
+
# @type buff: StringIO
|
107
|
+
begin
|
108
|
+
buff.write(@@struct_L3.pack(@header.seq, @header.stamp.secs, @header.stamp.nsecs))
|
109
|
+
_x = @header.frame_id
|
110
|
+
length = _x.length
|
111
|
+
buff.write([length, _x].pack("La#{length}"))
|
112
|
+
length = @name.length
|
113
|
+
buff.write(@@struct_L.pack(length))
|
114
|
+
for val1 in @name
|
115
|
+
length = val1.length
|
116
|
+
buff.write([length, val1].pack("La#{length}"))
|
117
|
+
end
|
118
|
+
length = @position.length
|
119
|
+
buff.write(@@struct_L.pack(length))
|
120
|
+
pattern = "d#{length}"
|
121
|
+
buff.write(*@position.pack(pattern))
|
122
|
+
length = @velocity.length
|
123
|
+
buff.write(@@struct_L.pack(length))
|
124
|
+
pattern = "d#{length}"
|
125
|
+
buff.write(*@velocity.pack(pattern))
|
126
|
+
length = @effort.length
|
127
|
+
buff.write(@@struct_L.pack(length))
|
128
|
+
pattern = "d#{length}"
|
129
|
+
buff.write(*@effort.pack(pattern))
|
130
|
+
rescue => exception
|
131
|
+
raise "some erro in serialize: #{exception}"
|
132
|
+
|
133
|
+
end
|
134
|
+
end
|
135
|
+
|
136
|
+
def deserialize(str)
|
137
|
+
# unpack serialized message in str into this message instance
|
138
|
+
# @param str: byte array of serialized message
|
139
|
+
# @type str: str
|
140
|
+
|
141
|
+
begin
|
142
|
+
if @header == nil
|
143
|
+
@header = Std_msgs::Header.new
|
144
|
+
end
|
145
|
+
end_point = 0
|
146
|
+
start = end_point
|
147
|
+
end_point += ROS::Struct::calc_size('L3')
|
148
|
+
(@header.seq, @header.stamp.secs, @header.stamp.nsecs,) = @@struct_L3.unpack(str[start..(end_point-1)])
|
149
|
+
start = end_point
|
150
|
+
end_point += 4
|
151
|
+
(length,) = @@struct_L.unpack(str[start..(end_point-1)])
|
152
|
+
start = end_point
|
153
|
+
end_point += length
|
154
|
+
@header.frame_id = str[start..(end_point-1)]
|
155
|
+
start = end_point
|
156
|
+
end_point += 4
|
157
|
+
(length,) = @@struct_L.unpack(str[start..(end_point-1)])
|
158
|
+
@name = []
|
159
|
+
length.times do
|
160
|
+
start = end_point
|
161
|
+
end_point += 4
|
162
|
+
(length,) = @@struct_L.unpack(str[start..(end_point-1)])
|
163
|
+
start = end_point
|
164
|
+
end_point += length
|
165
|
+
val1 = str[start..(end_point-1)]
|
166
|
+
@name.push(val1)
|
167
|
+
end
|
168
|
+
start = end_point
|
169
|
+
end_point += 4
|
170
|
+
(length,) = @@struct_L.unpack(str[start..(end_point-1)])
|
171
|
+
pattern = "d#{length}"
|
172
|
+
start = end_point
|
173
|
+
end_point += ROS::Struct::calc_size("#{pattern}")
|
174
|
+
@position = str[start..(end_point-1)].unpack(pattern)
|
175
|
+
start = end_point
|
176
|
+
end_point += 4
|
177
|
+
(length,) = @@struct_L.unpack(str[start..(end_point-1)])
|
178
|
+
pattern = "d#{length}"
|
179
|
+
start = end_point
|
180
|
+
end_point += ROS::Struct::calc_size("#{pattern}")
|
181
|
+
@velocity = str[start..(end_point-1)].unpack(pattern)
|
182
|
+
start = end_point
|
183
|
+
end_point += 4
|
184
|
+
(length,) = @@struct_L.unpack(str[start..(end_point-1)])
|
185
|
+
pattern = "d#{length}"
|
186
|
+
start = end_point
|
187
|
+
end_point += ROS::Struct::calc_size("#{pattern}")
|
188
|
+
@effort = str[start..(end_point-1)].unpack(pattern)
|
189
|
+
return self
|
190
|
+
rescue => exception
|
191
|
+
raise "message DeserializationError: #{exception}" #most likely buffer underfill
|
192
|
+
end
|
193
|
+
end
|
194
|
+
end # end of class
|
195
|
+
end # end of module
|
@@ -0,0 +1,141 @@
|
|
1
|
+
# autogenerated by genmsg_ruby from Joy.msg. Do not edit.
|
2
|
+
require 'ros/message'
|
3
|
+
|
4
|
+
require "std_msgs/Header"
|
5
|
+
|
6
|
+
module Sensor_msgs
|
7
|
+
|
8
|
+
class Joy <::ROS::Message
|
9
|
+
def self.md5sum
|
10
|
+
"5a9ea5f83505693b71e785041e67a8bb"
|
11
|
+
end
|
12
|
+
|
13
|
+
def self.type
|
14
|
+
"sensor_msgs/Joy"
|
15
|
+
end
|
16
|
+
|
17
|
+
def has_header?
|
18
|
+
true
|
19
|
+
end
|
20
|
+
|
21
|
+
def message_definition
|
22
|
+
"# Reports the state of a joysticks axes and buttons.
|
23
|
+
Header header # timestamp in the header is the time the data is received from the joystick
|
24
|
+
float32[] axes # the axes measurements from a joystick
|
25
|
+
int32[] buttons # the buttons measurements from a joystick
|
26
|
+
|
27
|
+
================================================================================
|
28
|
+
MSG: std_msgs/Header
|
29
|
+
# Standard metadata for higher-level stamped data types.
|
30
|
+
# This is generally used to communicate timestamped data
|
31
|
+
# in a particular coordinate frame.
|
32
|
+
#
|
33
|
+
# sequence ID: consecutively increasing ID
|
34
|
+
uint32 seq
|
35
|
+
#Two-integer timestamp that is expressed as:
|
36
|
+
# * stamp.secs: seconds (stamp_secs) since epoch
|
37
|
+
# * stamp.nsecs: nanoseconds since stamp_secs
|
38
|
+
# time-handling sugar is provided by the client library
|
39
|
+
time stamp
|
40
|
+
#Frame this data is associated with
|
41
|
+
# 0: no frame
|
42
|
+
# 1: global frame
|
43
|
+
string frame_id
|
44
|
+
|
45
|
+
"
|
46
|
+
end
|
47
|
+
attr_accessor :header, :axes, :buttons
|
48
|
+
|
49
|
+
@@struct_L3 = ::ROS::Struct.new("L3")
|
50
|
+
|
51
|
+
@@struct_L = ::ROS::Struct.new("L")
|
52
|
+
@@slot_types = ['Header','float32[]','int32[]']
|
53
|
+
|
54
|
+
def initialize
|
55
|
+
# Constructor. Any message fields that are implicitly/explicitly
|
56
|
+
# set to None will be assigned a default value. The recommend
|
57
|
+
# use is keyword arguments as this is more robust to future message
|
58
|
+
# changes. You cannot mix in-order arguments and keyword arguments.
|
59
|
+
#
|
60
|
+
# The available fields are:
|
61
|
+
# header,axes,buttons
|
62
|
+
#
|
63
|
+
# @param args: complete set of field values, in .msg order
|
64
|
+
# @param kwds: use keyword arguments corresponding to message field names
|
65
|
+
# to set specific fields.
|
66
|
+
#
|
67
|
+
|
68
|
+
# message fields cannot be None, assign default values for those that are
|
69
|
+
@header = Std_msgs::Header.new
|
70
|
+
@axes = []
|
71
|
+
@buttons = []
|
72
|
+
end
|
73
|
+
|
74
|
+
def _get_types
|
75
|
+
# internal API method
|
76
|
+
return @slot_types
|
77
|
+
end
|
78
|
+
|
79
|
+
def serialize(buff)
|
80
|
+
# serialize message into buffer
|
81
|
+
# @param buff: buffer
|
82
|
+
# @type buff: StringIO
|
83
|
+
begin
|
84
|
+
buff.write(@@struct_L3.pack(@header.seq, @header.stamp.secs, @header.stamp.nsecs))
|
85
|
+
_x = @header.frame_id
|
86
|
+
length = _x.length
|
87
|
+
buff.write([length, _x].pack("La#{length}"))
|
88
|
+
length = @axes.length
|
89
|
+
buff.write(@@struct_L.pack(length))
|
90
|
+
pattern = "f#{length}"
|
91
|
+
buff.write(*@axes.pack(pattern))
|
92
|
+
length = @buttons.length
|
93
|
+
buff.write(@@struct_L.pack(length))
|
94
|
+
pattern = "l#{length}"
|
95
|
+
buff.write(*@buttons.pack(pattern))
|
96
|
+
rescue => exception
|
97
|
+
raise "some erro in serialize: #{exception}"
|
98
|
+
|
99
|
+
end
|
100
|
+
end
|
101
|
+
|
102
|
+
def deserialize(str)
|
103
|
+
# unpack serialized message in str into this message instance
|
104
|
+
# @param str: byte array of serialized message
|
105
|
+
# @type str: str
|
106
|
+
|
107
|
+
begin
|
108
|
+
if @header == nil
|
109
|
+
@header = Std_msgs::Header.new
|
110
|
+
end
|
111
|
+
end_point = 0
|
112
|
+
start = end_point
|
113
|
+
end_point += ROS::Struct::calc_size('L3')
|
114
|
+
(@header.seq, @header.stamp.secs, @header.stamp.nsecs,) = @@struct_L3.unpack(str[start..(end_point-1)])
|
115
|
+
start = end_point
|
116
|
+
end_point += 4
|
117
|
+
(length,) = @@struct_L.unpack(str[start..(end_point-1)])
|
118
|
+
start = end_point
|
119
|
+
end_point += length
|
120
|
+
@header.frame_id = str[start..(end_point-1)]
|
121
|
+
start = end_point
|
122
|
+
end_point += 4
|
123
|
+
(length,) = @@struct_L.unpack(str[start..(end_point-1)])
|
124
|
+
pattern = "f#{length}"
|
125
|
+
start = end_point
|
126
|
+
end_point += ROS::Struct::calc_size("#{pattern}")
|
127
|
+
@axes = str[start..(end_point-1)].unpack(pattern)
|
128
|
+
start = end_point
|
129
|
+
end_point += 4
|
130
|
+
(length,) = @@struct_L.unpack(str[start..(end_point-1)])
|
131
|
+
pattern = "l#{length}"
|
132
|
+
start = end_point
|
133
|
+
end_point += ROS::Struct::calc_size("#{pattern}")
|
134
|
+
@buttons = str[start..(end_point-1)].unpack(pattern)
|
135
|
+
return self
|
136
|
+
rescue => exception
|
137
|
+
raise "message DeserializationError: #{exception}" #most likely buffer underfill
|
138
|
+
end
|
139
|
+
end
|
140
|
+
end # end of class
|
141
|
+
end # end of module
|