-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
67 additions
and
155 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,26 @@ | ||
#ifndef _BALL_SPEED_MODEL_H_ | ||
#define _BALL_SPEED_MODEL_H_ | ||
#include <tuple> | ||
#include "singleton.hpp" | ||
#include "WorldDefine.h" | ||
|
||
#include "VisionModule.h" | ||
|
||
class CBallSpeedModel{ | ||
class CVisionModule; | ||
class CBallSpeedModel | ||
{ | ||
public: | ||
CBallSpeedModel(); | ||
~CBallSpeedModel(); | ||
CVector speedForTime(double frame, const CVisionModule* pVision); //计算若干帧以后的速度 | ||
CVector speedForDist(double dist, const CVisionModule* pVision); //计算若干距离后的速度 | ||
double timeForDist(double dist, const CVisionModule* pVision); //计算球运动若干距离的时间 | ||
CGeoPoint posForTime(double frame, const CVisionModule* pVision); //计算若干帧以后的绝对位置 | ||
void update( const CVisionModule* pVision ); | ||
// double CalKickInitSpeed(const double dist); | ||
private: | ||
CVector speedForTime_FM(double frame); //计算若干帧以后的速度 | ||
CVector speedForDist_FM(double dist); //计算若干距离后的速度 | ||
double timeForDist_FM(double dist); //计算球运动若干距离的时间 | ||
CGeoPoint posForTime_FM(double frame); //计算若干帧以后的绝对位置 | ||
inline void registerVision(CVisionModule *vision) { this->vision = vision; } | ||
std::tuple<double,CVector> predictForDist(const double dist); // 计算若干距离后的速度 | ||
double timeForDist(const double dist); //计算球运动若干距离的时间 | ||
CVector speedForDist(const double dist); // 计算球运动若干距离的速度 | ||
MobileVisionT poseForTime(const double time); // 计算若干帧以后的绝对位置 | ||
private: | ||
CVector _ballVel; | ||
// CVector _lastBallVel; | ||
void update(); | ||
CGeoPoint _ballPos; | ||
// double cal_acc; | ||
// double cal_acc_high_speed; | ||
// double cal_acc_low_speed; | ||
// double _last_dist; | ||
private: | ||
//add some private function to calculate ACC --hzy 2016.6.12 test | ||
//double getAcc(double speed) const; | ||
// const bool readTableFile_CheckTable(const string& filename); | ||
// const double timeForDist_CheckTable(const double dist) const; | ||
// const double distForTime_CheckTable(const int frame) const; | ||
// const double checkTime_CheckTable(const double const* _array,const double data) const; | ||
// const double checkData_CheckTable(const double const* _array,const double time) const; | ||
// double *_speed_data; | ||
// double *_dist_data; | ||
// int _num; | ||
CVector _ballVel; | ||
int lastCycle = 0; | ||
CVisionModule *vision = nullptr; | ||
}; | ||
typedef Singleton< CBallSpeedModel > BallSpeedModel; | ||
#endif // _BALL_SPEED_MODEL_H_ | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
$#include <WorldDefine.h> | ||
class CBallSpeedModel | ||
{ | ||
double timeForDist(const double dist); | ||
CVector speedForDist(const double dist); | ||
MobileVisionT poseForTime(const double time); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters