<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Rough Mereology based CFill algorithm for robotic path planning</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Lukasz Zmudzinski</string-name>
          <email>lukasz@zmudzinski.me</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>University of Warmia and Mazury in Olsztyn, Faculty of Mathematics and Computer Science</institution>
          ,
          <addr-line>Sloneczna 54, 10-710 Olsztyn</addr-line>
          ,
          <country country="PL">Poland</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>This paper focuses on describing the CFill algorithm for rough mereology based intelligent agent path planning. The algorithm updates the methodology of the Square Fill Algorithm by increasing its adaptiveness, adding dynamic neighbour building and proposing a way to deal with dynamic changes to the robot environment, by implementing tree based path planning. The author describes the changes to the original algorithm with example values and their outcomes.</p>
      </abstract>
      <kwd-group>
        <kwd>Path planning Rough Mereology Potential Fields Robot Navigation Mereogeometry Robotics</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        Path planning for mobile robotics is one of the currently most researched
scienti c topics. One of the algorithms currently present for path planning using rough
mereology techniques is the Square Fill Algorithm [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. While generating a valid
path to the goal for an autonomous agent, the algorithm is memory-e cient,
making it hard to use for memory-low devices. Moreover, every appearance of
an obstacle after calculating the path means recalculating the whole algorithm.
      </p>
      <p>The author tries to challenge the problems and proposes a CFill algorithm,
based on the previously mentioned. The changes that were made include
replacing the method for creating potential eld neighbours to a dynamic one, adding
the narrowing mode described further in the paper and a new way of calculating
paths, that tackles the problem of dynamic entities entering the map area.</p>
      <p>
        The idea to implement tree based path planning for intelligent agents was
lately used in works including the Rapidly exploring Random Tree*[
        <xref ref-type="bibr" rid="ref8">8</xref>
        ], achieving
tasks for swarm robotics[
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] or task allocations for multi-robot systems[
        <xref ref-type="bibr" rid="ref9">9</xref>
        ].
      </p>
      <p>Copyright c 2019 for this paper by its authors. Use permitted under Creative
Commons License Attribution 4.0 International (CC BY 4.0).</p>
    </sec>
    <sec id="sec-2">
      <title>Rough mereology</title>
      <p>One of the biggest challenges in robotics is to determine the position of the
world elements such as robots, obstacles or navigation points like beacons. While
using various sensor mounted on the mobile agent, an estimate value is always
gathered, due to the probability of inaccurate readings. Those readings are prone
to error, because of many environmental and mechanical factors for example: the
type of surface, range sensors not picking material uctuations or poor camera
resolution qualities. This is where Mereology as a theory can help.</p>
      <p>The main scheme of Mereology is the notion of part. Any notion of a part that
is given, relates to the idea of containment or partial containment . This means
that the robot entering a beforehand speci ed area can ascertain its connection
to the area, by a degree. Given the information whether it is connected to the
area, overlaps it or is its part, the robot is able to establish its position value
more precisely. Given the notion carried out by Rough Mereology - part to a
degree, a real number can be retrieved in the range of 0:::1 (value of 1 meaning
full inclusion, while 0 - no inclusion) to give a precise description of the element
location, compared to the target area.</p>
      <p>
        Rough mereology based reasoning as described in [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] employs the notion of
a rough inclusion (x; y; r), which relation needs x is a part of y to a degree
of at least r. As our reasoning is concerned with spatial objects, the rough
inclusion involved in our reasoning is the one de ned as (X; Y; r) if and only if
jX\Y j &gt;= r, where X; Y are n-dimensional solids and jXj is the n-volume of X.
      </p>
      <p>X</p>
      <p>Considering a planar case of an autonomous mobile robot moving in a
3dimensional environment, hence, spatial objects X; Y are gures assumed
concept regions and jXj is the area of X. The rough inclusion (X; Y; r) is applied
in the construction of the mereological potential eld. Elements of this eld are
square and the distance between them is de ned as</p>
      <p>K(X; Y ) = minfmaxr (X; Y; r)g; maxs (Y; X; s)g:</p>
      <p>Classical methodology of potential elds works with integrable force eld
given by formulas of Coulomb or Newton which prescribe force at a given point
as inversely proportional to the squared distance from the target. In consequence
the potential is inversely proportional to the distance from the target. The basic
property of the potential is that its density (force) increases in the direction
toward the target. We observe this property in our construction. We start in
our construction with a rough inclusion { a similarity measure formalized in
the theory of rough mereology. Its basic construct is a rough inclusion. Rough
inclusion is a ternary relation : U U [0; 1] and its primitive formulas of the
form (x; y; r) read `the object x is a part to object y to a degree of at least r'.
A rough inclusion can be used to induce a distance function as well as primitive
relations of elementary geometry: betweenness and nearness.</p>
      <p>
        Geometry induced by means of a rough inclusion can be used to de ne a
generalized potential eld: the force eld in this construction can be interpreted
as the density of squares that ll the workspace and the potential is the integral
of the density. We present now the details of this construction, see also [
        <xref ref-type="bibr" rid="ref3 ref4">3, 4</xref>
        ].
      </p>
      <p>
        The potential eld generation methods called Square Fill Algorithm
introduced by Osmialowski and Polkowski [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] was presented with some alternative
modi cations to the algorithm and/or team based path planning in [
        <xref ref-type="bibr" rid="ref10 ref11 ref2 ref5 ref7">7, 11, 2, 10,
5</xref>
        ]. The main di erences between the algorithm and CFill algorithm will be
presented in the following section. You can see a graphical comparison of both eld
creation methods in Fig. 1.
The CFill algorithm takes the core element of the Square Fill Algorithm -
potential elds neighbour generation - and modi es it for better memory optimization
and environment adaptation. This comes with two vast changes to the way the
eld is generated.
      </p>
      <p>First of all, the potential eld neighbours are now created dynamically.
Instead of eight neighbours at set positions as in the Square Fill Algorithm, the
algorithm speci es a neighbours variable, that holds the number of neighbours
that should be created around the potential eld (at equal intervals). This is
achieved by calculating the angle in radians as following:
where n is the selected number of neighbours to be created. The angle is
multiplied each time a new neighbour is created in an iteration i, until the total angle
remains smaller than 2 radians. To calculate each neighbour position (x0; y0)
with a distance d from the potential eld (x; y) the following equation is used:
=</p>
      <p>350
neighbours</p>
      <p>180
x0 = sin( i) d</p>
      <p>x
y0 =
cos( i) d + y
(1)
(2)</p>
      <p>Secondly, the generated potential eld is sparse in open spaces and gets more
dense between obstacles. Variable named narrowing distance was proposed to
achieve that. Whenever it is set, the algorithm checks the distance between
the current potential eld and all obstacles and goes into the narrowing mode
whenever the distance is smaller than narrowing distance. The narrowing mode
has two tools that can be used for creating a more dense potential eld: creating
more neighbours around a potential eld or decreasing the step size for smaller
distances. Ideally both tools should be used to t through narrow passages. An
example of this method can be seen on Fig. 2.
The CFill algorithm is composed of the following steps (pseudocode can be seen
in Algorithm listing 1):
1. Set the following variables:
{ neighbours - contains how many neighbours should be created,
{ step - the incrementation step distance between potential elds,
{ radius - the radius of the created potential elds,
{ goal - position of the goal for the algorithm,
{ potential f ields - list to store created potential elds,
{ narrow distance - distance to activate the narrowing mode (optional),
{ narrow step - increment step distance for narrowing mode (optional),
{ narrow neighbours - neighbours in narrowing mode (optional).
2. Create an empty queue Q,
3. Set the is clockwise variable to True,
4. Add the rst potential eld at the goal location with a distance of 0,
5. Enumerate through all potential elds in Q,
6. Check the conditions, if any is True, remove the potential eld from Q and
go to next potential eld:
{ Check, if the potential eld is out of bounds of the map,
{ Check, if a potential eld at that location is already created,
{ Check, if the potential eld isn't overlapping an obstacle.
7. If the narrowing mode is set and the potential eld is in the distance of
narrow distance to obstacle:
{ Create neighbours with number narrow neighbours and narrow step
for distance incrementor from the potential eld as described above,
{ Add the neighbours to queue Q,
8. If the narrowing mod is not set or the potential eld isn't in the distance of
narrow distance to obstacle:
{ Create neighbours of the potential eld with the number neighbours and
step for distance incrementor as described above,
{ Add the neighbours to queue Q</p>
      <sec id="sec-2-1">
        <title>9. Change the is clockwise value to opposite, 10. Remove the potential eld from queue Q, 11. Add the potential eld to the potential f ields list.</title>
        <p>Algorithm 1 CFill Algorithm</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>Path planning using tree graphs</title>
      <p>Making the potential eld sparse in CFill algorithm compared to the Square Fill
Algorithm required implementing a new way of calculating paths. The previously
used method of picking neighbours by selecting new path points by nding the
nearest mereological distance between connected potential elds can't be used
in CFill algorithm at most times. The proposed algorithm for path planning is
devised of two steps: creating possible paths tree and selecting a path, based on
navigation to the tree root.
4.1</p>
      <sec id="sec-3-1">
        <title>Creating possible paths tree</title>
        <p>Below are the steps taken to build a tree graph on the generated mereological
potential elds. An example of a proposed tree can be seen in Fig. 3.
1. Append the goal position to the working f ields list,
2. Set the tree radius parameter responsible for determining how far should
the algorith look for neighbouring potential elds,
3. Enumerate through the created potential eld list until all potential elds
have their parent parameter set,
4. Check the following condition for enumerated eld:
{ Potential eld distance is smaller or equal to tree radius,
{ Potential eld is not in the working f ields list,
{ Potential eld does not have the parent parameter set.</p>
        <sec id="sec-3-1-1">
          <title>5. If the conditions are met: { Assign the parent parameter of current potential eld to the closest mereological eld from the working f ields list, { Add the potential eld to the working f ields list.</title>
          <p>After the tree is generated, a path for the autonomous agent can be chosen. This
means following the steps:
1. If the robot is at the goal position - end algorithm,
2. Add the robot position to path points list,
3. Find the mereological potential elds closest to the agent start position and
set it to
4. Do the following, until the full path is constructed:
{ Add the current potential eld position to path points list,
{ Get the parent parameter of the potential eld and assign it to current.
4.3</p>
        </sec>
      </sec>
      <sec id="sec-3-2">
        <title>Path smoothing</title>
        <p>
          After the path points are acquired the author uses a smoothing method modi ed
for rough mereology path planning algorithms presented in [
          <xref ref-type="bibr" rid="ref10">10</xref>
          ]. An example of
the smoothed path based on the path generated from the path tree can be found
in Fig. 4. The smoothing method has the following steps:
1. Smoothing weights and are selected,
2. The following steps are iterated over n times until they produce a result:
{ Data weight is applied and moves the position of the point xk
depending on the position of the previous xk 1 and next xk+1 point on the
given path:
xk = xk + (xk 1 + xk+1
2xk)
{ Counter balacing the updated position x+k with a chosen smooth weight
, so that a straight line isn't created.
        </p>
        <p>yk = yk + (xk
yk)
(3)
(4)
{ The value of the path point is updated, if the distance from the point
to any obstacle is greater than the computed collision distance. In other
cases, the value remains the same.
4.4</p>
      </sec>
      <sec id="sec-3-3">
        <title>Dynamic changing environment</title>
        <p>Due to the nature of the proposed path planning method, contraty to the Square
Fill Algorithm, it is possible to use the generated path system for dynamic
environments, without recalculating the potential eld and/or the proposed path.
When a new obstacle is added after the initial calculations, the potential elds
in the vacinity get blacked out by setting their active parameter to F alse. The
e ect of this is that all branches of the path tree starting or going through that
point are turned o . From this point, nding a new path is similar to initial
nding of the path as described above - an active point closest to the current
robot position is searched for and a new path is selected.
5</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>Conclusion</title>
      <p>
        The CFill algorithm is the successor to the Square Fill Algorithm proposed by
Osmialowski and Polkowski in [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. The algorithm focuses on delivering an
updated method of creating the mereological potential eld, by doing so
dynamically, allowing parametrization, instead of static content. This allows the creation
of a set number of neighbours based on the neighbours parameter passed as an
input along with the step like in the predecessor.
      </p>
      <p>This manipulation allowed the implementation of the narrowing mode, which
gives the possibility of creating more dense potential elds around obstacles,
while making them sparse in open terrain - greately reducing the memory needed
to calculate the mereologic potential eld.</p>
      <p>Moreover, due to how the algorithm created potential elds, the old way of
implementing path nding was deprecated. A new solution was presented using
tree graphs that were based on the earlier created potential elds. The greatest
advantage of this, is that the algorithm is now valid in a changing environment,
since adding new obstacles after the path tree was created, does not induce the
need of recalculating the whole potential eld or generated paths.</p>
      <p>Future work will include further dive into the subject of using CFill in
changing environments and bigger comparison of the algorithm with other rough
mereology based ideas. More work can be done in the eld of the path tree creation
as only one method was tested on how to pick branch roots for the mereological
potential eld.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Divband</surname>
            ,
            <given-names>S.M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zahadat</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ghofrani</surname>
          </string-name>
          , J., Hamann, H.:
          <article-title>Adaptive Path Formation in Self-Assembling Robot Swarms by Tree-Like Vascular Morphogenesis</article-title>
          , Distributed Autonomous Robotic Systems, Springer International Publishing, pp.
          <volume>299</volume>
          {
          <issue>311</issue>
          ,
          <year>2019</year>
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Gnys</surname>
            <given-names>P.</given-names>
          </string-name>
          :
          <article-title>Mereogeometry Based Approach for Behavioral Robotics</article-title>
          . In: Polkowski L. et al. (
          <article-title>eds) Rough Sets</article-title>
          .
          <source>IJCRS 2017. Lecture Notes in Computer Science</source>
          , vol
          <volume>10314</volume>
          . Springer, Cham,
          <year>2017</year>
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Osmialowski</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          :
          <article-title>On path planning for mobile robots: Introducing the mereological potential eld method in the framework of mereological spatial Reasoning</article-title>
          .
          <source>Journal of Automation, Mobile Robotics and Intelligent Systems (JAMRIS) 3</source>
          (
          <issue>2</issue>
          ), pp.
          <fpage>24</fpage>
          -
          <lpage>33</lpage>
          ,
          <year>2009</year>
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Osmialowski</surname>
            <given-names>P.</given-names>
          </string-name>
          , Polkowski L.:
          <article-title>Spatial Reasoning Based on Rough Mereology: A Notion of a Robot Formation and Path Planning Problem for Formations of Mobile Autonomous Robots</article-title>
          ,
          <source>In: Transactions on Rough Sets XII</source>
          , pp.
          <fpage>143</fpage>
          -
          <lpage>169</lpage>
          (
          <year>2010</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Szmigielski</surname>
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Polkowski</surname>
            <given-names>L.</given-names>
          </string-name>
          :
          <article-title>Computing from words via rough mereology in mobile robot navigation</article-title>
          ,
          <source>In: Intelligent Robots and Systems</source>
          ,
          <year>2003</year>
          . (
          <article-title>IROS 2003)</article-title>
          . Proceedings. 2003 IEEE/RSJ International Conference on
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Polkowski</surname>
            <given-names>L.</given-names>
          </string-name>
          :
          <article-title>Rough mereology: A new paradigm for approximate reasoning</article-title>
          , In:
          <source>International Journal of Approximate Reasoning</source>
          , Volume
          <volume>15</volume>
          , Issue 4, pp.
          <fpage>333</fpage>
          -
          <lpage>365</lpage>
          , November 1996
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Polkowski</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zmudzinski</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Artiemjew</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          :
          <article-title>Robot navigation and path planning by means of rough mereology</article-title>
          ,
          <source>In: Proceedings of IEEE International Conference on Robotic Computing</source>
          ,
          <year>2018</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Veras</surname>
            ,
            <given-names>L. G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Medeiros</surname>
            ,
            <given-names>F. L.</given-names>
          </string-name>
          , Guimara~es,
          <string-name>
            <surname>L. N.</surname>
          </string-name>
          (
          <year>2019</year>
          ).
          <article-title>Rapidly exploring Random Tree* with a sampling method based on Sukharev grids and convex vertices of safety hulls of obstacles</article-title>
          .
          <source>International Journal of Advanced Robotic Systems.</source>
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Zhou</surname>
            ,
            <given-names>X.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wang</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ding</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hu</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Shang</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          :
          <article-title>Balanced connected task allocations for multi-robot systems: An exact ow-based integer program and an approximate tree-based genetic algorithm, Expert Systems with Applications</article-title>
          , v.
          <volume>116</volume>
          , pp.
          <fpage>10</fpage>
          -
          <lpage>20</lpage>
          ,
          <year>2019</year>
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Zmudzinski</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Artiemjew</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          :
          <article-title>Path planning based on potential elds from rough mereology</article-title>
          ,
          <source>In: Proceedings of International Joint Conference on Rough Sets, IJCRS'17</source>
          ,
          <string-name>
            <surname>Olsztyn</surname>
          </string-name>
          ,
          <source>Poland, Lecture Notes in Computer Science (LNCS)</source>
          , vol.
          <volume>10303</volume>
          , pp.
          <fpage>158</fpage>
          -
          <lpage>168</lpage>
          . Springer, Heidelberg (
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Zmudzinski</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Polkowski</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Artiemjew</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          :
          <article-title>Controlling robot formations by means of spatial reasoning based on rough mereology</article-title>
          ,
          <source>In: Advances in Robotics Research</source>
          , vol.
          <volume>2</volume>
          (
          <issue>3</issue>
          ), pp.
          <fpage>219</fpage>
          -
          <lpage>236</lpage>
          , Techno-Press (
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>