Results 1 to 6 of 6

Thread: Robot map

  1. #1
    Naphoria is offline Member
    Join Date
    Jan 2012
    Posts
    6
    Rep Power
    0

    Default 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?

  2. #2
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    16,574
    Rep Power
    23

    Default 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.

  3. #3
    Naphoria is offline Member
    Join Date
    Jan 2012
    Posts
    6
    Rep Power
    0

    Default 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?!

  4. #4
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    16,574
    Rep Power
    23

    Default Re: Robot map

    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.

  5. #5
    Naphoria is offline Member
    Join Date
    Jan 2012
    Posts
    6
    Rep Power
    0

    Default 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?

  6. #6
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    16,574
    Rep Power
    23

    Default Re: Robot map

    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.

Similar Threads

  1. Robot
    By rp181 in forum Advanced Java
    Replies: 4
    Last Post: 12-07-2010, 12:58 AM
  2. Robot
    By PhQ in forum AWT / Swing
    Replies: 13
    Last Post: 08-26-2010, 12:10 AM
  3. Robot class
    By coltragon in forum New To Java
    Replies: 6
    Last Post: 07-12-2010, 05:54 PM
  4. Robot Game
    By yanipao in forum New To Java
    Replies: 1
    Last Post: 03-24-2010, 10:51 AM
  5. Robot Game
    By Galore in forum New To Java
    Replies: 7
    Last Post: 03-21-2010, 06:14 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •