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

Representations/Cognition/RobotState.cpp

Go to the documentation of this file.
00001 /**
00002  * @file RobotState.cpp
00003  *
00004  * Implementation of class RobotState.
00005  */
00006 
00007 #include "RobotState.h"
00008 
00009 RobotState::RobotState()
00010 {
00011   state = undefined;
00012   
00013   collisionFrontLeft = false;
00014   collisionFrontRight = false;
00015   collisionHindLeft = false;
00016   collisionHindRight = false;
00017   collisionHead = false;
00018   collisionAggregate = false;
00019 
00020   somethingInFrontOfChest = false;
00021   timeWhenSomethingWasInFrontOfChestLast = 0;
00022 
00023   consecutiveCollisionTimeFrontLeft = 0;
00024   consecutiveCollisionTimeFrontRight = 0;
00025   consecutiveCollisionTimeHindLeft = 0;
00026   consecutiveCollisionTimeHindRight = 0;
00027   consecutiveCollisionTimeHead = 0;
00028   consecutiveCollisionTimeAggregate = 0;
00029   
00030   collisionSide = 0;
00031   
00032   acceleration = Vector3<double>(0,0,0);
00033 }
00034 
00035 RobotState::~RobotState()
00036 {
00037 }
00038 
00039 void RobotState::operator=(const RobotState& other)
00040 {
00041   state = other.state;
00042 }
00043 
00044 In& operator>>(In& stream,RobotState& robotState)
00045 {
00046   stream >> robotState.frameNumber;
00047   stream.read(&robotState,sizeof(RobotState));
00048   return stream;
00049 }
00050 
00051 Out& operator<<(Out& stream, const RobotState& robotState)
00052 {
00053   stream << robotState.frameNumber;
00054   stream.write(&robotState,sizeof(RobotState));
00055   return stream;
00056 }
00057 
00058 /*
00059  * Change log :
00060  * 
00061  * $Log: RobotState.cpp,v $
00062  * Revision 1.5  2004/06/23 11:02:27  goehring
00063  * Xabsl symbol collision-side added
00064  *
00065  * Revision 1.4  2004/06/08 18:34:42  juengel
00066  * Added robot-state.time-since-something-was-in-front-of-chest.
00067  *
00068  * Revision 1.3  2004/05/25 12:36:51  tim
00069  * added body PSD data
00070  *
00071  * Revision 1.2  2004/05/24 14:16:06  juengel
00072  * New button evaluation.
00073  *
00074  * Revision 1.1.1.1  2004/05/22 17:25:16  cvsadm
00075  * created new repository GT2004_WM
00076  *
00077  * Revision 1.3  2004/02/10 11:12:08  dueffert
00078  * acceleration added; frameNumber is unsigned long everywhere
00079  *
00080  * Revision 1.2  2003/11/14 19:02:25  goehring
00081  * frameNumber added
00082  *
00083  * Revision 1.1  2003/10/07 10:07:01  cvsadm
00084  * Created GT2004 (M.J.)
00085  *
00086  * Revision 1.1.1.1  2003/07/02 09:40:22  cvsadm
00087  * created new repository for the competitions in Padova from the 
00088  * tamara CVS (Tuesday 2:00 pm)
00089  *
00090  * removed unused solutions
00091  *
00092  * Revision 1.2  2003/06/20 10:31:59  goehring
00093  * Added CollisionStates
00094  *
00095  * Revision 1.1  2002/09/10 15:26:39  cvsadm
00096  * Created new project GT2003 (M.L.)
00097  * - Cleaned up the /Src/DataTypes directory
00098  * - Removed Challenge Code
00099  * - Removed processing of incoming audio data
00100  * - Renamed AcousticMessage to SoundRequest
00101  *
00102  * Revision 1.1.1.1  2002/05/10 12:40:13  cvsadm
00103  * Moved GT2002 Project from ute to tamara.
00104  *
00105  * Revision 1.6  2002/04/06 02:29:26  loetzsch
00106  * added switchDuration = 0; to the constructor
00107  *
00108  * Revision 1.5  2002/03/28 15:19:20  risler
00109  * implemented switch messages in RobotStateDetector
00110  *
00111  * Revision 1.4  2002/02/23 16:37:15  risler
00112  * State in RobotState like BodyPercept state
00113  *
00114  * Revision 1.3  2001/12/10 17:47:06  risler
00115  * change log added
00116  *
00117  */

Generated on Thu Sep 23 19:57:35 2004 for GT2004 by doxygen 1.3.6