is_in_zone()
- 1 Minute to read
is_in_zone()
- 1 Minute to read
Article summary
Did you find this summary helpful?
Thank you for your feedback
Checks if the robot is inside a specific zone.
Reference
Arguments
Arguments | Type | Default value | |
---|---|---|---|
zone_name | string | Name of the zone. |
Return
Type | Description |
---|---|
bool | True if the robot is inside the zone. |
Exceptions
RayaNavNotLocated
RayaNavZonesNotFound
RayaNavNoMapLoaded
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):
...
in_zone = await self.nav.is_in_zone(
zone_name=kitchen,
)
self.log.info(f'is robot in kitchen: {in_zone}')
...
See the nav_all_unity_apartment, nav_get_info to check some valid uses.
Was this article helpful?