Hormodular 1.0
Locomotion gait discovery by using digital hormones on modular robots
Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Friends
hormodular::Orientation Class Reference

3D vector representing the orientation of a module More...

#include <Orientation.hpp>

List of all members.

Public Member Functions

 Orientation ()
 Orientation (int roll, int pitch, int yaw)
 Orientation (std::string serialized_orientation)
 Creates an Orientation object from a space-separated string containing the serialized data.
Orientation & operator+= (const Orientation &a)
 Sums the Orientations component by component.
Orientation & operator-= (const Orientation &b)
 Substracts the Orientations component by component.
int getRoll () const
void setRoll (int value)
int getPitch () const
void setPitch (int value)
int getYaw () const
void setYaw (int value)
std::string str ()
 Outputs a space-separated string containing the serialized data for this orientation.

Static Public Member Functions

static int getRelativeOrientation (int connector, Orientation localOrient, Orientation remoteOrient)
 Returns the relative orientaion between two orientations, encoded as a number between 0 and 3.

Private Member Functions

int angle0to360 (int angle)
 Maps the current angle to a value between 0 and 360.

Static Private Member Functions

static double deg2rad (double angle)
 Converts an angle in degrees to radians.
static double rad2deg (double angle)
 Converts an angle in radians to degrees.
static bool vector_equal (Eigen::Vector3d a, Eigen::Vector3d b)
 Checks if two Eigen::Vector3d are equal.

Private Attributes

int roll
int pitch
int yaw

Friends

Orientation operator+ (Orientation &a, Orientation &b)
 Sums the Orientations component by component.
Orientation operator- (Orientation &a, Orientation &b)
 Substracts the Orientations component by component.

Detailed Description

3D vector representing the orientation of a module


The documentation for this class was generated from the following files:
 All Classes Functions Variables Friends