lehrkraefte:blc:informatik:glf20:robotik:linefollower

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
lehrkraefte:blc:informatik:glf20:robotik:linefollower [2021/05/21 11:26]
Ivo Blöchliger [Weniger wackeln]
lehrkraefte:blc:informatik:glf20:robotik:linefollower [2021/05/21 11:37] (current)
Ivo Blöchliger
Line 51: Line 51:
 radiusRechts = 0.2  # Radius anpassen, so dass die engsten Kurven gefahren werden können radiusRechts = 0.2  # Radius anpassen, so dass die engsten Kurven gefahren werden können
    
 +# Das Interval [a,b] linear auf das Intervall [c,d] umrechnen, an der Stelle x
 +
 def linear(a,b,c,d,x): def linear(a,b,c,d,x):
     return (x-a)/(b-a)*(d-c)+c       return (x-a)/(b-a)*(d-c)+c  
Line 59: Line 61:
         return         return
     if (hell<grau):     if (hell<grau):
-        r = 1/linear(?, grau-50, ?, ?, hell);  # TODO+        r = linear(?, grau-50, ?, ?, hell);  # TODO
         gear.leftArc(r)         gear.leftArc(r)
     else:     else:
-        r = 1/linear(grau+50, ?, ?, ? , hell);  # TODO+        r = linear(grau+50, ?, ?, ? , hell);  # TODO
         gear.rightArc(r)         gear.rightArc(r)
  
  • lehrkraefte/blc/informatik/glf20/robotik/linefollower.1621589216.txt.gz
  • Last modified: 2021/05/21 11:26
  • by Ivo Blöchliger