Skip to main content
. 2017 Dec 29;12(12):e0189008. doi: 10.1371/journal.pone.0189008

Table 3. A brief description of the auxiliary functions and procedures used in algorithms 1 and 2.

Name Description
NOTES: STM stands for Short-Term Memory
  MtT stands for Motion to Target
   BF stands for Boundary Following
readSensorData() This function reads the data provided by the obstacle detection sensors attached to the robot.
filterSensorData(pa, pb) This function returns a subset of the data contained in pb. To be more precise, this function implements the functionality of the sensor data filter; consequently, it returns those data in pb which are contiguous to the data stored in the STM layer pa.
addDataToSTM(pa, pb) This function adds the data contained in pb to the STM layer represented by pa.
removeDataFromSTM(pa, pb) This function removes the data contained in the angular region pb from the STM layer represented by pa.
removeAllDataFromSTM(pa) This function removes all data contained in the STM layer represented by pa.
createLayerInSTM() This function adds a new layer to the Short-Term Memory and returns a reference to it.
(Layers are organized according to a LIFO rule)
destroyLayerInSTM() This function destroys the currently-active layer of the Short-Term Memory—i.e. the layer which is at the top. Additionally, this function returns the layer located just below the one previously destroyed.
getMode() This function returns the operating mode in which the EG strategy is at present. Only two operating modes are considered: MtT and BF. When the EG strategy is in MtT mode, the robot is moved directly to the target point. When the EG strategy is in BF mode, the robot is moved around a blocking obstacle.
setMode(pa) This function is used to set the operating mode of the EG strategy.
(The default operating mode is assumed to be MtT)
computeRt(pa, pb) This function determines in which angular region of papa is a STM layer—the line pb lies.
isLayer#1(pa) This function returns true if pa is the STM layer #1; otherwise, it returns false.