Class: Pr2_controllers_msgs::PointHeadFeedback
- Inherits:
-
ROS::Message
- Object
- ROS::Message
- Pr2_controllers_msgs::PointHeadFeedback
- Defined in:
- lib/pr2_controllers_msgs/PointHeadFeedback.rb
Constant Summary collapse
- @@struct_d =
::ROS::Struct.new("d")
- @@struct_L =
::ROS::Struct.new("L")
- @@slot_types =
['float64']
Instance Attribute Summary collapse
-
#pointing_angle_error ⇒ Object
Returns the value of attribute pointing_angle_error.
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 = {}) ⇒ PointHeadFeedback
constructor
Constructor.
- #message_definition ⇒ Object
-
#serialize(buff) ⇒ Object
serialize message into buffer.
Constructor Details
#initialize(args = {}) ⇒ PointHeadFeedback
Constructor. You can set the default values using keyword operators.
37 38 39 40 41 42 43 44 |
# File 'lib/pr2_controllers_msgs/PointHeadFeedback.rb', line 37 def initialize(args={}) # message fields cannot be None, assign default values for those that are if args[:pointing_angle_error] @pointing_angle_error = args[:pointing_angle_error] else @pointing_angle_error = 0.0 end end |
Instance Attribute Details
#pointing_angle_error ⇒ Object
Returns the value of attribute pointing_angle_error.
26 27 28 |
# File 'lib/pr2_controllers_msgs/PointHeadFeedback.rb', line 26 def pointing_angle_error @pointing_angle_error end |
Class Method Details
.md5sum ⇒ Object
8 9 10 |
# File 'lib/pr2_controllers_msgs/PointHeadFeedback.rb', line 8 def self.md5sum "cce80d27fd763682da8805a73316cab4" end |
.type ⇒ Object
12 13 14 |
# File 'lib/pr2_controllers_msgs/PointHeadFeedback.rb', line 12 def self.type "pr2_controllers_msgs/PointHeadFeedback" end |
Instance Method Details
#_get_types ⇒ String
internal API method
48 49 50 |
# File 'lib/pr2_controllers_msgs/PointHeadFeedback.rb', line 48 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
65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/pr2_controllers_msgs/PointHeadFeedback.rb', line 65 def deserialize(str) begin end_point = 0 start = end_point end_point += ROS::Struct::calc_size('d') (@pointing_angle_error,) = @@struct_d.unpack(str[start..(end_point-1)]) return self rescue => exception raise "message DeserializationError: #{exception}" #most likely buffer underfill end end |
#has_header? ⇒ Boolean
16 17 18 |
# File 'lib/pr2_controllers_msgs/PointHeadFeedback.rb', line 16 def has_header? false end |
#message_definition ⇒ Object
20 21 22 23 24 25 |
# File 'lib/pr2_controllers_msgs/PointHeadFeedback.rb', line 20 def "# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== float64 pointing_angle_error " end |
#serialize(buff) ⇒ Object
serialize message into buffer
54 55 56 57 58 59 60 61 |
# File 'lib/pr2_controllers_msgs/PointHeadFeedback.rb', line 54 def serialize(buff) begin buff.write(@@struct_d.pack(@pointing_angle_error)) rescue => exception raise "some erro in serialize: #{exception}" end end |