00001 /** 00002 * @file PackageCognitionMotion.h 00003 * 00004 * Definition of class PackageCognitionMotion. 00005 * 00006 * @author Matthias Jüngel 00007 */ 00008 00009 #ifndef __PackageCognitionMotion_h_ 00010 #define __PackageCognitionMotion_h_ 00011 00012 #include "Representations/Cognition/LandmarksState.h" 00013 #include "Representations/Cognition/RobotPose.h" 00014 #include "Representations/Cognition/BallModel.h" 00015 #include "Representations/Cognition/PlayerPoseCollection.h" 00016 #include "Representations/Cognition/ObstaclesModel.h" 00017 #include "Representations/Cognition/RobotState.h" 00018 #include "Representations/Motion/MotionRequest.h" 00019 #include "Representations/Motion/HeadControlMode.h" 00020 #include "Representations/Motion/LEDRequest.h" 00021 #include "Representations/Motion/OdometryData.h" 00022 #include "Representations/Sound/SoundRequest.h" 00023 #include "Tools/Player.h" 00024 00025 #include "Modules/WalkingEngine/InvKinWalkingParameterSets.h" 00026 #include "Modules/WalkingEngine/GT2004ParameterSet.h" 00027 00028 /** 00029 * @class PackageCognitionMotion 00030 * 00031 * Contains all data that are sent from the Cognition process to the Motion process 00032 * in the CMD process layout. 00033 * 00034 * @author Matthias Jüngel 00035 */ 00036 class PackageCognitionMotion 00037 { 00038 public: 00039 /** The seen landmarks */ 00040 LandmarksState landmarksState; 00041 00042 /** The robots position and orientation */ 00043 RobotPose robotPose; 00044 00045 /** The position and the speed of the ball */ 00046 BallModel ballModel; 00047 00048 /** The positions of the own and opponent players */ 00049 PlayerPoseCollection playerPoseCollection; 00050 00051 /** The positions of the obstacles */ 00052 ObstaclesModel obstaclesModel; 00053 00054 /** Pressed switches and fall downs */ 00055 RobotState robotState; 00056 00057 /** Motions requested by the behavior */ 00058 MotionRequest motionRequest; 00059 00060 /** The head control mode*/ 00061 HeadControlMode headControlMode; 00062 00063 /** The ledRequest*/ 00064 LEDRequest ledRequest; 00065 00066 /** The SoundRequest */ 00067 SoundRequest soundRequest; 00068 00069 /** An instance of the current player object*/ 00070 Player::teamColor teamColor; 00071 00072 /** walking parameter sets to be used by the WalkingEngine, eg calculated by evolution behavior */ 00073 InvKinWalkingParameters invKinWalkingParameters; 00074 GT2004Parameters gt2004WalkingParameters; 00075 unsigned long walkParameterTimeStamp; 00076 00077 /** The status of the WLan connection (one bit for every dog) */ 00078 int wLanStatus; 00079 00080 /** The time when the package was sent */ 00081 unsigned long timeStamp; 00082 00083 /** Constructor */ 00084 PackageCognitionMotion(); 00085 }; 00086 00087 /** 00088 * Streaming operator that reads a PackageCognitionMotion from a stream. 00089 * @param stream The stream from which is read. 00090 * @param packageCognitionMotion The PackageCognitionMotion object. 00091 * @return The stream. 00092 */ 00093 In& operator>>(In& stream, PackageCognitionMotion& packageCognitionMotion); 00094 00095 /** 00096 * Streaming operator that writes a PackageCognitionMotion to a stream. 00097 * @param stream The stream to write on. 00098 * @param packageCognitionMotion The PackageCognitionMotion object. 00099 * @return The stream. 00100 */ 00101 Out& operator<<(Out& stream, const PackageCognitionMotion& packageCognitionMotion); 00102 00103 00104 #endif //__PackageCognitionMotion_h_ 00105 00106 /* 00107 * Change Log: 00108 * 00109 * $Log: PackageCognitionMotion.h,v $ 00110 * Revision 1.3 2004/07/10 00:13:55 spranger 00111 * renaming for coderelease and preparations for gt2005 00112 * 00113 * Revision 1.2 2004/05/22 22:52:02 juengel 00114 * Renamed ballP_osition to ballModel. 00115 * 00116 * Revision 1.1.1.1 2004/05/22 17:25:01 cvsadm 00117 * created new repository GT2004_WM 00118 * 00119 * Revision 1.13 2004/05/14 14:12:08 wachter 00120 * - Added communication support for 5 robots 00121 * - rewrote parts of team-communication to be faster and more stable 00122 * 00123 * Revision 1.12 2004/04/11 18:49:45 roefer 00124 * Team color is sent again from Cognition to Motion. 00125 * Otherwise, messages sent by Motion may contain the wrong team color. 00126 * 00127 * Revision 1.11 2004/04/07 14:42:56 risler 00128 * moved LandsmarksState to Cognition directory, generated by SelfLocator 00129 * 00130 * Revision 1.10 2004/04/07 13:00:47 risler 00131 * ddd checkin after go04 - second part 00132 * 00133 * Revision 1.2 2004/04/01 19:52:44 Charlie 00134 * added LandmarkState 00135 * 00136 * Revision 1.1.1.1 2004/03/29 08:28:46 Administrator 00137 * initial transfer from tamara 00138 * 00139 * Revision 1.9 2004/03/27 14:45:08 loetzsch 00140 * removed team color from PackageCognitionMotion 00141 * 00142 * Revision 1.8 2004/03/16 10:26:16 dueffert 00143 * invKinWalkingParameters in package initialized 00144 * 00145 * Revision 1.7 2004/03/10 12:17:50 roefer 00146 * Player bug fixed 00147 * 00148 * Revision 1.6 2004/03/08 15:29:11 tim 00149 * Sending the Player object to the Motion process 00150 * 00151 * Revision 1.5 2004/03/04 10:05:28 jhoffman 00152 * - motion process now uses odometry to propagate the robot pose while no new robot pose is being sent (this makes headcontrol a little better) 00153 * - removed headcontrol member variable "propagatedPose" from headcontrol and cognition->motion-sender 00154 * 00155 * Revision 1.4 2004/02/16 17:57:43 dueffert 00156 * packageCognitionMotion extended with invkin parameters 00157 * 00158 * Revision 1.3 2004/02/03 13:19:49 spranger 00159 * renamed all references to class BallPosition to BallModel 00160 * 00161 * Revision 1.2 2003/11/24 21:03:37 loetzsch 00162 * removed specialPercept 00163 * 00164 * Revision 1.1 2003/10/07 10:07:01 cvsadm 00165 * Created GT2004 (M.J.) 00166 * 00167 * Revision 1.2 2003/09/26 15:30:39 juengel 00168 * Renamed DataTypes to representations. 00169 * 00170 * Revision 1.1.1.1 2003/07/02 09:40:25 cvsadm 00171 * created new repository for the competitions in Padova from the 00172 * tamara CVS (Tuesday 2:00 pm) 00173 * 00174 * removed unused solutions 00175 * 00176 * Revision 1.5 2003/06/15 22:42:22 loetzsch 00177 * no message 00178 * 00179 * Revision 1.4 2003/03/10 13:59:48 juengel 00180 * Added obstaclesModel 00181 * 00182 * Revision 1.3 2002/11/28 14:44:04 jhoffman 00183 * added a special percept for the motion detector 00184 * 00185 * Revision 1.2 2002/09/17 23:55:22 loetzsch 00186 * - unraveled several datatypes 00187 * - changed the WATCH macro 00188 * - completed the process restructuring 00189 * 00190 * Revision 1.1 2002/09/12 14:20:05 juengel 00191 * Created a package for all data sent from Cognition to Motion. 00192 * 00193 * 00194 */