kramann.info
© Guido Kramann

Login: Passwort:










kramann.info
© Guido Kramann

Login: Passwort:




LUAbot -- Entwicklung einer Simulationsumgebung für Schwarmvehikel auf der Basis von Java/Processing unter Verwendung der Skriptsprache LUA

(EN google-translate)

(PL google-translate)

EN: LUAbot -- Development of a simulation environment for swarm vehicles based on Java/Processing using the LUA scripting language

Spezifikation der Schwarmvehikel

EN: Specification of the Swarm Vehicles

  • In der Entwicklungsumgebung Processing soll ein Simulator für Schwarmvehikel aufgebaut werden.
  • Das Verhalten der Vehikel soll dabei mit der zusätzlich eingebetteten Skriptsprache LUA umgesetzt werden.
  • Die Fahrzeuge sind einfachste Systeme:
  • kreisförmige Objekte mit einem bestimmten Radius r
  • einer Position [x,y]
  • einer Orientierung phi
  • einer Vortriebsgeschwindigkeit v
  • einer Winkelgeschwindigkeit w

Die Fahrzeuge können in eingeschränkter Art und Weise ihre Umgebung erkunden. Sie besitzen folgende Sensoren:

  • einen Bodensensor, der die Farbe des Pixels unbittelbar in der Mitte unter dem Chassis erkennt.
  • einen Entfernungssensor, der in Fahrrichtung den Abstand zum nächstgelegenen Hindernis erfasst.
  • Die Sensordaten gehen als Input an das LUA-Skript, durch das das Verhalten des Fahrzeugs bestimmt wird.
  • Das LUA-Skript liefert die Werte für die Vortriebsgeschwindigkeit v und die Winkelgeschwindigkeit w.
  • Immer eines von beidem w oder v müssen Null sein.

EN


  • A simulator for swarm vehicles is to be developed in the Processing development environment.
  • The behavior of the vehicles is to be implemented using the additionally embedded scripting language LUA.
  • The vehicles are very simple systems:
  • circular objects with a specific radius r
  • a position [x,y]
  • an orientation phi
  • a forward speed v
  • an angular velocity w

The vehicles can explore their environment to a limited extent. They are equipped with the following sensors:

  • a ground sensor that detects the color of the pixel directly in the center beneath the chassis.
  • a distance sensor that measures the distance to the nearest obstacle in the direction of travel.
  • The sensor data is fed as input to the LUA script, which determines the vehicle's behavior.
  • The LUA script provides the values for the forward speed v and the angular velocity w.
  • One of the two, w or v, must always be zero.

Dimensionen und Parameter der Schwarmvehikel

EN: Dimensions and Parameters of the Swarm Vehicles

  • Alle Angaben erfolgen in Pixel, ohne dass spezifiziert wird, wieviele Pixel einen Meter ergeben.
  • Die Simulation behandelt nur die Kinematik. Die Fahrzeuge sind masselos.
  • Die "Welt" in der der Schwarm fährt umfasst 640x640 Pixel
  • r beträgt 20 Pixel
  • Die Zeitschrittweite der Simulation beträgt dt=0,05s. Dazu passend wird eine Bildwiederholrate von 20 Bildern pro Sekunde gewählt.
  • Die Geschwindigkeitsgrenzen betragen v=0..20Pixel pro Sekunde (maximal ein Pixel pro Zeitschritt)
  • Die Winkelgeschwindigkeit w kann zwischen -20...+20 Grad pro Sekunde gewählt werden.
  • Die aktuelle Fahrtrichtung wird durch einen Strich dargestellt.
  • Damit der Koordinatenursprung in der unteren linken Ecke ist, muss die Richtung der y-Achse umgedreht werden.

Veranschaulichung der Angaben durch eine einfache Visualisierung mit Processing:


EN:


  • All measurements are given in pixels, without specifying how many pixels make up one meter.
  • The simulation deals only with kinematics. The vehicles are dimensionless.
  • The "world" in which the swarm moves covers 640x640 pixels
  • r is 20 pixels
  • The time step of the simulation is dt=0.05s. Accordingly, a frame rate of 20 frames per second is selected.
  • The speed limits are v=0..20 pixels per second (maximum of one pixel per time step)
  • The angular velocity w can be set between -20 and +20 degrees per second.
  • The current direction of travel is represented by a line.
  • To ensure that the coordinate origin is in the lower left corner, the direction of the y-axis must be reversed.

Illustration of the specifications through a simple visualization using Processing:

public void setup()
{
    size(640,640);
    frameRate(20);
}

public void draw()
{
    scale(1,-1); //coordinate transformation
    translate(0,-640);
    background(255);
    noFill();
    stroke(0);
    strokeWeight(height/200);
    ellipse(20,20,40,40);
    line(20,20,40,20);
}

Code 0-1: Processing Sketch LUAbot001

Screenshot von LUAbot001.

Bild 0-1: Screenshot von LUAbot001.