Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

# Tools/Actorics/RobotVertices.h

Go to the documentation of this file.

    00001 /**
    00002 * @file RobotVertices.h
    00003 *
    00004 * Definition of RobotVertices struct.
    00005 *
    00006 * @author Uwe Düffert
    00007 */
    00008 #ifndef __ROBOTVERTICES_H__
    00009 #define __ROBOTVERTICES_H__
    00010
    00011 #include "Tools/Streams/InOut.h"
    00012 #include "Tools/Math/Vector3.h"
    00013 #include "Tools/RobotConfiguration.h"
    00014
    00015 /**
    00016 * The RobotVertices struct contains the 3D position of important
    00017 * points of the robot like the shoulder, knee and foot positions.
    00018 * All positions are relative to the neck or a point below the neck.
    00019 * So the coordinate of the neck will always be (0,0,z)
    00020 * @author Uwe Düffert
    00021 */
    00022 struct RobotVertices
    00023 {
    00024 public:
    00025   Vector3<double> neck;
    00026   //order is the same as in Kinematics::LegIndex{fr,fl,hr,hl}:
    00027   Vector3<double> shoulderPosition[4];
    00028   Vector3<double> kneePosition[4];
    00029   Vector3<double> footPosition[4];
    00030   double bodyTilt;
    00031   double bodyRoll;
    00032   double neckHeight;
    00033   unsigned frameNumber;
    00034
    00035   /** Default constructor */
    00036   RobotVertices() : bodyTilt(0), bodyRoll(0), neckHeight(0), frameNumber(0) {}
    00037
    00038   /** Constructor.
    00039   * Constructs vertices for a robot with all joints set to 0.
    00040   * @param r The dimensions of the robot.
    00041   */
    00042   RobotVertices(const RobotDimensions& r);
    00043 };
    00044
    00045 /**
    00046  * Streaming operator that reads a RobotVertices from a stream.
    00047  * @param stream The stream from which is read.
    00048  * @param robotVertices The RobotVertices object.
    00049  * @return The stream.
    00050  */
    00051 In& operator>>(In& stream,RobotVertices& robotVertices);
    00052
    00053 /**
    00054  * Streaming operator that writes a RobotVertices to a stream.
    00055  * @param stream The stream to write on.
    00056  * @param robotVertices The RobotVertices object.
    00057  * @return The stream.
    00058  */
    00059 Out& operator<<(Out& stream, const RobotVertices& robotVertices);
    00060
    00061 #endif //__ROBOTVERTICES_H__