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
95 96 97 98 |
# File 'lib/roby/state/pos.rb', line 95 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
92 93 94 |
# File 'lib/roby/state/pos.rb', line 92 def pitch @pitch end |
#roll ⇒ Object
The orientation angles
92 93 94 |
# File 'lib/roby/state/pos.rb', line 92 def roll @roll end |
#yaw ⇒ Object
The orientation angles
92 93 94 |
# File 'lib/roby/state/pos.rb', line 92 def yaw @yaw end |
Instance Method Details
#to_s ⇒ Object
:nodoc:
105 106 107 |
# File 'lib/roby/state/pos.rb', line 105 def to_s # :nodoc: "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]
101 102 103 |
# File 'lib/roby/state/pos.rb', line 101 def ypr [yaw, pitch, roll] end |