Method: Geometry_msgs::Pose#initialize

Defined in:
lib/geometry_msgs/Pose.rb

#initialize(args = {}) ⇒ Pose

Constructor. You can set the default values using keyword operators.

Parameters:

  • args (Hash) (defaults to: {})

    keyword for initializing values

Options Hash (args):

  • :position (geometry_msgs/Point)

    initialize value

  • :orientation (geometry_msgs/Quaternion)

    initialize value



57
58
59
60
61
62
63
64
65
66
67
68
69
# File 'lib/geometry_msgs/Pose.rb', line 57

def initialize(args={})
  # message fields cannot be None, assign default values for those that are
  if args[:position]
    @position = args[:position]
  else
    @position = Geometry_msgs::Point.new
  end
  if args[:orientation]
    @orientation = args[:orientation]
  else
    @orientation = Geometry_msgs::Quaternion.new
  end
end