Putting a map into a program
FedoraForum.org - Fedora Support Forums and Community
Results 1 to 6 of 6
  1. #1
    Join Date
    Apr 2008
    Location
    Cement Cornfield, OH
    Posts
    65

    Putting a map into a program

    All,

    I am currently working on a research project for school where I am working with the Player/Stage software to create an autonomous vehicle simulation using a Roomba. I can get the program to move and I also have it reacting to objects in the way, which leads me to the next step of development where I have the Roomba collect information about where it is (GPS location) and the location of the target (again GPS, though all GPS coordinates in the end become simple X and Y coordinates), and then have it choose its path and travel that.

    This creates a lot of complexities that I have to take into account and forces me to deal with programming techniques that I know have been done, however I know of no one who has even a slight idea as to how to store the information about "the world" in a program and then have it make a decision based upon that.

    I am using primarily C/C++ for the programming, however if it is better suited to create this portion of the program using another programming language that I can then interface with the C/C++ program, I am very willing to do that.

    Thank you very much in advance for any help that you are able to give. If you need any more information or have any questions, please just ask and I'll provide you with it.

    Sincerely,

    Galvin

  2. #2
    Join Date
    Aug 2009
    Location
    Waldorf, Maryland
    Posts
    7,345

    Re: Putting a map into a program

    Your first problem is GPS - It is accurate to about 5-8 inches depending on the antenna and interference... for a roomba, this is enough error to go over edges, and totally miss objects that would appear to be in the way. This is why the roomba uses dead reckoning, and the other auto-cleaning units use a local transmitter for high resolution.

    GPS has the ability for higher resolution, but you have to be sitting still for a couple of minutes to get the precision. 5 to 8 inch resolution is fine for something the size of a car (or tank), but that is about half the dimensions of a roomba.

    Your second problem is "the world". Identifying objects is one thing, determining boundaries of objects is another and distinguishing one object from another is a third. Without sensors suitable this will fail, and the roomba itself doesn't have sensors for that. All it does is detect a collision. Based on the direction of travel causes it to select an alternate path based on where it has not been, or to retrace a path, or to take a random path (not sure which).

    The simple 2D approach is to just use a grid - whenever you bump something you mark the corresponding location in the grid. The grid is the world map (as far as the roomba is concerned). There are no objects involved - just a trace of collisions. Collisions are also counted if it finds a drop (ie stairs).

    You do this yourself when in the dark and in a strange room. You only identify what you collided with by feeling it out with your hands (different sensors), which builds a 3D model/image in your head, which you then match against generic objects until you identify the chair you bumped into. Image modeling/object identification is fairly well documented under image identification.

  3. #3
    Join Date
    Nov 2010
    Location
    Tallahassee, FL
    Posts
    133

    Re: Putting a map into a program

    ... currently working on a research project for school ...
    hey, does this mean we get to share your undergrad or graduate degree, too?

  4. #4
    Join Date
    Apr 2008
    Location
    Cement Cornfield, OH
    Posts
    65

    Re: Putting a map into a program

    @briand

    If I was working on an undergrad and graduate degree, then I might jokingly say yes. I am actually in high school and am working on a research project to fill my time rather than just not going to school in my senior year.

    @jpollard

    I guess I didn't describe things very well.

    I am not using a real Roomba, I am using a simulated Roomba in Player/Stage. The GPS proxy in it is very accurate and is then directly converted to X and Y coordinates. I actually know how to get the sensors (Lidar and cameras, a.k.a. "blobfinders") to function, but they are for close range object detection. What I meant by "the world" is the road map that is displayed in Player when I run the program that the simulated Roomba drives around on. Just like how TomToms, Garmins, etc. have a built-map that they then go and compare to the GPS data they receive to determine the vehicle's positon, I want to input the road map that the Roomba will drive on and let it figure out where it is using its GPS location, figure out the location of the target using the GPS coordinates it is given for it, and then figure out a path to travel to reach the target using the road map that is built-in to it. The sensors are just for checking to see if there are any obstacles in the way that it has to deal with as it is travelling its chosen path.

    In essence, it isn't the objects I am interested in identifying and storing information on but the road map that the Roomba will be driving.

  5. #5
    Join Date
    Nov 2010
    Location
    Tallahassee, FL
    Posts
    133

    Re: Putting a map into a program

    Quote Originally Posted by Galvin Tjime
    @briand

    If I was working on an undergrad and graduate degree, then I might jokingly say yes. I am actually in high school and am working on a research project to fill my time rather than just not going to school in my senior year.
    ah. understood. I was in a similar situation in high school. So, I spent my junior and senior years teaching electronics theory and radio & television repair at the local vocational school.

  6. #6
    Join Date
    Aug 2009
    Location
    Waldorf, Maryland
    Posts
    7,345

    Re: Putting a map into a program

    Quote Originally Posted by Galvin Tjime
    @briand

    If I was working on an undergrad and graduate degree, then I might jokingly say yes. I am actually in high school and am working on a research project to fill my time rather than just not going to school in my senior year.

    @jpollard

    I guess I didn't describe things very well.

    I am not using a real Roomba, I am using a simulated Roomba in Player/Stage. The GPS proxy in it is very accurate and is then directly converted to X and Y coordinates. I actually know how to get the sensors (Lidar and cameras, a.k.a. "blobfinders") to function, but they are for close range object detection. What I meant by "the world" is the road map that is displayed in Player when I run the program that the simulated Roomba drives around on. Just like how TomToms, Garmins, etc. have a built-map that they then go and compare to the GPS data they receive to determine the vehicle's positon, I want to input the road map that the Roomba will drive on and let it figure out where it is using its GPS location, figure out the location of the target using the GPS coordinates it is given for it, and then figure out a path to travel to reach the target using the road map that is built-in to it. The sensors are just for checking to see if there are any obstacles in the way that it has to deal with as it is travelling its chosen path.

    In essence, it isn't the objects I am interested in identifying and storing information on but the road map that the Roomba will be driving.
    This is also fairly well documented in game development text books, and there are different kinds for different purposes.

    1) the simple grid, each point contains references to type of point (passable, movable, damaging,...).

    2) vector - a list of vectors/triangles (if 3D required) containing the same type of information. This representation requires searching to create an order of potential problems (usually by distance to a centroid/nearest point).

    3)a full 3d object definition where all barriers are defined in 3D terms. This is more complex, but closer to a reality simulation. Like #2, it also requires a search/sort order to determine nearest object to interact with.

Similar Threads

  1. putting files in cd
    By sheosi in forum Using Fedora
    Replies: 1
    Last Post: 18th March 2011, 10:22 PM
  2. Replies: 6
    Last Post: 21st December 2008, 12:06 PM
  3. Am I putting 5lbs in a 4lb bag?
    By Divit11 in forum Installation, Upgrades and Live Media
    Replies: 4
    Last Post: 29th December 2006, 06:17 PM
  4. putting an avatar in gaim.
    By daywalker in forum Using Fedora
    Replies: 5
    Last Post: 25th June 2006, 07:05 AM
  5. Putting FC4 on my desktop
    By crossmr in forum Using Fedora
    Replies: 0
    Last Post: 14th March 2006, 05:55 AM

Tags for this Thread

Posting Permissions

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