Lego MindStorms

A chinese lion statue Lego Mindstorms is probably the most cheap and easy way to build a robot. In addition to the huge quantity of available sets and parts, there are a lot of different sensors providing new capacities to the NXT. See the MindStorms NXT set contents

Sensores (like accleration/tilt, gyroscope, compass, ...) from:
Hitechnic,
MindSensors

You can see a comparison list of programming environments here. Including languages like GNU C, C++ (well, almost C++), Java, pbLua,...

Indoor navigation, another option

Jose,march 24 2009
Another option

 

And with the video camera that it includes...

Soon a video ...

Jose, december 6 2008

The first steps of "WallTracking"

The "WallTracking" is a robot that runs parallel to the walls and other obstacles as a guiding system, being able to move form a point A to a point B.

From a simple first version it will have more features and more precision

I will describe the main features and design with some UML diagrams

It's based on 2 NXT, but it's very easy to change the design to only one, actually it's now using a single NXT. In a few days there will be a video..

The main features

The main components

The classes

classes.png

The main Java in the class "WallTracking"

						
	public static void main (String [] args)
	{
		WallTracking wt=new WallTracking(30, 110, 20);
		wt.startIt();
		
		while (!Button.ESCAPE.isPressed());
		
		wt.stopIt();
		Utils.pause(100);		
	}						
                         
						

From the class "WallTracking" the method "void startIt()"


						
						
	public void startIt()
	{
		running=true;		
		boolean isError=false;

		try
		{		
			if (hb!=null)
			{
				hb.start();
			}			
		}
		catch(Exception e)
		{
			isError=true;
			Utils.d(e.getMessage());		
		}
				
		
		if (!isError)
			heading.straight();
	}						
                         
						

From here, the object "HearBeat" started with "hb.start()" will be executing the method "void tick()" from "WallTracking " which:

  • will get the US values,
  • will store these values
  • will execute the method that "does the track of the wall", heading.doWallFollowing(distance).

De la clase "WallTracking" el método "void tick()"
						
	public void startIt()
	{
		running=true;		
		boolean isError=false;

		try
		{		
			if (hb!=null)
			{
				hb.start();
			}			
		}
		catch(Exception e)
		{
			isError=true;
			Utils.d(e.getMessage());		
		}
				
		
		if (!isError)
			heading.straight();
	}						
                         
						


Finally the object "heading" (from class"HeadingMotion"), executes "HeadingData doWallFollowing(int distance)", from which is executed "steering.steer(hd)", that simply steers the vehicle based on the information that contains the object "hd", instance of the class"HeadingData".


						
	public void tick() 
	{		
		Sound.beep();
		int lateralUSValue = lateralUSSensor.readValue();

		Utils.d(0, "dist.", lateralUSValue);		

		dhis.add(-1, lateralUSValue);
		
		heading.doWallFollowing(distance);
	}						
                         
						

Remote control

Jose, January 15 2008
What? How?

 



Software:

For NXT,

LeJOS (Java) for the navigation project and NBC for the remote control project

For PC,

C# for navigation.

Hardware:

For NXT,

Acceleration/tilt sensor for the remote control