update_map()
- 1 Minute to read
update_map()
- 1 Minute to read
Article summary
Did you find this summary helpful?
Thank you for your feedback
update_map()
Upload a new image from a path to a map.
Reference
Arguments
Arguments | Type | Default value | |
---|---|---|---|
map_name | str | Name of the map to upload. | |
path | str | Path to upload from. |
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'Uploading \'{UPLOAD_MAP_PATH}\' map...')
await self.nav.update_map(
map_name=self.map_name,
path=UPLOAD_MAP_PATH,
)
self.log.info(f'Map updated')
...
See the nav_update_map to check some valid uses.
Was this article helpful?