View Single Post
  #2   Spotlight this post!  
Unread 21-01-2014, 07:04
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,751
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Autonomous Hot Detection question

As it is currently written, your code is looping through all of the target info elements. If you find a validated element, you will fire the solenoid.

One thing to think about is that validated simply means that the code's analysis indicates this particle passed the proportion and rectangularity scores well enough to be either a hot or not hot target. It doesn't mean that the target is hot, and it doesn't mean the target is directly in front of the robot.

In fact, in the original example, there was another step of processing where the camera info and target info was processed to calculate distance to target and location within the camera scene. Especially at the starting location of the robots, it is entirely possible to see both hot and not hot target at the same time, but one is far to the left and the other is far to the right.

To your initial question about the hot/not hot indication. The brown cluster on the top, has an element called state. This classifies the element as Hot or Not Hot.

My suggestion would be to incorporate that last step that computes distances and locations. Then loop through the Target Info looking for hot target and comparing its location and distance to how your robot shoots. If you need to move the robot to get the target into a better location, do that. If the target is in a good location, fire the solenoids.

I hope that helps.
Greg McKaskle
Reply With Quote