| |||||||||||||||||||||||||
Phase 5: Map TranformationsRoadmapThe following is a plan of where I'm going:
Map co-ordinate systemsCurrent, I have a single grid-map (an occupancy map). As we move forward, we may need to augment this with other maps. However, all of them need a way to translate between real world and virtual maps. This is a minefield of different standards so here I define naming conventions and terminology. Maps sit in a reference frame. For now, I will define two such frames:
All my angles etc will follow mathematical unit-circle standards. Note: Compass bearing origin points North (y-axis) and rotate clockwise. To avoid confusion, I will convert compass bearing to Global Frame references (90 degree shift, counterclockwise) to make the maths easier. I will flip back to compass bearing only if needed, but all internal math will use Global Frame (unit circle). Conversion between FramesLocal to Global FrameThe Local frame relates to the robot, with the x-axis point along the length of the robot (longitudinal direction). I envisage using vector mathematics to calculate movements so we need to be able to convert both angle and magnitude of the vector in the Global frame. Just massaging angles by 90 degrees doesnt cut it. Since this will be done in python (pi5), I can use matracies and employ a rotation matrix: TODO Equation for Local->Global matrix Global to Local FrameMy virtual Occupancy map will probably (need to think more on this) be in the Global frame. It will be necessary to convert to the Local frame, especially if encountering April Tags. At this stage of my understanding, I don't think we can simply convert the whole map to Local at the outset, but will need to convert back to local as necessary. TODO: Think more on this To convert from Global Frame, back to Local, we use the inverse Rotation matrix: TODO Equation for Global->Local matrix Using Compass BearingsCompass bearings add another layer of complexity. Here, the X-axis points Magnetic North and angles rotate clockwise. In Moana, I used compass bearings by normalizing with the local frame but all angles were measured using the compass frame (rotating clockwise). Although this is intuitive, I want Kupe to use a more robust mathematical basis, so I will convert compass bearings directly to Global/Local frame on the fly. This means I wont have a Compass Frame, but a simple angle translation to convert to Global frame and the use that going forward. July 2026 | |||||||||||||||||||||||||
| |||||||||||||||||||||||||