Robot Eksperimentarium 2006: Øvelser

From ImageWiki

(Difference between revisions)
Jump to: navigation, search
(→Øvelse 2: Visuel objektfølgelse)
Line 1: Line 1:
-
headerer.
+
''#include''s.
-
+
I denne opgave skal lidt rundt.
-
robotten til at
+
at blive bekendt med Hardware-laget i [[ERSP|ERSP]],
-
** Lige ud.
+
men .  
-
+
-
** Dreje uden at
+
-
+
-
ERSP, men alligevel.
+
-
== Opgaveformulering ==
+
skal hardware
-
+
-
motorkontrollen skal Hardware
+
  Evolution::ResourceManager *resource_manager;
  Evolution::ResourceManager *resource_manager;
  Evolution::Result result;
  Evolution::Result result;
Line 21: Line 15:
-
====
+
 
-
 
+
''Evolution::IDriveSystem''
  Evolution::IDriveSystem *driver;
  Evolution::IDriveSystem *driver;
  result = resource_container->obtain_interface(Evolution::NO_TICKET, "drive",  
  result = resource_container->obtain_interface(Evolution::NO_TICKET, "drive",  
Line 43: Line 37:
  const double angular_acceleration = M_PI/2.0; // radians/sec^2
  const double angular_acceleration = M_PI/2.0; // radians/sec^2
-
====
+
 
-
 
+
: Fuzzy Logic (Avoidance) =
 +
I denne opgave skal der implementeres et Avoidance System, der benytter Fuzzy Control.
 +
 +
 +
 
 +
 +
 +
* skrive Fuzzy Control delen af et Java program, der benytter ''jFuzzyLogic''. Den del af programmet skal skrives i Fuzzy Control Language (FCL). Der er udleveret et Java program der afvikler FCL programmet. FCL filen kan derfor afvikles ved at kalde ''./run_jFuzzyLogicDemo.sh FCL_FILNAVN''.
 +
 
 +
 +
 
 +
FUNCTION_BLOCK FuzzyAvoidance
 +
 +
// Define input variables
 +
VAR_INPUT
 +
    Front_sensor : REAL;
 +
    Rear_sensor  : REAL;
 +
    Left_sensor  : REAL;
 +
    Right_sensor : REAL;
 +
END_VAR
 +
 +
// Define output variables
 +
VAR_OUTPUT
 +
    Velocity        : REAL;
 +
    Angular_velocity : REAL;
 +
END_VAR
 +
 +
// Fuzzification of input
 +
FUZZIFY Front_sensor
 +
    // Fill this!
 +
END_FUZZIFY
 +
 +
FUZZIFY Rear_sensor
 +
    // Fill this!
 +
END_FUZZIFY
 +
 +
FUZZIFY Left_sensor
 +
    // Fill this!
 +
END_FUZZIFY
 +
 +
FUZZIFY Right_sensor
 +
    // Fill this!
 +
END_FUZZIFY
 +
 +
// Defuzzification
 +
// Velocity is in cm/sec and Angular_velocity is in radians/sec
 +
DEFUZZIFY Velocity
 +
    // Fill this!
 +
END_DEFUZZIFY
 +
 +
DEFUZZIFY Angular_velocity
 +
    // Fill this!
 +
END_DEFUZZIFY
 +
 +
RULEBLOCK myrules
 +
    // Fill this!
 +
END_RULEBLOCK
 +
 +
END_FUNCTION_BLOCK
 +
 
 +
 +
 
 +
Line 70: Line 126:
-
+
 
-
+
-
 
+
-
+
-
+
-
 
+
-
+
-
 
+
-
+
-
 
+
-
+
-
+
-
 
+
-
+
-
 
+
-
: Lokalisering =
+
Line 96: Line 137:
 +
 +
 +
 +
 +

Revision as of 11:58, 8 August 2006

Personal tools