Class: Roby::Pos::Euler3D
Overview
This class represents both a position and an orientation
Instance Attribute Summary collapse
-
#pitch ⇒ Object
The orientation angles.
-
#roll ⇒ Object
The orientation angles.
-
#yaw ⇒ Object
The orientation angles.
Attributes inherited from Vector3D
Instance Method Summary collapse
-
#initialize(x = 0, y = 0, z = 0, yaw = 0, pitch = 0, roll = 0) ⇒ Euler3D
constructor
Create an euler position object.
-
#to_s ⇒ Object
:nodoc:.
-
#ypr ⇒ Object
Returns [yaw, pitch, roll].
Methods inherited from Vector3D
#*, #+, #-, #-@, #/, #==, #distance, #distance2d, #length, #null?, #pretty_print, #xyz
Constructor Details
#initialize(x = 0, y = 0, z = 0, yaw = 0, pitch = 0, roll = 0) ⇒ Euler3D
Create an euler position object
119 120 121 122 |
# File 'lib/roby/state/pos.rb', line 119 def initialize(x = 0, y = 0, z = 0, yaw = 0, pitch = 0, roll = 0) super(x, y, z) @yaw, @pitch, @roll = yaw, pitch, roll end |
Instance Attribute Details
#pitch ⇒ Object
The orientation angles
116 117 118 |
# File 'lib/roby/state/pos.rb', line 116 def pitch @pitch end |
#roll ⇒ Object
The orientation angles
116 117 118 |
# File 'lib/roby/state/pos.rb', line 116 def roll @roll end |
#yaw ⇒ Object
The orientation angles
116 117 118 |
# File 'lib/roby/state/pos.rb', line 116 def yaw @yaw end |
Instance Method Details
#to_s ⇒ Object
:nodoc:
129 130 131 |
# File 'lib/roby/state/pos.rb', line 129 def to_s # :nodoc: format("Euler3D(x=%f,y=%f,z=%f,y=%f,p=%f,r=%f)", x, y, z, yaw, pitch, roll) end |
#ypr ⇒ Object
Returns [yaw, pitch, roll]
125 126 127 |
# File 'lib/roby/state/pos.rb', line 125 def ypr [yaw, pitch, roll] end |