PDF
AGVC SDK  0.8.0
System

Functions

int agvc_interface::AgvcInterface::setSystemClock (const std::string &stamp)
 Sets the AGV system time.
AsyncInterfaceResultStatus agvc_interface::AgvcInterface::getAsyncInterfaceResultStatus ()
 Queries the running status of asynchronous APIs; this does not represent each API's own execution result.
std::vector< std::string > agvc_interface::AgvcInterface::getWifiList ()
 Gets the currently scanned WiFi list.
int agvc_interface::AgvcInterface::connectWifi (const std::string &ssid, const std::string &password)
 Connects to the specified WiFi and automatically switches to WiFi mode.
int agvc_interface::AgvcInterface::enableHotspot (const std::string &password)
 Enables hotspot mode and automatically switches to hotspot mode.
std::vector< IpAddressInfoagvc_interface::AgvcInterface::getIpAddressList ()
 Gets all local IP addresses.
std::string agvc_interface::AgvcInterface::getAgvControllerParametersFile ()
 Gets the AGV controller parameter file.
int agvc_interface::AgvcInterface::setAgvControllerParametersFile (const std::string &agv_parameters)
 Sets the AGV controller parameter file.
int agvc_interface::AgvcInterface::refreshAgvControllerParametersFile ()
 Refreshes parameters on AGV nodes after the AGV controller parameter file is modified.
int agvc_interface::AgvcInterface::resetAgvControllerParametersFile ()
 Restores the AGV controller parameter file to factory defaults.
int agvc_interface::AgvcInterface::updateSoftware (const std::string &upgrade_pack_path)
 Upgrades AGV software.
std::vector< std::string > agvc_interface::AgvcInterface::getSoftwareVersionList ()
 Gets the AGV software version list.
int agvc_interface::AgvcInterface::switchSoftwareVersion (const std::string &software_version)
 Switches the AGV software version.
int agvc_interface::AgvcInterface::uninstallSoftware (const std::string &software_version)
 Uninstalls an AGV software version.
int agvc_interface::AgvcInterface::updateFirmware (const FirmwareUpdateParam &update_firmware)
 Updates AGV firmware.
FirmwareUpdateProcessInfo agvc_interface::AgvcInterface::getUpdateFirmwareProcess ()
 Gets firmware update process information.
int agvc_interface::AgvcInterface::startCollectCalibrationData (const CalibrationType &type, const Header &command_header={ "99999", "99999", 1, "99999" })
 Starts collecting calibration data.
int agvc_interface::AgvcInterface::cancelCollectCalibrationData (const CalibrationType &type, const Header &command_header={ "99999", "99999", 1, "99999" })
 Cancels calibration data collection.
int agvc_interface::AgvcInterface::startCalibration (const CalibrationType &type, const Header &command_header={ "99999", "99999", 1, "99999" })
 Starts calibration.
CalibrationProcessInfo agvc_interface::AgvcInterface::getCalibrationProcessInfo (const CalibrationType &type)
 Gets calibration information.
int agvc_interface::AgvcInterface::restartAgv ()
 Restarts the AGV.
int agvc_interface::AgvcInterface::setAgvName (const std::string &agv_name)
 Sets the AGV name.
int agvc_interface::AgvcInterface::setPriority (const std::string &name, const std::string &ip="")
 Sets control priority.
int agvc_interface::AgvcInterface::releasePriority ()
 Releases control priority.
int agvc_interface::AgvcInterface::scriptPaused ()
 Pauses the script.
int agvc_interface::AgvcInterface::scriptResume ()
 Resumes the script.
int agvc_interface::AgvcInterface::scriptStop ()
 Stops the script.
int agvc_interface::AgvcInterface::setScriptStatus (ScriptRuntimeState status)
 Sets the script runtime state.
int agvc_interface::AgvcInterface::autoAlignRailway (const Header &command_header={ "99999", "99999", 1, "99999" })
 Automatically aligns with the rail and boards the rail.

Detailed Description

System-level functions for AGVC configuration, control priority, software upgrades, and firmware updates.

Function Documentation

◆ autoAlignRailway()

int agvc_interface::AgvcInterface::autoAlignRailway ( const Header & command_header = { "99999", "99999", 1, "99999" })

Automatically aligns with the rail and boards the rail.

Attention
  1. Asynchronous API; 2. Requires control priority.
Parameters
[in]command_headerThe id field is the ID of this command; other fields have no special meaning.
Returns
10100000: rail boarding succeeded; 10100201: rail boarding is in progress; 10120202: no control priority; else: rail boarding failed.

◆ cancelCollectCalibrationData()

int agvc_interface::AgvcInterface::cancelCollectCalibrationData ( const CalibrationType & type,
const Header & command_header = { "99999", "99999", 1, "99999" } )

