Closed jschornick closed 11 years ago
I believe we are now doing this. Correct, @ealamaster?
Yes, I believe controller calls compassReset() at the beginning of the round which sends compass_reset message over serial. We need to be careful that controller is run (or at least this line is executed) only after we have placed the bot in the starting position, facing 0 degrees (as per our map conventions).
In order for localizer to effectively use the compass in calculations, it needs to report a heading translated to the coordinate axes on the course.
This can be done either at the comm or lower level, or anywhere higher up if a known translation factor is passed up the stack. In discussions, @ealamaster decided it was reasonable to do this in the low level code.
Higher level code assumes that a theta of zero points along the x-axis of the course, which is roughly in the direction from start box along the long side of the field.