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

Processes/CMD/PackageCognitionMotion.cpp

Go to the documentation of this file.
00001 /**
00002 * @file PackageCognitionMotion.cpp
00003 *
00004 * Implementation of class PackageCognitionMotion.
00005 *
00006 * @author Matthias Jüngel
00007 */
00008 
00009 #include "PackageCognitionMotion.h"
00010 
00011 PackageCognitionMotion::PackageCognitionMotion()
00012 : teamColor(getPlayer().getTeamColor()),walkParameterTimeStamp(0),wLanStatus(0),timeStamp(0)
00013 {
00014   ERS7EvolveWalkingParameters p;
00015   invKinWalkingParameters = p;
00016   gt2004WalkingParameters = p;
00017 }
00018 
00019 In& operator>>(In& stream, PackageCognitionMotion& packageCognitionMotion)
00020 {
00021   int teamColor;
00022   stream
00023     >> packageCognitionMotion.landmarksState
00024     >> packageCognitionMotion.robotPose
00025     >> packageCognitionMotion.ballModel
00026     >> packageCognitionMotion.playerPoseCollection
00027     >> packageCognitionMotion.robotState
00028     >> packageCognitionMotion.motionRequest
00029     >> packageCognitionMotion.headControlMode
00030     >> packageCognitionMotion.ledRequest
00031     >> packageCognitionMotion.soundRequest
00032     >> teamColor
00033     >> packageCognitionMotion.invKinWalkingParameters
00034     >> packageCognitionMotion.gt2004WalkingParameters
00035     >> packageCognitionMotion.walkParameterTimeStamp
00036     >> packageCognitionMotion.wLanStatus
00037     >> packageCognitionMotion.timeStamp;
00038   packageCognitionMotion.teamColor = (Player::teamColor) teamColor;
00039   return stream;
00040 }
00041 
00042 Out& operator<<(Out& stream, const PackageCognitionMotion& packageCognitionMotion)
00043 {
00044   stream 
00045     << packageCognitionMotion.landmarksState
00046     << packageCognitionMotion.robotPose
00047     << packageCognitionMotion.ballModel
00048     << packageCognitionMotion.playerPoseCollection
00049     << packageCognitionMotion.robotState
00050     << packageCognitionMotion.motionRequest
00051     << packageCognitionMotion.headControlMode
00052     << packageCognitionMotion.ledRequest
00053     << packageCognitionMotion.soundRequest
00054     << (int) packageCognitionMotion.teamColor
00055     << packageCognitionMotion.invKinWalkingParameters
00056     << packageCognitionMotion.gt2004WalkingParameters
00057     << packageCognitionMotion.walkParameterTimeStamp
00058     << packageCognitionMotion.wLanStatus
00059     << packageCognitionMotion.timeStamp;
00060 
00061 
00062   return stream;
00063 }
00064 
00065 /*
00066 * Change Log:
00067 *
00068 * $Log: PackageCognitionMotion.cpp,v $
00069 * Revision 1.6  2004/07/10 00:13:55  spranger
00070 * renaming for coderelease and preparations for gt2005
00071 *
00072 * Revision 1.5  2004/06/20 18:15:56  dueffert
00073 * another initialization added
00074 *
00075 * Revision 1.4  2004/06/14 16:53:32  juengel
00076 * Removed some WalkingEngineParameterSets.
00077 *
00078 * Revision 1.3  2004/06/03 14:37:37  dueffert
00079 * initialization of package moved to package: should fix wrong InvKin parameters bug
00080 *
00081 * Revision 1.2  2004/05/22 22:52:02  juengel
00082 * Renamed ballP_osition to ballModel.
00083 *
00084 * Revision 1.1.1.1  2004/05/22 17:25:01  cvsadm
00085 * created new repository GT2004_WM
00086 *
00087 * Revision 1.11  2004/05/14 14:12:08  wachter
00088 * - Added communication support for 5 robots
00089 * - rewrote parts of team-communication to be faster and more stable
00090 *
00091 * Revision 1.10  2004/04/11 18:49:45  roefer
00092 * Team color is sent again from Cognition to Motion.
00093 * Otherwise, messages sent by Motion may contain the wrong team color.
00094 *
00095 * Revision 1.9  2004/04/07 13:00:47  risler
00096 * ddd checkin after go04 - second part
00097 *
00098 * Revision 1.2  2004/04/01 19:52:44  Charlie
00099 * added LandmarkState
00100 *
00101 * Revision 1.1.1.1  2004/03/29 08:28:46  Administrator
00102 * initial transfer from tamara
00103 *
00104 * Revision 1.8  2004/03/30 11:48:51  dueffert
00105 * memory hole fixed
00106 *
00107 * Revision 1.7  2004/03/27 14:45:08  loetzsch
00108 * removed team color from PackageCognitionMotion
00109 *
00110 * Revision 1.6  2004/03/10 12:17:50  roefer
00111 * Player bug fixed
00112 *
00113 * Revision 1.5  2004/03/08 15:29:11  tim
00114 * Sending the Player object to the Motion process
00115 *
00116 * Revision 1.4  2004/03/04 10:05:28  jhoffman
00117 * - motion process now uses odometry to propagate the robot pose while no new robot pose is being sent (this makes headcontrol a little better)
00118 * - removed headcontrol member variable "propagatedPose" from headcontrol and cognition->motion-sender
00119 *
00120 * Revision 1.3  2004/02/16 17:57:43  dueffert
00121 * packageCognitionMotion extended with invkin parameters
00122 *
00123 * Revision 1.2  2003/11/24 15:31:20  dueffert
00124 * SpecialPercept removed from PackageCognition
00125 *
00126 * Revision 1.1  2003/10/07 10:07:01  cvsadm
00127 * Created GT2004 (M.J.)
00128 *
00129 * Revision 1.1.1.1  2003/07/02 09:40:25  cvsadm
00130 * created new repository for the competitions in Padova from the 
00131 * tamara CVS (Tuesday 2:00 pm)
00132 *
00133 * removed unused solutions
00134 *
00135 * Revision 1.5  2003/06/15 22:42:22  loetzsch
00136 * no message
00137 *
00138 * Revision 1.4  2002/11/28 14:44:04  jhoffman
00139 * added a special percept for the motion detector
00140 *
00141 * Revision 1.3  2002/10/02 13:31:16  loetzsch
00142 * now all elements are streamed
00143 *
00144 * Revision 1.2  2002/09/17 23:55:22  loetzsch
00145 * - unraveled several datatypes
00146 * - changed the WATCH macro
00147 * - completed the process restructuring
00148 *
00149 * Revision 1.1  2002/09/12 14:20:05  juengel
00150 * Created a package for all data sent from Cognition to Motion.
00151 *
00152 *
00153 */

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