Cancels calibration data collection.

Parameters
[in]typeCalibration type.
[in]command_headerThe id field is the ID of this command; other fields have no special meaning.
Returns
10100000: API call succeeded; 10120202: no control priority; else: API call failed.

◆ connectWifi()

int agvc_interface::AgvcInterface::connectWifi ( const std::string & ssid,
const std::string & password )

Connects to the specified WiFi and automatically switches to WiFi mode.

Note
Must be called over a wired connection and may take a long time.
Parameters
[in]ssidWiFi SSID.
[in]passwordWiFi password.
Returns
10100000: connected to WiFi successfully; else: failed to connect to WiFi.

◆ enableHotspot()

int agvc_interface::AgvcInterface::enableHotspot ( const std::string & password)

Enables hotspot mode and automatically switches to hotspot mode.

Note
Must be called over a wired connection and may take a long time.
Parameters
[in]passwordHotspot password. If empty, "administrator" is used as the default password, and the SSID defaults to the SN.
Returns
10100000: hotspot enabled successfully; else: failed to enable hotspot.

◆ getAgvControllerParametersFile()

std::string agvc_interface::AgvcInterface::getAgvControllerParametersFile ( )

Gets the AGV controller parameter file.

Returns
Parameter information in the current AGV controller.

◆ getAsyncInterfaceResultStatus()

AsyncInterfaceResultStatus agvc_interface::AgvcInterface::getAsyncInterfaceResultStatus ( )

Queries the running status of asynchronous APIs; this does not represent each API's own execution result.

Note
Asynchronous APIs: saveMap, switchMap, changeRunningMode, relocation, sendBase64PngMapToAgv.
Asynchronous APIs: getGridMapAllInfo, setGridMapAllInfo, sendGridMapToAgv, getGridMapFromAgv.
Asynchronous APIs: getPngMapAllInfo, setPngMapAllInfo, getBase64PngMapFromAgv, previewPngMapFromAgv.
Asynchronous API: autoAlignRailway.
After the client disconnects from the AGV, call this API to obtain asynchronous API status.
Each field in the return value contains a header, where header.id is the ID used when issuing the asynchronous task.
Returns
NONE: asynchronous API is not running; RUNNING: asynchronous API is running; FINISH: asynchronous API has finished.

◆ getCalibrationProcessInfo()

CalibrationProcessInfo agvc_interface::AgvcInterface::getCalibrationProcessInfo ( const CalibrationType & type)

Gets calibration information.

Parameters
[in]typeCalibration type.
Returns
Calibration information.

◆ getIpAddressList()

std::vector< IpAddressInfo > agvc_interface::AgvcInterface::getIpAddressList ( )

Gets all local IP addresses.

Returns
All local IP addresses.

◆ getSoftwareVersionList()

std::vector< std::string > agvc_interface::AgvcInterface::getSoftwareVersionList ( )

Gets the AGV software version list.

Returns
Software version list, for example {0.3.2+3b807d1-Linux_x86_64,0.6.3-patch.3+b8c6aa4-Linux_x86_64}.

◆ getUpdateFirmwareProcess()

FirmwareUpdateProcessInfo agvc_interface::AgvcInterface::getUpdateFirmwareProcess ( )

Gets firmware update process information.

Returns
Firmware update step information (failed means the update failed) and update progress (1.0 means the update succeeded).

◆ getWifiList()

std::vector< std::string > agvc_interface::AgvcInterface::getWifiList ( )

Gets the currently scanned WiFi list.

Attention
Asynchronous API.
Returns
{RUNNING}: asynchronous API is running; {}: empty, no WiFi found; {SSID}: non-empty list of scanned WiFi SSIDs.

◆ refreshAgvControllerParametersFile()

int agvc_interface::AgvcInterface::refreshAgvControllerParametersFile ( )

Refreshes parameters on AGV nodes after the AGV controller parameter file is modified.

Attention
Requires control priority.
Note
Do not call frequently. Keep the call rate below 1 Hz.
Returns
10100000: API executed successfully; else: API execution failed.

◆ releasePriority()

int agvc_interface::AgvcInterface::releasePriority ( )

Releases control priority.

Returns
10100000: control priority released successfully; else: failed to release control priority.

◆ resetAgvControllerParametersFile()

int agvc_interface::AgvcInterface::resetAgvControllerParametersFile ( )

Restores the AGV controller parameter file to factory defaults.

Attention
Requires control priority.
Note
Do not call frequently. Keep the call rate below 1 Hz.
Returns
10100000: API executed successfully; else: API execution failed.

◆ restartAgv()

int agvc_interface::AgvcInterface::restartAgv ( )

