roboSino.rar

  • PUDN用户
    了解作者
  • Visual C++
    开发工具
  • 445KB
    文件大小
  • rar
    文件格式
  • 0
    收藏次数
  • 1 积分
    下载积分
  • 29
    下载次数
  • 2010-04-17 15:30
    上传日期
Robocup中科大RoboSino队伍源代码
roboSino.rar
  • roboSino
  • autom4te.cache
  • requests
    2.6KB
  • output.0
    189.5KB
  • traces.0
    28.6KB
  • src
  • GenericValues.h
    7.3KB
  • Parse.h
    3.3KB
  • Parse.cpp
    8.2KB
  • GenericValues.cpp
    19.5KB
  • Objects.cpp
    39.3KB
  • BasicPlayer.cpp
    126.7KB
  • ActHandler.cpp
    11.1KB
  • SenseHandler.h
    5.7KB
  • BasicPlayer.h
    10.8KB
  • WorldModelHighLevel.cpp
    75.6KB
  • SenseHandler.cpp
    34.9KB
  • formations.conf
    7.3KB
  • Logger.h
    7.2KB
  • PlayerSettings.cpp
    25.1KB
  • Formations.cpp
    26.8KB
  • Player.h
    5.5KB
  • ServerSettings.h
    41.3KB
  • WorldModel.cpp
    90.4KB
  • mainCoach.cpp
    9.9KB
  • BasicCoach.h
    3.6KB
  • Formations.h
    9.6KB
  • Objects.h
    17KB
  • PlayerdeMeerMidfielder.cpp
    7.8KB
  • Connection.h
    4.1KB
  • Makefile.am
    1.3KB
  • WorldModelUpdate.cpp
    112.3KB
  • Makefile.in
    16.5KB
  • PlayerdeMeerGoalie.cpp
    31.6KB
  • SoccerTypes.cpp
    81.7KB
  • Connection.cpp
    10.3KB
  • PlayerdeMeerDefender.cpp
    20.4KB
  • PlayerdeMeerAttacker.cpp
    14.7KB
  • main.cpp
    10.3KB
  • WorldModel.h
    55.6KB
  • ServerSettings.cpp
    100.3KB
  • WorldModelPredict.cpp
    36.8KB
  • Makefile
    15.5KB
  • ActHandler.h
    5.4KB
  • player.conf
    641B
  • Player.cpp
    34.9KB
  • Geometry.h
    16.3KB
  • Logger.cpp
    14.2KB
  • BasicCoach.cpp
    8.5KB
  • PlayerSettings.h
    10.8KB
  • SoccerTypes.h
    42.7KB
  • Geometry.cpp
    63.5KB
  • config.h
    3.9KB
  • stamp-h1
    23B
  • Sino.IMD
    368B
  • Sino.PR
    13.3KB
  • config.log
    30.1KB
  • config.h.in
    3.6KB
  • Sino.IMB
    4KB
  • depcomp
    17.4KB
  • Sino.PFI
    168B
  • Sino.IAD
    368B
  • aclocal.m4
    31.5KB
  • compile
    3.6KB
  • Makefile.am
    418B
  • README
    21.8KB
  • Makefile.in
    18.6KB
  • INSTALL
    9.3KB
  • Sino.PS
    512B
  • missing
    10.9KB
  • install-sh
    13.3KB
  • AUTHORS
    1.7KB
  • configure
    189KB
  • config.status
    31KB
  • start.sh
    3.5KB
  • Sino.PO
    776B
  • Makefile
    18.9KB
  • NEWS
    40B
  • ChangeLog
    40B
  • Sino.WK3
    11.9KB
  • COPYING
    17.6KB
  • configure.ac
    771B
  • Sino.IAB
    4KB
内容介绍
/* Copyright (c) 2000-2003, Jelle Kok, University of Amsterdam All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the University of Amsterdam nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /*! \file BasicPlayer.cpp <pre> <b>File:</b> BasicPlayer.cpp <b>Project:</b> Robocup Soccer Simulation Team: UvA Trilearn <b>Authors:</b> Jelle Kok <b>Created:</b> 10/12/2000 <b>Last Revision:</b> $ID$ <b>Contents:</b> This file contains the class declaration for the BasicPlayer. The BasicPlayer is the class where the available skills for the agent are defined. <hr size=2> <h2><b>Changes</b></h2> <b>Date</b> <b>Author</b> <b>Comment</b>: 10/12/2000 Jelle Kok Initial version created </pre> */ #include "BasicPlayer.h" #include "Parse.h" // parseFirstInt #include <map> /********************** LOW-LEVEL SKILLS *************************************/ /*! This skill enables an agent to align his neck with his body. It returns a turn neck command that takes the angle of the agent's body relative to his neck as its only argument. \return SoccerCommand turn_neck command that aligns neck with body */ SoccerCommand BasicPlayer::alignNeckWithBody() { return SoccerCommand(CMD_TURNNECK, WM->getAgentBodyAngleRelToNeck()); } /*! This skill enables an agent to turn his body towards a given point. It receives a global position 'pos' on the field and returns a turn command that will turn the agent's body towards this point. To this end the agent's global position in the next cycle is predicted based on his current velocity. This is done to compensate for the fact that the remaining velocity will move the agent to another position in the next cycle. The global angle between the given position and the predicted position is then determined after which the agent's global body direction is subtracted from this angle in order to make it relative to the agent's body. Finally, the resulting angle is normalized and adjusted to compensate for the inertia moment and speed of the agent. If it is impossible to turn towards the given position in a single cycle then the agent turns as far as possible. \param pos position to which body should be turned \param iCycles denotes the number of cycles that are used to update the the agent position. The resulting position is compared with 'pos' to determine the desired turning angle. \return SoccerCommand turn command to turn body to the desired point */ SoccerCommand BasicPlayer::turnBodyToPoint(VecPosition pos, int iCycles) { VecPosition posGlobal = WM->predictAgentPos(iCycles, 0); AngDeg angTurn = (pos - posGlobal).getDirection(); angTurn -= WM->getAgentGlobalBodyAngle(); angTurn = VecPosition::normalizeAngle(angTurn); angTurn = WM->getAngleForTurn(angTurn, WM->getAgentSpeed(), WM->getAgentObjectType()); return SoccerCommand(CMD_TURN, angTurn); } /*! This skill enables an agent to turn his back towards a given point 'pos'. The only difference between this skill and turnBodyToPoint is that the angle between the given position and the predicted position of the agent in the next cycle is now made relative to the back of the agent by subtracting the agent's global back direction. This skill can for example be used by the goalkeeper in case he wants to move back to his goal while keeping sight of the rest of the field. \param pos position to which the agent's back should be turned \param iCycles denotes the number of cycles that are used to update the the agent position. The resulting position is compared with 'pos' to determine the desired turning angle. \return SoccerCommand command to turn agent's back to the desired point */ SoccerCommand BasicPlayer::turnBackToPoint(VecPosition pos, int iCycles) { VecPosition posGlobal = WM->predictAgentPos(iCycles, 0); AngDeg angTurn = (pos - posGlobal).getDirection(); angTurn -= (WM->getAgentGlobalBodyAngle() + 180); angTurn = VecPosition::normalizeAngle(angTurn); angTurn = WM->getAngleForTurn(angTurn, WM->getAgentSpeed(), WM->getAgentObjectType()); return SoccerCommand(CMD_TURN, angTurn); } /*! This skill enables an agent to turn his neck towards a given point. It receives a global position 'pos' on the field as well as a primary action command 'soc' that will be executed by the agent at the end of the current cycle and returns a turn neck command that will turn the agent's neck towards 'pos'. To this end the agent's global position and neck direction after executing the cmd command are predicted using methods from the world model. The global angle between the given position and the predicted position is then determined after which the predicted neck direction is subtracted from this angle in order to make it relative to the agent's neck. Finally, the resulting angle is normalized and directly passed as an argument to the turn neck command since the actual angle with which a player turns his neck is by definition equal to this argument. If the resulting turn angle causes the absolute angle between the agent's neck and body to exceed the maximum value, then the agent turns his neck as far as possible. Note that it is necessary to supply the selected primary command as an argument to this skill, since a turn neck command can be executed in the same cycle as a kick, dash, turn , move or catch command. \param pos position to which neck should be turned \param soc SoccerCommand that is executed in the same cycle \return SoccerCommand turn command to turn neck to the desired point */ SoccerCommand BasicPlayer::turnNeckToPoint(VecPosition pos, SoccerCommand soc) { VecPosition posMe, velMe; AngDeg angBody, angNeck, angActual; Stamina sta; // predict agent information after command 'soc' is performed // calculate the desired global angle of the neck // calculate the desired angle of the neck relative to the body WM->predictAgentStateAfterCommand(soc, &posMe, &velMe, &angBody, &angNeck, &sta); AngDeg angDesGlobNeck = (pos - posMe).getDirection(); AngDeg angNeckRelToBody = VecPosition::normalizeAngle(angDesGlobNeck - angBody); // calculate the current angle of the body relative to the neck // check if the desired neck angle relative to the body is possible: // if angle is smaller than the minimum or larger than the maximum neck angle // turn neck to the minimum or maximum neck angle + the current neck angle // else calculate the desired angle relative to the body AngDeg angBodyRelToNeck = VecPosition::normalizeAngle(angBody - angNeck); if (angNeckRelToBody < SS->getMinNeckAng()) angActual = SS->getMinNeckAng() + angBodyRe
评论
    相关推荐
    • matlabcnhelp.rar
      matlab中文帮助很难找的,快速下载
    • MobilePolice.rar
      移动警察,车牌识别,车牌定位系统源代码,已经运用在移动车载稽查系统中。
    • SVM(matlab).rar
      支持向量机(SVM)实现的分类算法源码[matlab]
    • svm.zip
      用MATLAB编写的svm源程序,可以实现支持向量机,用于特征分类或提取
    • Classification-MatLab-Toolbox.rar
      模式识别matlab工具箱,包括SVM,ICA,PCA,NN等等模式识别算法,很有参考价值
    • VC++人脸定位实例.rar
      一个经典的人脸识别算法实例,提供人脸五官定位具体算法及两种实现流程.
    • QPSK_Simulink.rar
      QPSK的Matlab/Simulink的调制解调仿真系统,给出接收信号眼图及系统仿真误码率,包含载波恢复,匹配滤波,定时恢复等重要模块,帮助理解QPSK的系统
    • LPRBPDemo2009KV.rar
      车牌识别,神经网络算法,识别率高达95%,识别时间低于80ms。
    • MODULATION.RAR
      这个源程序代码包提供了通信系统中BPSK,QPSK,OQPSK,MSK,MSK2,GMSK,QAM,QAM16等调制解调方式 用matlab的实现,以及它们在AWGN和Rayleigh信道下的通信系统实现及误码率性能
    • algorithms.rar
      十大算法论文,包括遗传算法,模拟退火,蒙特卡罗法等等,对于初学者很有帮助!!