download_map()
- 1 Minute to read
download_map()
- 1 Minute to read
Article summary
Did you find this summary helpful?
Thank you for your feedback
download_map()
Downloads a map image to a path.
Reference
Arguments
Arguments | Type | Default value | |
---|---|---|---|
map_name | str | Name of the map to download. | |
path | str | Path to save the downloaded map. |
Return
None
Exceptions
RayaWrongArgument
RayaNavUnknownMapName
RayaNavCurrentlyMapping
See the complete list of navigation exceptions.
Usage Example
Code:
...
DOWNLOAD_MAP_PATH = 'dat:downloaded_map.pgm'
UPLOAD_MAP_PATH = 'dat:to_upload_map.pgm'
class RayaApplication(RayaApplicationBase):
async def setup(self):
self.nav = await self.enable_controller('navigation')
...
async def loop(self):
...
self.log.info(f'Downloading \'{DOWNLOAD_MAP_PATH}\' map...')
await self.nav.download_map(
map_name=self.map_name,
path=DOWNLOAD_MAP_PATH,
)
self.log.info(f'Map downloaded')
...
See the nav_update_map to check some valid uses.
Was this article helpful?