order_zone_points()
  • 1 Minute to read

order_zone_points()


Article summary

order_zone_points()

Orders the points of a zone in a list. It will not be returned, it will be stored internally to be obtained with the get_sorted_zone_point method().

Reference

Arguments

ArgumentsTypeDefault value
zone_namestrThe requested zone on the map.
from_current_poseboolFalseIf True, sort from the current pose, if False sort from the center of the zone.

Return

Dict with a bool if the points was sorted and the number of points.

KeyTypeInfo
ordered_pointsboolTrue if the points were sorted successfully.
num_pointsintNumber of sorted points.
Important note!

This function does not return the points, it only orders and stores them to be obtained with the function get_sorted_zone_point.

Exceptions

  • RayaNavNotLocated
  • RayaNavZonesNotFound
  • RayaWrongArgument
  • RayaNavUnkownError

See the complete list of navigation exceptions.

Usage Example

Code:

...
class RayaApplication(RayaApplicationBase):

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

    async def loop(self):
        ...
        await self.nav.order_zone_points(
                    zone_name=kitchen, 
                    from_current_pose=True
                )
        ...

See the nav_all_unity_apartment, nav_get_info to check some valid uses.


Was this article helpful?