Azymoove Help

Navigation and the map

goTo, walkTo and the map grid to get around obstacles.

Navigation and the map

goTo and walkTo

To go to a point getting around obstacles, use this.goTo(10, 5) (Python/Ruby: go_to(10, 5)). The return value says whether the destination was accepted; state.navigation.status shows moving, arrived or failed from the next turn on.

To wait until you arrive, use this.walkTo(10, 5) (Python/Ruby: walk_to). It returns ok when it arrives or the reason (reason) when it gives up; stuck is the robot stopped on the way, for example with no energy.

  • A destination off the ground, without room for the robot or without a route is rejected, and the robot brakes.
  • The route goes on without repeating the call.
  • move, turn and recharge take control and cancel the navigation. Shots and radar stay independent.

The map grid

this.map (Python: self.map; Ruby: map) holds rows[z][x]: 0 is empty, 1 is ground and 2 is a static obstacle. A cell’s center is at origin + (index + 0.5) * cellSize. The grid is built once, when the battle starts.

Round and square maps without terrain are open. Robots, deliveries and scenery attacks are not static obstacles. Pushes can still make you fall, and recharging is still your code’s call.