EgtMachKernel :
- modifiche alla simulazione per eseguire la verifica collisione correttamente anche alla massima velocità.
This commit is contained in:
+4
-2
@@ -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) ;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user