# Robot map

• 01-15-2012, 09:40 PM
Naphoria
Robot map
Hi I am trying to use a robot programmed with Java to navigate a small obstacle course, it has sensors on it, but the idea is that it is attached to a computer, and asit finds each obstacle it prints a map on the screen showing where each obstacle is likely to be, how could I achieve this?
• 01-15-2012, 09:48 PM
Norm
Re: Robot map
What are the coordinates for the area that the robot moves around in?
How can the robot find its position in that coordinate system?
If it can know its position, then it could report the position of any obstacles it runs into.

For example in the real world, you could use the latitude and longitude from a GPS to find its position.
• 01-16-2012, 03:16 AM
Naphoria
Re: Robot map
the area is 1.2 by 2.4 metres, it has a distance and touch sensor but no gps (it only knows position by dead reckoning) so i was thinking that the touch will be a bad idea because it can getknocked out of position so it will not know where it is?!
• 01-16-2012, 04:01 AM
Norm
Re: Robot map
Quote:

it has a distance and touch sensor
Is the measure of distance traveled by dead reckoning? IE the number of turns of a wheel.
How does it keep track of the direction of travel? A compass?
When it turns, can it measure the degrees of turn from its last path travelled?

GPS wouldn't be much use measuring 2 metres of travel.
• 01-16-2012, 06:03 PM
Naphoria
Re: Robot map
Yes number of wheel turns, it does not have a compass but it can measure the degrees of turn from its last path travelled yes. I was more concerned with the on-screen map after it finds each obstacle as the actual obstacle finding will be conducted by my somebody else?
• 01-16-2012, 06:06 PM
Norm
Re: Robot map
Quote:

concerned with the on-screen map
If you want an map of x,y locations you can extend a JPanel class, override its paintComponent() method and use the methods of the Graphics class to draw on the JPanel. There are many drawxxxx methods for drawing.