Difference between revisions of "Logan's Hastily Thrown Together Method"

From RoboJackets Wiki
Jump to navigation Jump to search
m (recategorizing)
m (Text replacement - "Year:_2005-2006" to "Category:2005-2006")
Line 75: Line 75:
 
To aid the robot in deciding on a direction to turn, a "1D Danger Map" should be implemented. This idea consists of creating a one dimensional snapshot of the course ahead. The best way to do this is to look at the barrel and line maps, scan each column, if anything is found in the column, set the corresponding index in the row of the 1D Danger Map. One could set a 1 for a barrel and 2 for a line. It may also be prudent to use only the bottom or top half of the image, depending on whether or not the goal is to aid the robot in immediate turning or in planning its future path. The goal then is for the robot to scroll through the 1D array and find the largest segment of 0's (nothing). It should then determine if this larger nothing patch is closer to the left or right. However, it will ignore any nothing zones that appear on the side of line data without barrels. It will use this idea in order to decide which way to turn when the items listed in the "Assumptions from Danger Map" section request a turn.
 
To aid the robot in deciding on a direction to turn, a "1D Danger Map" should be implemented. This idea consists of creating a one dimensional snapshot of the course ahead. The best way to do this is to look at the barrel and line maps, scan each column, if anything is found in the column, set the corresponding index in the row of the 1D Danger Map. One could set a 1 for a barrel and 2 for a line. It may also be prudent to use only the bottom or top half of the image, depending on whether or not the goal is to aid the robot in immediate turning or in planning its future path. The goal then is for the robot to scroll through the 1D array and find the largest segment of 0's (nothing). It should then determine if this larger nothing patch is closer to the left or right. However, it will ignore any nothing zones that appear on the side of line data without barrels. It will use this idea in order to decide which way to turn when the items listed in the "Assumptions from Danger Map" section request a turn.
  
[[Category:IGVC|IGVC]][[Category:Year: 2005-2006|Year:_2005-2006]][[Category:Software|Software]]
+
[[Category:IGVC|IGVC]][[Category:2005-2006]][[Category:Software|Software]]

Revision as of 21:39, 18 July 2018

This method will operate using a computer vision system by breaking up all incoming data into segments (perhaps 64 by 64). The idea is that we know where in the vision field that a certain segment sits. Each segment will report whether it is seeing a barrel, a line, or nothing threatening. Thus, we have a basic map of "dangers" in our field of view. The navigation will then make assumptions about each segment based on which are reporting dangers.

Arrangement of Camera

The camera should be arranged so that the horizon is not visible directly in the image. From an initial trial with the JVC Camera, it appears that tilting the cameras about 30 degrees below its x axis (assuming the x axis is running through the lens and out the back of the camera). This should give the camera approximately 3 meters of depth in its forward view.

Creating the Danger Map

An algorithm will cycle through each image looking for line and barrel detections. If a barrel is reported in that segment, then that segment is flagged as containing a barrel. If a line is reported in the segment, the segment is reported as containing a line. The general method should look like this:

  1. Scan entire image for barrels.
  2. Scan entire image for lines.
  3. Scan through segments checking to see if a line or barrel was detected in that segment (this would be done by checking the line map and barrel map at those points in space).
  4. Assign 0 or 1 depending on whether or not a barrel or line was detected in that section.

Priorities

Certain segment groups will have more priority than others in terms of which way the drive system should cause the robot to move. Typically, the bottom will have more priority than the top. Also, middles will have more priority than left and right. Perhaps some sort of "drive queue" with an agenda for the drive system could be created, which high priority needs being met first. And perhaps, if a high priority need arises while a low parity is in action, it will jump into the queue and take over.

Short Term Memory

Memory should be maintained with the last few turn directives. This would be need to be viewed if we had to turn, such as the case of a line. This way we know what sort of movement set us on this path and thus how to avoid the obstacle without getting turned around on the course.

Assumptions from Danger Map

Items in Top Left

  • Line - We are on a straight course. This does not influence the drive system.
  • Barrel - We are approaching a barrel to the right. This does not influence the drive system.

Items in Top Middle

  • Line - We are driving into a line. The robot should turn until the line is no longer detected here. This has low priority.
  • Barrel - We are driving towards a barrel. We should some direction after querying the left and right segment groups. This has low priority.

Items in Top Right

  • Line - We are on a straight course. This does not influence the drive system.
  • Barrel - We are approaching a barrel to the left. This does not influence the drive system.

Items in Middle Left

  • Line - We may not be on straight course. However, this will not affect the drive system.
  • Barrel - We are approaching a barrel to the right. This does not influence the drive system.

Items in Middle

  • Line - We MUST turn. This is high priority.
  • Barrel - We MUST turn. This is high priority.

Items in Middle Right

  • Line - We may not be on straight course. However, this will not affect the drive system.
  • Barrel - We are approaching a barrel to the left. This does not influence the drive system.

Items in Bottom Left

  • Line - We are very close to the line and may be driving into it. We should NOT turn left.
  • Barrel - We will probably be able to clear the barrel. However, we should NOT turn left.

Items in Bottom Middle

  • Line - We are about to drive off the course! Turn immediately. Highest priority possible.
  • Barrel - We are about to hit a barrel! Turn immediately. Highest priority possible.

Items in Bottom Right

  • Line - We are very close to the line and may be driving into it. We should NOT turn right.
  • Barrel - We will probably be able to clear the barrel. However, we should NOT turn right.

New Additions

One Dimensional Danger Map

To aid the robot in deciding on a direction to turn, a "1D Danger Map" should be implemented. This idea consists of creating a one dimensional snapshot of the course ahead. The best way to do this is to look at the barrel and line maps, scan each column, if anything is found in the column, set the corresponding index in the row of the 1D Danger Map. One could set a 1 for a barrel and 2 for a line. It may also be prudent to use only the bottom or top half of the image, depending on whether or not the goal is to aid the robot in immediate turning or in planning its future path. The goal then is for the robot to scroll through the 1D array and find the largest segment of 0's (nothing). It should then determine if this larger nothing patch is closer to the left or right. However, it will ignore any nothing zones that appear on the side of line data without barrels. It will use this idea in order to decide which way to turn when the items listed in the "Assumptions from Danger Map" section request a turn.