get_zone_center()
  • 1 Minute to read

get_zone_center()


Article summary

get_zone_center()

Retrieve the center coordintates of a specified zone.

Reference

Arguments

ArgumentsTypeDefault value
zone_namestrThe requested location on the map.
pos_unitPOS_UNITPOS_UNIT.PIXELENUM to determine whether the x,y values should be returned as pixels of the map image (POS_UNIT.PIXEL) or Cartesian position in meters (POS_UNIT.METERS)

Return

Dict with x and y values of the location on the current map.

KeyTypeInfo
xintmap position X.
yintmap position Y.

Exceptions

ExceptionCondition
RayaNavNotLocatedThe robot is not located on the map.
RayaNavZonesNotFoundNo zones found on the map.
RayaNavUnkownErrorAn unknown error occurs.
RayaWrongArgumentpos_unit is neither POS_UNIT.METERS nor POS_UNIT.PIXEL.

See the complete list of Raya Exceptions.


Was this article helpful?