Aller au contenu


oumay

Inscrit(e) (le) 14 oct. 2009
Déconnecté Dernière activité janv. 28 2017 10:44
-----

Messages que j'ai postés

Dans le sujet : navigation autonome avec logique flous

28 janvier 2017 - 10:46

bonjour, 

 

merci path pour l'aide, j'ai fait des tests unitaires et j'ai constaté que le simulateur n'accepte que des angles division PI, pour cette raison il m'envoi NaN.


Dans le sujet : navigation autonome avec logique flous

23 janvier 2017 - 01:07

merci pour vos réponses.
pour le langage, j'utilise JAVA.
 
voici le code de la méthode 

/**
   	 * cette méthode représente le contrôleur flou d'angle d'orientation
   	 * @param a : représente la distance entre le robot et sa cible
   	 * @param b : représente l'angle entre le robot et sa cible
   	 * @return  : elle retourne vitesse de rotation et vitesse de translation du robot qu'il faut l'appliquer pour 
   	 * s'approcher de sa cible
   	 * @throws RulesParsingException
   	 * @throws NoRulesFiredException
   	 * @throws EvaluationException
   	 */
   public	double[] GSB(double a ,double b) throws 
   RulesParsingException, NoRulesFiredException, EvaluationException{
   	
   	// la partie floue fuzzification
   	  /*** la définition des variables linguistiques***/
   	  LinguisticVariable distance = new LinguisticVariable("distance"); 
   	  LinguisticVariable TO = new LinguisticVariable("TO"); 
   	  LinguisticVariable angle = new LinguisticVariable("angle");
   	  LinguisticVariable vitesse = new LinguisticVariable("vitesse");
   	  
   	  
   	  
   /*** l'univers de discours des variables linguistiques avec les fonctions d'appartenance
    * pour la variable d'entrée distance***/
   	 distance.add("Z", 0.0,0.0, 0.1, 3.5);
   	 distance.add("P", 0.1, 3.5, 3.5, 8.0);
   	 distance.add("M", 3.5, 8.0, 8.0, 13.0);
   	 distance.add("G", 8.0, 13.0, 13.0, 18.0);
   	 distance.add("TG",13.0, 18.0, Double.POSITIVE_INFINITY, Double.POSITIVE_INFINITY);
   	 
   	 
   	 
   	/*** l'univers de discours des variables linguistiques avec les fonctions d'appartenance
      * pour la variable d'entrée angle entre le robot et la cible***/
     	 TO.add("NG", -3.141592653589793, -3.141592653589793, -1.5, -0.75);
     	 TO.add("NM", -1.5, -0.75, -0.75, -0.25);
     	 TO.add("NP", -0.75, -0.25, -0.25, 0.0);
     	 TO.add("Z", -0.25, 0.0, 0.0, 0.25);
     	 TO.add("PP", 0.0, 0.25, 0.25, 0.75);
     	 TO.add("PM", 0.25, 0.75, 0.75, 1.5);
     	 TO.add("PG", 0.75, 1.5, 3.141592653589793, 3.141592653589793);
   	 
     	 
     	 
    /*** l'univers de discours des variables linguistiques avec les fonctions d'appartenance
          * pour la variable de sortie angle à appliquée par le robot pour s'approcher (s'orienter)
          * de cible***/
                
         
         angle.add("NG", -Math.PI/5, -Math.PI/5, -Math.PI/5, -Math.PI/5);
         angle.add("NM", -Math.PI/10, -Math.PI/10, -Math.PI/10, -Math.PI/10);
         angle.add("NP", -Math.PI/20, -Math.PI/20, -Math.PI/20, -Math.PI/20);
         angle.add("Z", 0, 0, 0, 0);
         angle.add("PP", Math.PI/20, Math.PI/20, Math.PI/20, Math.PI/20);
         
         angle.add("PM", Math.PI/10, Math.PI/10, Math.PI/10, Math.PI/10);
         angle.add("PG", Math.PI/5, Math.PI/5, Math.PI/5, Math.PI/5);
     	 
     	 
               
         
   /*** l'univers de discours des variables linguistiques avec les fonctions d'appartenance
          * pour la variable de sortie vitesse de translation du robot***/
         
         vitesse.add("Z", 0.0, 0.0, 0.0, 0.0);
         vitesse.add("F", 1.0, 1.0, 1.0, 1.0);
         vitesse.add("M", 1.8, 1.8, 1.8, 1.8);
         vitesse.add("G", 3.0, 3.0, 3.0, 3.0);
         vitesse.add("TG", 4.0, 4.0, 4.0, 4.0);
           	  
   	  /*** création de moteur d'inférence flou***/
   	  FuzzyEngine fuzzyEng = new FuzzyEngine();
   	  /*** enregistrement de tous les variables linguistiques ***/
   	  fuzzyEng.register(distance);
   	  fuzzyEng.register(TO);
   	  fuzzyEng.register(angle);
   	  fuzzyEng.register(vitesse);
   	

   	  /*** la définition des valeurs non-floues aux variables linguistiques ***/
   	  distance.setInputValue(a);// définir la valeur d'entrée pour la variable distance entre robot et cible
   	  TO.setInputValue(b);// définir la valeur d'entrée pour la variable angle d'orientation entre le robot et le cible
   	  
   	  /*** la fuzzification des variables linguistique selon leur valeur d'entrée***/
   		  
   		  /*** create a block of rules */
   		  /*creation de block de règles chaque règle est séparé par \n, 
   		   plus rapide si on va évaluer un block de règles à chaque fois*/
   		  FuzzyBlockOfRules fuzzyBlockOfRules = new FuzzyBlockOfRules(
   				  "if distance is Z and TO is NG then angle is PM and vitesse is Z\n"+
   				  "if distance is Z and TO is NM then angle is PP and vitesse is Z\n"+
   				  "if distance is Z and TO is NP then angle is Z and vitesse is Z\n"+
   				  "if distance is Z and TO is Z then angle is Z and vitesse is Z\n"+
   				  "if distance is Z and TO is PP then angle is Z and vitesse is Z\n"+
   				  "if distance is Z and TO is PM then angle is NP and vitesse is Z\n"+
   				  "if distance is Z and TO is PG then angle is NM and vitesse is Z\n"+
   				  "if distance is P and TO is NG then angle is PG and vitesse is F\n"+
   				  "if distance is P and TO is NM then angle is PG and vitesse is F\n"+
   				  "if distance is P and TO is NP then angle is PM and vitesse is F\n"+
   				  "if distance is P and TO is Z then angle is Z and vitesse is F\n"+
   				  "if distance is P and TO is PP then angle is NM and vitesse is F\n"+
   				  "if distance is P and TO is PM then angle is NG and vitesse is F\n"+
   				  "if distance is P and TO is PG then angle is NG and vitesse is F\n"+
   				  "if distance is M and TO is NG then angle is PM and vitesse is F\n"+
   				  "if distance is M and TO is NM then angle is PM and vitesse is F\n"+
   				  "if distance is M and TO is NP then angle is PP and vitesse is M\n"+
   				  "if distance is M and TO is Z then angle is Z and vitesse is M\n"+
   				  "if distance is M and TO is PP then angle is NM and vitesse is M\n"+
   				  "if distance is M and TO is PM then angle is NG and vitesse is F\n"+
   				  "if distance is M and TO is PG then angle is NG and vitesse is F\n"+
   				  "if distance is G and TO is NG then angle is PM and vitesse is F\n"+
   				  "if distance is G and TO is NM then angle is PP and vitesse is M\n"+
   				  "if distance is G and TO is NP then angle is PP and vitesse is G\n"+
   				  "if distance is G and TO is Z then angle is Z and vitesse is G\n"+
   				  "if distance is G and TO is PP then angle is NP and vitesse is G\n"+
   				  "if distance is G and TO is PM then angle is NP and vitesse is M\n"+
   				  "if distance is G and TO is PG then angle is NM and vitesse is F\n"+
   				  "if distance is TG and TO is NG then angle is PM and vitesse is F\n"+
   				  "if distance is TG and TO is NM then angle is PM and vitesse is M\n"+
   				  "if distance is TG and TO is NP then angle is PP and vitesse is G\n"+
   				  "if distance is TG and TO is Z then angle is Z and vitesse is TG\n"+
   				  "if distance is TG and TO is PP then angle is NP and vitesse is G\n"+
   				  "if distance is TG and TO is PM then angle is NM and vitesse is M\n"+
   				  "if distance is TG and TO is PG then angle is NM and vitesse is F\n"
   				  
   				  );
			  
			                                  //evaluateBlock ()
			  /***Register the block ***/
			  fuzzyEng.register(fuzzyBlockOfRules);// enregistre block of rules dans le fuzzy Engine
			  /***Parse the rules***/
			  fuzzyBlockOfRules.parseBlock();// throws RulesParsingException :
			                                 //Exception is thrown if any rule within block 
			                                 //generates a parsing error annalyse block of rules
			  /***Perform the evaluation***/
			  fuzzyBlockOfRules.evaluateBlock();/*throws EvaluationException : 
			                                    This exception is thrown if an error occurs 
			                                    during evaluation of a rule 
			                                    (most likely a MF name is wrong)*/ 
			  rule=fuzzyBlockOfRules.isRuleFired();
			  /*** obtenir le résultat***/
			  
			  
			  
			  double braccage = angle.defuzzify();// throws NoRulesFiredException: This exception 
			                                     //is thrown if no rules have 
			                                    //fired for this Linguistic Variable. 
			  double translation = vitesse.defuzzify();
             
			  
		/*** return l'angle d'orientation et de translation ***/
			
			  resultat[0]=braccage;
			 resultat[1]=translation;
			  return resultat;
		}
   

pour l'erreur

 

 

 Exception in thread "Timer-0" javax.media.j3d.BadTransformException: TransformGroup: non-affine transform

at javax.media.j3d.TransformGroup.setTransform(TransformGroup.java:118)
at simbad.sim.SimpleAgent.updatePosition(SimpleAgent.java:287)
at simbad.sim.Simulator.simulateOneStep(Simulator.java:250)
at simbad.sim.Simulator$1.run(Simulator.java:280)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
 
vitesse de translation 1.0
vitesse de rotation NaN

 

et merci infiniment pour aide


Dans le sujet : communication entre deux robots

15 septembre 2015 - 10:14

bonjour,

merci pour vos réponses,

 

pour le problème de coopération : je simule le problème d'allocation de tâches dans les systèmes Multi robots.

 

je ne traite pas le problème de communication, mon problème c'est l'allocation de tâches.

Donc en simulation je vais trouver un moyen qui me permet de tester mon algorithme d'allocation mais ça manque comment les robots peuvent envoyer entre eux des informations. C'est pour cela que je cherche comment connaitre l'identifier d'un robot pour lui envoyer des information à travers l'invocation de messages.

 

cordialement.