EgtMachKernel :

- modifiche alla simulazione per eseguire la verifica collisione correttamente anche alla massima velocità.
This commit is contained in:
Dario Sassi
2026-02-27 11:48:43 +01:00
parent 22c691f9e5
commit e8099c11e0
2 changed files with 11 additions and 7 deletions
+4 -2
View File
@@ -48,9 +48,10 @@ using namespace std ;
//----------------------------------------------------------------------------
static const double MIN_STEP = 1.0 ;
static const double MAX_STEP = 500.0 ;
static const double MID_STEP = 50.0 ;
static const double MAX_STEP = 500.0 ;
static const double COLL_STEP = 10. ;
static const double MAX_COLL_STEP = 100. ;
static const double SQ_COEFF_ROT_MOVE = 100. ;
static const double COEFF_LIM = 0.999 ;
static const double SAFEDIST_STD = 5.0 ;
@@ -2574,6 +2575,7 @@ SimulatorMP::ExecCmdData( int& nStatus)
static const int STEP_RAPID = -2 ;
static const int STEP_RAPROT = -3 ;
static const int STEP_COLLROT = -4 ;
double dMaxStep = ( NeedCollisionCheck() ? MAX_COLL_STEP : MAX_STEP) ;
int nStep = 1 ;
for ( int i = 0 ; i < nAxCount ; ++ i) {
double dMove = abs( CmdCurr.vAxNaEpSt[i].dEndPos - vPrev[i]) ;
@@ -2588,7 +2590,7 @@ SimulatorMP::ExecCmdData( int& nStatus)
else // STEP_COLLROT
dStep = min( 0.4 * m_dStep, 10.) ;
}
dStep = max( dStep, 1.) ;
dStep = Clamp( dStep, MIN_STEP, dMaxStep) ;
int nAxStep = int( dMove / dStep) + 1 ;
nStep = max( nStep, nAxStep) ;
}