Création d'un compte pour un collaborateur extérieur au laboratoire depuis l'intranet ICube : https://intranet.icube.unistra.fr/fr/labs/member/profile

Commit a05111cb authored by pitiot's avatar pitiot
Browse files

maj scenar corridor

parent 4c9e4a57
...@@ -392,9 +392,12 @@ void Simulator::setupCircleScenario(unsigned int nbAgents , unsigned int nbObsta ...@@ -392,9 +392,12 @@ void Simulator::setupCircleScenario(unsigned int nbAgents , unsigned int nbObsta
void Simulator::setupCorridorScenario(unsigned int nbAgents, unsigned int nbObstacles) void Simulator::setupCorridorScenario(unsigned int nbAgents, unsigned int nbObstacles)
{ {
VEC3 xSide (5.0f,0.0f,0.0f);
VEC3 ySide (0.0f,10.0f,0.0f);
if (multires) if (multires)
{ {
envMap_.init(config, 1600.0f, 960.0f, minSize, 320.0f) ; //grosses cases // envMap_.init(config, 1600.0f, 960.0f, minSize, 320.0f) ; //grosses cases
envMap_.init(config, nbObstacles > 10 ? ((nbObstacles*20*xSide[0])/6) : 500.0f , 960.0f, minSize, 320.0f) ; //grosses cases
} }
else else
{ {
...@@ -414,12 +417,12 @@ void Simulator::setupCorridorScenario(unsigned int nbAgents, unsigned int nbObst ...@@ -414,12 +417,12 @@ void Simulator::setupCorridorScenario(unsigned int nbAgents, unsigned int nbObst
// Départ des agents du quart gauche sur toute la hauteur // Départ des agents du quart gauche sur toute la hauteur
int xStartMin = envMap_.geometry.min()[0] + xBorder ; int xStartMin = envMap_.geometry.min()[0] + xBorder ;
int xStartDelta = envMap_.geometry.size(0) / 5 ; int xStartDelta = envMap_.geometry.size(0) / 10 ;
int yStartMin = envMap_.geometry.min()[1] + yBorder ; int yStartMin = envMap_.geometry.min()[1] + yBorder ;
int yStartDelta = envMap_.geometry.size(1) - 2 * yBorder ; int yStartDelta = envMap_.geometry.size(1) - 2 * yBorder ;
// Arrivée des agents à l'opposée // Arrivée des agents à l'opposée
int xGoalDelta = envMap_.geometry.size(0) / 5 ; int xGoalDelta = envMap_.geometry.size(0) / 10 ;
int xGoalMin = envMap_.geometry.max()[0] - xBorder - xGoalDelta ; int xGoalMin = envMap_.geometry.max()[0] - xBorder - xGoalDelta ;
int yGoalMin = yStartMin ; int yGoalMin = yStartMin ;
int yGoalDelta = yStartDelta ; int yGoalDelta = yStartDelta ;
...@@ -437,8 +440,8 @@ void Simulator::setupCorridorScenario(unsigned int nbAgents, unsigned int nbObst ...@@ -437,8 +440,8 @@ void Simulator::setupCorridorScenario(unsigned int nbAgents, unsigned int nbObst
} }
// Départ des obstacles du quart haut sur toute une demi-largeur // Départ des obstacles du quart haut sur toute une demi-largeur
xStartMin = envMap_.geometry.min()[0] + envMap_.geometry.size(0) / 4 ; xStartMin = envMap_.geometry.min()[0] + envMap_.geometry.size(0) / 5 ;
xStartDelta = envMap_.geometry.size(0) / 2 ; xStartDelta = 6*envMap_.geometry.size(0) / 10 ;
yStartMin = envMap_.geometry.min()[1] + yBorder ; yStartMin = envMap_.geometry.min()[1] + yBorder ;
yStartDelta = envMap_.geometry.size(1) / 5 ; yStartDelta = envMap_.geometry.size(1) / 5 ;
...@@ -446,14 +449,13 @@ void Simulator::setupCorridorScenario(unsigned int nbAgents, unsigned int nbObst ...@@ -446,14 +449,13 @@ void Simulator::setupCorridorScenario(unsigned int nbAgents, unsigned int nbObst
yGoalDelta = envMap_.geometry.size(1) / 5 ; yGoalDelta = envMap_.geometry.size(1) / 5 ;
yGoalMin = envMap_.geometry.max()[1] - yBorder - yGoalDelta ; yGoalMin = envMap_.geometry.max()[1] - yBorder - yGoalDelta ;
VEC3 xSide (5.0f,0.0f,0.0f);
VEC3 ySide (0.0f,10.0f,0.0f);
std::vector<VEC3> vPos; std::vector<VEC3> vPos;
MovingObstacle* mo4; MovingObstacle* mo4;
for (unsigned int i = 0 ; i < nbObstacles ; i++) for (unsigned int i = 0 ; i < nbObstacles ; i++)
{ {
float x = xStartMin + ((int)i*30) % xStartDelta; float x = xStartMin + ((int)(i*2*xSide[0])) % xStartDelta;
// std::cout << "x ? " << x << " xStartDelta " << xStartDelta << std::endl; // std::cout << "x ? " << x << " xStartDelta " << xStartDelta << std::endl;
VEC3 start(x, yStartMin + rand() % yStartDelta, 0) ; VEC3 start(x, yStartMin + rand() % yStartDelta, 0) ;
VEC3 goal(x, yGoalMin + rand() % yGoalDelta, 0) ; VEC3 goal(x, yGoalMin + rand() % yGoalDelta, 0) ;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment