start_mapping()
  • 1 Minute to read

start_mapping()


Article summary

start_mapping()

Start creating a new map with the specified map_name as its name.

Reference

Arguments

ArgumentsTypeDefault value
optionsobjectAdditional options for mapping.
map_namestringName of the map to be created.
Important note!

Check the "Gary Options" section for an example of options that are valid for Gary.

Gary options:

OptionsTypeDescription
use_tagsboolEnable apriltags detection in the mapping process.
marker_lengthfloatApriltags size (all tags must be the same size).
marker_familystringFamily of apriltags for example "36h10" or "36h11".
marker_max_rangefloatMaximun range to detect tags.

Return

None

Exceptions

  • RayaNavMapAlreadyExist
  • RayaNavAlreadyNavigating
  • RayaNavAlreadyMapping

See the complete list of navigation exceptions.

Usage Example

Code:

...
class RayaApplication(RayaApplicationBase):

    async def setup(self):
        self.navigation = await self.enable_controller('navigation')
        self.map_name = "newmap01"
        ...

    async def loop(self):
        await self.navigation.start_mapping(self.map_name)
        self.log.info(f'Using map \'{self.map_name}\'')
        ...

    async def finish(self):
        await self.navigation.stop_mapping(True)

See the map_tags, map to check some valid uses.


Was this article helpful?