get_location()
  • 1 Minute to read

get_location()


Article summary

get_location()

Retrieve information about an existing location.

Reference

Arguments

ArgumentsTypeDefault value
location_namestrThe requested location on the map.
map_namestrMap in which location resides.
pos_unitPOSITION_UNITPOSITION_UNIT.PIXELSUnit of measurement for the points (PIXELs or METERS).

Return

Tuple in the form of x, y, yaw.

Exceptions

  • RayaNavNotLocated
  • RayaNavLocationNotFound
  • RayaWrongArgument
  • RayaNavUnkownError

See the complete list of navigation exceptions.

Usage Example

Code:

class RayaApplication(RayaApplicationBase):

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

    async def loop(self):
        await self.navigation.get_location( 
                    location_name='new_location01', 
                    map_name='unity_apartment'
                )
        self.log.info(f'Location deleted')
        ...

    async def finish(self):
         ...

See the nav_all_unity_apartment, nav_get_info to check some valid uses.


Was this article helpful?