Skip to content

Commit

Permalink
[Core] fix bug of CircleRun
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark-tz committed Apr 12, 2024
1 parent eb8b22f commit b681e9c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Core/tactics/skill/CircleRun.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ CPlayerCommand* CCircleRun::execute(const CVisionModule* pVision){

const CVector localVel = meVel + dv;

const double limitTargetRotVel = targetRotVel*localVel.mod()/targetVelMod;
const double limitTargetRotVel = std::abs(targetVelMod > 0.1) ? targetRotVel*localVel.mod()/targetVelMod : targetRotVel;
const double dRotVel = std::clamp(limitTargetRotVel - meRotVel, -MAX_ROT_ACC/PARAM::Vision::FRAME_RATE, MAX_ROT_ACC/PARAM::Vision::FRAME_RATE);
const double rotVel = meRotVel + dRotVel;

Expand Down

0 comments on commit b681e9c

Please sign in to comment.