?? getcapability.cc
字號:
#include "kickto.ih"Behavior::ConfidenceInterval KickTo::getCapability(rf<State> s, rf<Goal> g){ WorldModel& wm = WorldModel::getInstance(); NormalDistribution3D BallInfo = wm.getObjectPosition(Types::BALL); Vector3D ballPosCar = BallInfo.getMu(); double ballX = ballPosCar.getX(); double ballY = ballPosCar.getY(); //bool leftTouch = wm.getLeftTouch(); //bool rightTouch = wm.getRightTouch(); // Distance from foot to ball (not from camera) double distToBall = sqrt(ballX * ballX + ballY * ballY); if (d_curStep >= 2 && (ballX < 0 || ballX > 2.0 || fabs(ballY) > 1.0)) return ConfidenceInterval(0.0, 0.0); return distToBall <= 7.5 ? ConfidenceInterval(0.5, 0.2) : ConfidenceInterval(0.0, 0.0);}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -