Author Topic: Straights without walls  (Read 1553 times)

valar

  • Newbie Nerd
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Straights without walls
« on: March 05, 2013, 12:57:39 PM »
Well I have already build my first micromouse and after writing some 'easy' corrections I have a big problem now. When there's no wall on the left or right side for a longer distance my mouse crashes very often. Firstly I thought that it can be handled by front sensors. But it wasn't good solution  becouse:
  • Front sensors must by aimed a lot outside from the front wall (so it's hard to corectly detect wall in front of mouse)
  • Error must be enough big to react (which isn't good for straight of course)
Secondly I thought that we can handled it tradicionaly (like with walls) by diagonal sensors. The problem is fact that signal from post is very short and unstable and with higher speed it didn't work well.
And right now I have some idea but I don't realy know how to do that :) Well why just measure time difference between detecting posts  on left and right side? It should give us good information about angular error. The question is how to separate posts from walls ? Second qustions is about offset error (well, it's isn't so dangerouse as heading error but still it's should be posible to correct it).  Is there any better solution for correcting that ? Of course crital in this situation is turning. But it's imposible to detect idealy wall-to no-wall moment (there can be some heading or offset error) and we should be prepared for that.

Green

  • Administrator
  • Newbie Nerd
  • *****
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Re: Straights without walls
« Reply #1 on: March 26, 2013, 03:53:38 PM »
hi
for question 1: post error usually smaller than wall error even though they are at same distance. No way to distinguish them if you don't want to make your PID be complicated. The point is your mouse should be able go straight without sensor at first place(by using encoder and gyro), then add sensor error to your total error. Most of the time my mouse just ignore the post since the reflection area is smaller than a whole wall, it actually makes your mouse perform better at fishbone, but you need to make mouse go straight with sensor first.

question 2: i made offset fairly small, that's actually some threshold I use to determine if there is wall or no wall for floodfill.I use 2 Boolean to switch the status(one for left wall the other for right wall), my diagonal offset is likely 200 out of 4096 ish, since my sensor reads pretty far. You need to test out based on your own mouse