Restarts the AGV.

Returns
10100000: restart command executed successfully; else: restart command failed.

◆ scriptPaused()

int agvc_interface::AgvcInterface::scriptPaused ( )

Pauses the script.

Returns
10100000: script paused successfully; else: failed to pause the script.

◆ scriptResume()

int agvc_interface::AgvcInterface::scriptResume ( )

Resumes the script.

Returns
10100000: script resumed successfully; else: failed to resume the script.

◆ scriptStop()

int agvc_interface::AgvcInterface::scriptStop ( )

Stops the script.

Returns
10100000: script stopped successfully; else: failed to stop the script.

◆ setAgvControllerParametersFile()

int agvc_interface::AgvcInterface::setAgvControllerParametersFile ( const std::string & agv_parameters)

Sets the AGV controller parameter file.

Attention
Requires control priority.
Note
Do not call frequently. Keep the call rate below 1 Hz. This API refreshes parameters by default.
Parameters
[in]agv_parametersParameter information for the AGV controller.
Returns
10100000: parameters set successfully; else: failed to set parameters.

◆ setAgvName()

int agvc_interface::AgvcInterface::setAgvName ( const std::string & agv_name)

Sets the AGV name.

Parameters
[in]agv_nameAGV name to set.
Returns
10100000: name set successfully; else: failed to set the name.

◆ setPriority()

int agvc_interface::AgvcInterface::setPriority ( const std::string & name,
const std::string & ip = "" )

Sets control priority.

Note
  1. Control-priority APIs can be used only after this API succeeds; 2. Release another client's control priority with releasePriority before setting priority; 3. To preempt priority from the web side, set name="web".
Parameters
[in]nameUser name registered during RPC login.
[in]ipIP address.
Returns
10100000: control priority set successfully; else: failed to set control priority.

◆ setScriptStatus()

int agvc_interface::AgvcInterface::setScriptStatus ( ScriptRuntimeState status)

Sets the script runtime state.

Returns
10100000: script runtime state set successfully; else: failed to set script runtime state.

◆ setSystemClock()

int agvc_interface::AgvcInterface::setSystemClock ( const std::string & stamp)

Sets the AGV system time.

Parameters
[in]stampTimestamp in YYYY-MM-DDTHH:mm:ss.ssZ format, for example “2017-04-15T11:40:03.12Z”.

◆ startCalibration()

int agvc_interface::AgvcInterface::startCalibration ( const CalibrationType & type,
const Header & command_header = { "99999", "99999", 1, "99999" } )

Starts calibration.

Parameters
[in]typeCalibration type.
[in]command_headerThe id field is the ID of this command; other fields have no special meaning.
Returns
10100000: API call succeeded; 10120202: no control priority; else: API call failed.

◆ startCollectCalibrationData()

int agvc_interface::AgvcInterface::startCollectCalibrationData ( const CalibrationType & type,
const Header & command_header = { "99999", "99999", 1, "99999" } )

Starts collecting calibration data.

Note
LASER_ODOM calibration requires more than 1000 data samples. The exact amount can be changed in the configuration file.
Parameters
[in]typeCalibration type.
[in]command_headerThe id field is the ID of this command; other fields have no special meaning.
Returns
10100000: API call succeeded; 10120202: no control priority; else: API call failed.

◆ switchSoftwareVersion()

int agvc_interface::AgvcInterface::switchSoftwareVersion ( const std::string & software_version)

Switches the AGV software version.

Parameters
[in]software_versionSoftware version, for example "0.3.2+3b807d1-Linux_x86_64".
Returns
10100000: software version switched successfully; else: failed to switch software version.

◆ uninstallSoftware()

int agvc_interface::AgvcInterface::uninstallSoftware ( const std::string & software_version)

Uninstalls an AGV software version.

Parameters
[in]software_versionSoftware version, for example "0.3.2+3b807d1-Linux_x86_64".
Returns
10100000: software version uninstalled successfully; else: failed to uninstall software version.

◆ updateFirmware()

int agvc_interface::AgvcInterface::updateFirmware ( const FirmwareUpdateParam & update_firmware)

Updates AGV firmware.

Parameters
[in]update_firmwareConfigures the firmware modules to update and the firmware storage path.
Returns
10100000: firmware update information sent successfully; else: firmware update is in progress.

◆ updateSoftware()

int agvc_interface::AgvcInterface::updateSoftware ( const std::string & upgrade_pack_path)

Upgrades AGV software.

Parameters
[in]upgrade_pack_pathUpgrade package path, for example "/root/agvc_release-0.1.1+398d1f7-Linux_x86_64.tar.gz".
Returns
10100000: target version upgraded successfully; 10100201: upgrade is in progress; else: upgrade failed.