Class: Pr2_controllers_msgs::PointHeadActionGoal
- Inherits:
-
ROS::Message
- Object
- ROS::Message
- Pr2_controllers_msgs::PointHeadActionGoal
- Defined in:
- lib/pr2_controllers_msgs/PointHeadActionGoal.rb
Constant Summary collapse
- @@struct_L3 =
::ROS::Struct.new("L3")
- @@struct_d6 =
::ROS::Struct.new("d6")
- @@struct_L2 =
::ROS::Struct.new("L2")
- @@struct_l2d =
::ROS::Struct.new("l2d")
- @@struct_L =
::ROS::Struct.new("L")
- @@slot_types =
['Header','actionlib_msgs/GoalID','pr2_controllers_msgs/PointHeadGoal']
Instance Attribute Summary collapse
-
#goal ⇒ Object
Returns the value of attribute goal.
-
#goal_id ⇒ Object
Returns the value of attribute goal_id.
-
#header ⇒ Object
Returns the value of attribute header.
Class Method Summary collapse
Instance Method Summary collapse
-
#_get_types ⇒ String
internal API method.
-
#deserialize(str) ⇒ Object
unpack serialized message in str into this message instance @param [String] str: byte array of serialized message.
- #has_header? ⇒ Boolean
-
#initialize(args = {}) ⇒ PointHeadActionGoal
constructor
Constructor.
- #message_definition ⇒ Object
-
#serialize(buff) ⇒ Object
serialize message into buffer.
Constructor Details
#initialize(args = {}) ⇒ PointHeadActionGoal
Constructor. You can set the default values using keyword operators.
113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 |
# File 'lib/pr2_controllers_msgs/PointHeadActionGoal.rb', line 113 def initialize(args={}) # message fields cannot be None, assign default values for those that are if args[:header] @header = args[:header] else @header = Std_msgs::Header.new end if args[:goal_id] @goal_id = args[:goal_id] else @goal_id = Actionlib_msgs::GoalID.new end if args[:goal] @goal = args[:goal] else @goal = Pr2_controllers_msgs::PointHeadGoal.new end end |
Instance Attribute Details
#goal ⇒ Object
Returns the value of attribute goal.
97 98 99 |
# File 'lib/pr2_controllers_msgs/PointHeadActionGoal.rb', line 97 def goal @goal end |
#goal_id ⇒ Object
Returns the value of attribute goal_id.
97 98 99 |
# File 'lib/pr2_controllers_msgs/PointHeadActionGoal.rb', line 97 def goal_id @goal_id end |
#header ⇒ Object
Returns the value of attribute header.
97 98 99 |
# File 'lib/pr2_controllers_msgs/PointHeadActionGoal.rb', line 97 def header @header end |
Class Method Details
.md5sum ⇒ Object
16 17 18 |
# File 'lib/pr2_controllers_msgs/PointHeadActionGoal.rb', line 16 def self.md5sum "b53a8323d0ba7b310ba17a2d3a82a6b8" end |
.type ⇒ Object
20 21 22 |
# File 'lib/pr2_controllers_msgs/PointHeadActionGoal.rb', line 20 def self.type "pr2_controllers_msgs/PointHeadActionGoal" end |
Instance Method Details
#_get_types ⇒ String
internal API method
134 135 136 |
# File 'lib/pr2_controllers_msgs/PointHeadActionGoal.rb', line 134 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
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 |
# File 'lib/pr2_controllers_msgs/PointHeadActionGoal.rb', line 167 def deserialize(str) begin if @header == nil @header = Std_msgs::Header.new end if @goal_id == nil @goal_id = Actionlib_msgs::GoalID.new end if @goal == nil @goal = Pr2_controllers_msgs::PointHeadGoal.new end end_point = 0 start = end_point end_point += ROS::Struct::calc_size('L3') (@header.seq, @header.stamp.secs, @header.stamp.nsecs,) = @@struct_L3.unpack(str[start..(end_point-1)]) start = end_point end_point += 4 (length,) = @@struct_L.unpack(str[start..(end_point-1)]) start = end_point end_point += length @header.frame_id = str[start..(end_point-1)] start = end_point end_point += ROS::Struct::calc_size('L2') (@goal_id.stamp.secs, @goal_id.stamp.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 @goal_id.id = str[start..(end_point-1)] start = end_point end_point += ROS::Struct::calc_size('L3') (@goal.target.header.seq, @goal.target.header.stamp.secs, @goal.target.header.stamp.nsecs,) = @@struct_L3.unpack(str[start..(end_point-1)]) start = end_point end_point += 4 (length,) = @@struct_L.unpack(str[start..(end_point-1)]) start = end_point end_point += length @goal.target.header.frame_id = str[start..(end_point-1)] start = end_point end_point += ROS::Struct::calc_size('d6') (@goal.target.point.x, @goal.target.point.y, @goal.target.point.z, @goal.pointing_axis.x, @goal.pointing_axis.y, @goal.pointing_axis.z,) = @@struct_d6.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 @goal.pointing_frame = str[start..(end_point-1)] start = end_point end_point += ROS::Struct::calc_size('l2d') (@goal.min_duration.secs, @goal.min_duration.nsecs, @goal.max_velocity,) = @@struct_l2d.unpack(str[start..(end_point-1)]) return self rescue => exception raise "message DeserializationError: #{exception}" #most likely buffer underfill end end |
#has_header? ⇒ Boolean
24 25 26 |
# File 'lib/pr2_controllers_msgs/PointHeadActionGoal.rb', line 24 def has_header? true end |
#message_definition ⇒ Object
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
# File 'lib/pr2_controllers_msgs/PointHeadActionGoal.rb', line 28 def "# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== Header header actionlib_msgs/GoalID goal_id PointHeadGoal goal ================================================================================ 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: actionlib_msgs/GoalID # The stamp should store the time at which this goal was requested. # It is used by an action server when it tries to preempt all # goals that were requested before a certain time time stamp # The id provides a way to associate feedback and # result message with specific goal requests. The id # specified must be unique. string id ================================================================================ MSG: pr2_controllers_msgs/PointHeadGoal # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== geometry_msgs/PointStamped target geometry_msgs/Vector3 pointing_axis string pointing_frame duration min_duration float64 max_velocity ================================================================================ MSG: geometry_msgs/PointStamped # This represents a Point with reference coordinate frame and timestamp Header header Point point ================================================================================ MSG: geometry_msgs/Point # This contains the position of a point in free space float64 x float64 y float64 z ================================================================================ MSG: geometry_msgs/Vector3 # This represents a vector in free space. float64 x float64 y float64 z " end |
#serialize(buff) ⇒ Object
serialize message into buffer
140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 |
# File 'lib/pr2_controllers_msgs/PointHeadActionGoal.rb', line 140 def serialize(buff) begin buff.write(@@struct_L3.pack(@header.seq, @header.stamp.secs, @header.stamp.nsecs)) _x = @header.frame_id length = _x.length buff.write([length, _x].pack("La#{length}")) buff.write(@@struct_L2.pack(@goal_id.stamp.secs, @goal_id.stamp.nsecs)) _x = @goal_id.id length = _x.length buff.write([length, _x].pack("La#{length}")) buff.write(@@struct_L3.pack(@goal.target.header.seq, @goal.target.header.stamp.secs, @goal.target.header.stamp.nsecs)) _x = @goal.target.header.frame_id length = _x.length buff.write([length, _x].pack("La#{length}")) buff.write(@@struct_d6.pack(@goal.target.point.x, @goal.target.point.y, @goal.target.point.z, @goal.pointing_axis.x, @goal.pointing_axis.y, @goal.pointing_axis.z)) _x = @goal.pointing_frame length = _x.length buff.write([length, _x].pack("La#{length}")) buff.write(@@struct_l2d.pack(@goal.min_duration.secs, @goal.min_duration.nsecs, @goal.max_velocity)) rescue => exception raise "some erro in serialize: #{exception}" end end |