save_location()
  • 1 Minute to read

save_location()


Article summary

save_location()

Add a permanent new location in robotic device.
This function will allow later to use navigate_to_location() function instead navigate_to_position()
## Reference

Arguments

ArgumentsTypeDefault value
location_namestrThe name of the specified location.
xfloatx coordinate on the map.
yfloaty coordinate on the map.
anglefloattarget angle.
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)
ang_unitANG_UNITANG_UNIT.DEGENUM to determine whether angle should be returned as radians(ANG_UNIT.RAD) or degrees (ANG_UNIT.DEG)

Return

True if the whole function finished with no errors.

Exceptions

ExceptionCondition
RayaNavNoMapLoadedNo map is loaded.
RayaWrongArgumentPOS_UNIT is neither pixels nor meters or ANG_UNIT is neither degrees nor radians.
RayaNavMapAlreadyExistThere is a location with this name in the current map.
RayaNavCurrentlyMappingThere is a mapping command in action.
RayaNavUnkownErrorAn unknown error occurs.

See the complete list of Raya Exceptions.


Was this article helpful?

What's Next