INTRODUCTION
Overview
Download and Install
Quick Start
Documentation
Publications

NONFRAMEWORK CODE
Driver Interfaces
Drivers
Libraries
Utilities

FRAMEWORK CODE
Interfaces
Components
Libraries
Utilities

Full Software Listings

DEVELOPER
Tutorials
Examples
Dev Guide
Dashboard

PEOPLE
Contributors
Users

SourceForge.net Logo
Project
Download
Mailing lists

 

         

hydrolibs/hydrobros1/types.h

00001 /*
00002  * Orca-Robotics Project: Components for robotics 
00003  *               http://orca-robotics.sf.net/
00004  * Copyright (c) 2004-2009 Alex Brooks, Alexei Makarenko, Tobias Kaupp
00005  *
00006  * This distribution is licensed to you under the terms described in
00007  * the LICENSE file included in this distribution.
00008  *
00009  */
00010 
00011 #ifndef BROS_1_H
00012 #define BROS_1_H
00013 
00014 // Definitions in this file are based on the discussion in the Player mailing list
00015 // taken place in 2003. Specifically, these are C++ encoding of standard
00016 // definitions proposed by Herman Bruyninckx.
00017 
00018 namespace hydrobros1
00019 {
00020 
00021 // One dimensional ("linear") objects
00022 
00024 typedef double Dimension;
00026 typedef int DiscreteDimension;
00028 typedef double RotationAngle; 
00030 typedef double OrientationAngle;
00032 typedef double HeadingAngle;
00034 typedef double AngularVelocity2d;
00036 typedef double AngularAcceleration2d;
00038 typedef double Moment2d;
00039 
00040 
00041 // Two-dimensional ("planar") objects
00042 
00044 struct CartesianPoint2d
00045 {
00047     CartesianPoint2d( const double& xin=0.0, const double& yin=0.0 ) :
00048         x(xin), y(yin) {};
00050     double x;
00052     double y;
00053 };
00055 struct CartesianVelocity2d
00056 {
00058     CartesianVelocity2d( const double& xin=0.0, const double& yin=0.0 ) :
00059         x(xin), y(yin) {};
00061     double x;
00063     double y;
00064 };
00066 struct CartesianAcceleration2d
00067 {
00069     CartesianAcceleration2d( const double& xin=0.0, const double& yin=0.0 ) :
00070         x(xin), y(yin) {};
00072     double x;
00074     double y;
00075 };
00077 struct PolarPoint2d
00078 {
00080     PolarPoint2d( const double& rin=0.0, const double& oin=0.0 ) :
00081         r(rin), o(oin) {};
00083     double r;
00085     OrientationAngle o;
00086 };
00088 struct PolarVelocity2d
00089 {
00091     PolarVelocity2d( const double& rin=0.0, const double& oin=0.0 ) :
00092         r(rin), o(oin) {};
00094     double r;
00096     OrientationAngle o;
00097 };
00099 struct PolarAcceleration2d
00100 {
00102     PolarAcceleration2d( const double& rin=0.0, const double& oin=0.0 ) :
00103         r(rin), o(oin) {};
00105     double r;
00107     OrientationAngle o;
00108 };
00110 struct Vector2d
00111 {
00113     Vector2d( const double& xin=0.0, const double& yin=0.0 ) :
00114         x(xin), y(yin) {};
00116     double x;
00118     double y;
00119 };
00121 struct Frame2d
00122 {
00124     Frame2d( const double& px=0.0, const double& py=0.0, const double& oin=0.0 ) :
00125         p(px,py), o(oin) {};
00127     Frame2d( const CartesianPoint2d& pin, const double& oin=0.0 ) :
00128         p(pin.x,pin.y), o(oin) {};
00130     CartesianPoint2d p;
00132     OrientationAngle o;
00133 };
00135 struct Twist2d
00136 {
00138     Twist2d( const double& vx=0.0, const double& vy=0.0, const double& win=0.0 ) :
00139         v(vx,vy), w(win) {};
00141     Twist2d( const CartesianVelocity2d& vin, const double& win=0.0 ) :
00142         v(vin.x,vin.y), w(win) {};
00144     CartesianVelocity2d v;
00146     AngularVelocity2d w;
00147 };
00149 struct Force2d
00150 {
00152     Force2d( const double& xin=0.0, const double& yin=0.0 ) :
00153         x(xin), y(yin) {};
00155     double x;
00157     double y;
00158 };
00160 struct Wrench2d
00161 {
00163     Wrench2d( const double& fx=0.0, const double& fy=0.0, const double& min=0.0 ) :
00164         f(fx,fy), m(min) {};
00166     Wrench2d( const Force2d& fin, const double& min=0.0 ) :
00167         f(fin.x,fin.y), m(min) {};
00169     Force2d f;
00171     Moment2d m;
00172 };
00174 struct Size2d
00175 {
00177     Size2d( const double& lin=0.0, const double& win=0.0 ) :
00178         l(lin), w(win) {};
00180     double l;
00182     double w;
00183 };
00185 struct DiscreteSize2d
00186 {
00188     DiscreteSize2d( int lin=0, int win=0 ) :
00189         l(lin), w(win) {};
00191     int l;
00193     int w;
00194 };
00195 
00196 // Three-dimensional objects
00197 
00199 struct CartesianPoint3d
00200 {
00202     CartesianPoint3d( const double& xin=0.0, const double& yin=0.0, const double& zin=0.0 ) :
00203         x(xin), y(yin), z(zin) {};
00205     double x;
00207     double y;
00209     double z;
00210 };
00212 struct CartesianVector3d
00213 {
00215     CartesianVector3d( const double& xin=0.0, const double& yin=0.0, const double& zin=0.0 ) :
00216         x(xin), y(yin), z(zin) {};
00218     double x;
00220     double y;
00222     double z;
00223 };
00225 struct CartesianVelocity3d
00226 {
00228     CartesianVelocity3d( const double& xin=0.0, const double& yin=0.0, const double& zin=0.0 ) :
00229         x(xin), y(yin), z(zin) {};
00231     double x;
00233     double y;
00235     double z;
00236 };
00238 struct CartesianAcceleration3d
00239 {
00241     CartesianAcceleration3d( const double& xin=0.0, const double& yin=0.0, const double& zin=0.0 ) :
00242         x(xin), y(yin), z(zin) {};
00244     double x;
00246     double y;
00248     double z;
00249 };
00251 struct AngularVelocity3d
00252 {
00254     AngularVelocity3d( const double& xin=0.0, const double& yin=0.0, const double& zin=0.0 ) :
00255         x(xin), y(yin), z(zin) {};
00257     double x;
00259     double y;
00261     double z;
00262 };
00264 struct AngularAcceleration3d
00265 {
00267     AngularAcceleration3d( const double& xin=0.0, const double& yin=0.0, const double& zin=0.0 ) :
00268         x(xin), y(yin), z(zin) {};
00270     double x;
00272     double y;
00274     double z;
00275 };
00277 struct Force3d
00278 {
00280     Force3d( const double& xin=0.0, const double& yin=0.0, const double& zin=0.0 ) :
00281         x(xin), y(yin), z(zin) {};
00283     double x;
00285     double y;
00287     double z;
00288 };
00290 struct Moment3d
00291 {
00293     Moment3d( const double& xin=0.0, const double& yin=0.0, const double& zin=0.0 ) :
00294         x(xin), y(yin), z(zin) {};
00296     double x;
00298     double y;
00300     double z;
00301 };
00303 struct Twist3d
00304 {
00306     Twist3d( const double& vx=0.0, const double& vy=0.0, const double& vz=0.0,
00307              const double& wx=0.0, const double& wy=0.0, const double& wz=0.0 ) :
00308         v(vx,vy,vz), w(wx,wy,wz) {};
00310     Twist3d( const CartesianVelocity3d& vin, const AngularVelocity3d& win ) :
00311         v(vin.x,vin.y,vin.z), w(win.x,win.y,win.z) {};
00313     CartesianVelocity3d v;
00315     AngularVelocity3d w;
00316 };
00318 struct Wrench3d
00319 {
00321     Wrench3d( const double& fx=0.0, const double& fy=0.0, const double& fz=0.0,
00322               const double& mx=0.0, const double& my=0.0, const double& mz=0.0 ) :
00323         f(fx,fy,fz), m(mx,my,mz) {};
00325     Wrench3d( const Force3d& fin, const Moment3d& min ) :
00326         f(fin.x,fin.y,fin.z), m(min.x,min.y,min.z) {};
00328     Force3d  f;
00330     Moment3d m;
00331 };
00333 struct OrientationE3d
00334 {
00336     OrientationE3d( const double& rin=0.0, const double& pin=0.0, const double& yin=0.0 ) :
00337         r(rin), p(pin), y(yin) {};
00339     OrientationAngle r;
00341     OrientationAngle p;
00343     OrientationAngle y;
00344 };
00346 struct Frame3d
00347 {
00349     Frame3d( const double& px=0.0, const double& py=0.0, const double& pz=0.0,
00350              const double& oroll=0.0, const double& op=0.0, const double& oy=0.0 ) :
00351         p(px,py,pz), o(oroll,op,oy) {};
00353     Frame3d( const CartesianPoint3d& pin, const OrientationE3d& oin ) :
00354         p(pin.x,pin.y,pin.z), o(oin.r,oin.p,oin.y) {};
00356     CartesianPoint3d p;
00358     OrientationE3d   o;
00359 };
00361 struct Size3d
00362 {
00364     Size3d( const double& lin=0.0, const double& win=0.0, const double& hin=0.0 ) :
00365         l(lin), w(win), h(hin) {};
00367     Dimension l;
00369     Dimension w;
00371     Dimension h;
00372 };
00374 struct DiscreteSize3d
00375 {
00377     DiscreteSize3d( int lin=0, int win=0, int hin=0 ) :
00378         l(lin), w(win), h(hin) {};
00380     DiscreteDimension l;
00382     DiscreteDimension w;
00384     DiscreteDimension h;
00385 };
00386 
00387 }; // namespace
00388 
00389 #endif
 

Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)


Generated for Orca Robotics by  doxygen 1.4.5