save_location()
- 1 Minute to read
save_location()
- 1 Minute to read
Article summary
Did you find this summary helpful?
Thank you for your feedback
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
Arguments | Type | Default value | |
---|---|---|---|
location_name | str | The name of the specified location. | |
x | float | x coordinate on the map. | |
y | float | y coordinate on the map. | |
angle | float | target angle. | |
pos_unit | POS_UNIT | POS_UNIT.PIXEL | ENUM 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_unit | ANG_UNIT | ANG_UNIT.DEG | ENUM 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
Exception | Condition |
---|---|
RayaNavNoMapLoaded | No map is loaded. |
RayaWrongArgument | POS_UNIT is neither pixels nor meters or ANG_UNIT is neither degrees nor radians. |
RayaNavMapAlreadyExist | There is a location with this name in the current map. |
RayaNavCurrentlyMapping | There is a mapping command in action. |
RayaNavUnkownError | An unknown error occurs. |
See the complete list of Raya Exceptions.
Was this article helpful?