Home Contents Start Prev 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Next

Phase 5: Map Tranformations

Roadmap

The following is a plan of where I'm going:

  • Investigate map representation. Cartesian vs Compass vs Relative
  • See how recognition of an April Tag data can be integrated into the virtual map
  • Determine which map representaion to store and various conversions between other types.
  • Localization between April Tag and Virtual Map representaion

Map co-ordinate systems

Current, 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:

  • The Global frame. Real world, X-axis points East, Y-axis points North. Angles measured counterclockwise.
  • The Local Frame. x-axis is where the robot points (longitudinal). Angle measure counterclockwise.

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 Frames

Local to Global Frame

The 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 Frame

My 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 Bearings

Compass 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


Home Contents Start Prev 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Next