|
Hormodular 1.0
Locomotion gait discovery by using digital hormones on modular robots
|
3D vector representing the orientation of a module More...
#include <Orientation.hpp>
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. | |
3D vector representing the orientation of a module
1.7.4