Average Errorpoints

3 posts / 0 new
Last post
xStatic
Average Errorpoints

Good morning,

Most probably due to a too low errorpoints threshold my monsterBorg went into the avoidance(Backup) mode all the time during yesterdays challenge.

Can you give some hint, maybe on how high the lower threshold should be?

That would be great!!

regards,
xStatic

Arron Churchill
Arron Churchill's picture
Error points

Tuning the error points is very difficult, the standard number was a compromise between removing false detentions and seeing robots early enough.

The best way to improve the detection would really be to replace the error points method with something else a bit more reliable, such as matching a robot shape in the image.

If you do want to try and improve the existing detection there are a few things you can try:

Changing overtakeThreshold to tune the detection

  • Larger values will reduce the number of false detections, but will reduce the likelihood of detecting robots
  • Smaller values will increase the number of false detections, but will increase the likelihood of detecting robots

Changing cropY1 to see further ahead

  • Smaller values will allow the robot to see further ahead and spot robots easier, but may make the basic track following harder or less reliable
  • Much smaller values will allow the robot to see even further ahead and spot robots easier, but will likely cause the robot to get confused by the background and struggle to get around the track
  • Larger values will cause the robot to see for shorter distances ahead and make spotting robots more difficult, but may improve the track following by removing noise
  • Much larger values will cause the robot to see too short and prevent the track following from working properly

Slowing down to allow more time to detect robots

  • Slowing down will give the detection a better chance of seeing robots ahead, but will cause longer lap times
  • Speeding up will make detection harder, but it will also improve the lap times as long as collisions are avoided

Averaging error points over a few frames
This would need some additional code, but you could change the detection so it needs to see the detection limit for a few frames in a row.

  • Averaging over more frames will remove more false detections, but will spot robots late
  • Averaging over less frames will not be as much of an improvement, but will not change the detection speed as much

As all of these things affect each other you will probably need to play with the settings to see what happens. The best hing to do is test your code with some of the images taken from the MonsterBorg driving around the track and checking when the code decides their is a robot to overtake against the picture it is being shown.

xStatic
Template Matching...

I already implemented a template matching function and thought of the overtake logic from the standard code rather as a backup to fastly trigger the "Crashed" logic if the template matching fails.

Since my monsterBorg was like nearly all the time in "CRASHED" mode, and I only allow the TM code to run while the imageMode == FOLLOW_TRACK ... My TM code didnt even have a chance to proof its avoidance skills... too bad, since its matching rate was quite good during testing.

I think I won't directly abandon the idea of the standard overtaking logic as a kind of backup behavior, but I will set the threshold significantly higher!

Thanks for your extensive and informative answer!! =)

Kind regards,
xStatic

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd> <pre>
  • Syntax highlight code surrounded by the <pre class="brush: lang">...</pre> tags, where lang is one of the following language brushes: bash, cpp, perl, python.
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Comment Images
Files must be less than 10 MB.
Allowed file types: png gif jpg jpeg.
Comment Attachments
Files must be less than 10 MB.
Allowed file types: txt pdf nfo doc docx rtf jpg png gif bmp zip tar gz csv xls.
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.