Commit c250b4ac authored by ivangrujic's avatar ivangrujic
Browse files

ParticleOdometry

parent 2f4779e1
......@@ -20,8 +20,8 @@ public class ParticleSet
{
// Instance variables
private float distanceNoiseFactor = 0.2f; //0.2f;
private float angleNoiseFactor = 4; //4f;
private float distanceNoiseFactor = 0.005f; //0.2f;
private float angleNoiseFactor = 2.5f; //4f;
private int numParticles;
private Particle[] particles;
......
......@@ -19,7 +19,7 @@ public class PilotMonitor
private InputOutputStreams NXT;
private boolean USB = false;
private Route route = new Route();
private ParticleSet particles = new ParticleSet(10);
private ParticleSet particles = new ParticleSet(100);
private PilotGUI view = new PilotGUI(particles);
private Move move;
......@@ -43,7 +43,7 @@ public class PilotMonitor
m = new Move( (type == 0)? Move.MoveType.TRAVEL : Move.MoveType.ROTATE ,
distance, angle, false);
System.out.println("Move " + distance + " " + angle);
return new Move(Move.MoveType.TRAVEL,50,0,false);
return m;
}
public void go()
......
......@@ -8,7 +8,7 @@ public class PilotRoute
private double distFactor = 0.99;
private double wheelDiameterL = 5.595*distFactor, wheelDiameterR = 5.6*distFactor, trackWidth = 16.27;
private double travelSpeed = 5, rotateSpeed = 45;
private double travelSpeed = 25, rotateSpeed = 45;
private NXTRegulatedMotor left = Motor.B;
private NXTRegulatedMotor right = Motor.C;
......@@ -49,10 +49,13 @@ public class PilotRoute
Sound.twoBeeps();
travel(50);
rotate(-90);
rotate(90);
travel(50);
rotate(-90);
rotate(90);
travel(50);
rotate(90);
travel(50);
rotate(90);
while ( ! Button.ENTER.isDown()) Thread.yield();
......
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