<?xml-model href='http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng' schematypens='http://relaxng.org/ns/structure/1.0'?><TEI xmlns="http://www.tei-c.org/ns/1.0">
	<teiHeader>
		<fileDesc>
			<titleStmt><title level='a'>Rapidly Exploring Random Tree Algorithm-Based Path Planning for Worm-Like Robot</title></titleStmt>
			<publicationStmt>
				<publisher></publisher>
				<date>06/01/2020</date>
			</publicationStmt>
			<sourceDesc>
				<bibl> 
					<idno type="par_id">10252874</idno>
					<idno type="doi">10.3390/biomimetics5020026</idno>
					<title level='j'>Biomimetics</title>
<idno>2313-7673</idno>
<biblScope unit="volume">5</biblScope>
<biblScope unit="issue">2</biblScope>					

					<author>Yifan Wang</author><author>Prathamesh Pandit</author><author>Akhil Kandhari</author><author>Zehao Liu</author><author>Kathryn A. Daltorio</author>
				</bibl>
			</sourceDesc>
		</fileDesc>
		<profileDesc>
			<abstract><ab><![CDATA[Inspired by earthworms, worm-like robots use peristaltic waves to locomote. While there has been research on generating and optimizing the peristalsis wave, path planning for such worm-like robots has not been well explored. In this paper, we evaluate rapidly exploring random tree (RRT) algorithms for path planning in worm-like robots. The kinematics of peristaltic locomotion constrain the potential for turning in a non-holonomic way if slip is avoided. Here we show that adding an elliptical path generating algorithm, especially a two-step enhanced algorithm that searches path both forward and backward simultaneously, can make planning such waves feasible and efficient by reducing required iterations by up around 2 orders of magnitude. With this path planner, it is possible to calculate the number of waves to get to arbitrary combinations of position and orientation in a space. This reveals boundaries in configuration space that can be used to determine whether to continue forward or back-up before maneuvering, as in the worm-like equivalent of parallel parking. The high number of waves required to shift the body laterally by even a single body width suggests that strategies for lateral motion, planning around obstacles and responsive behaviors will be important for future worm-like robots.]]></ab></abstract>
		</profileDesc>
	</teiHeader>
	<text><body xmlns="http://www.tei-c.org/ns/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink">
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1.">Introduction</head><p>Due to soft characteristics, nonholonomic constraints, limits on reachable space and the high number of degrees of freedom (DOF), navigating and path planning for worm-like robots can be difficult <ref type="bibr">[1]</ref><ref type="bibr">[2]</ref><ref type="bibr">[3]</ref>. Inspired by earthworms, worm-like robots locomote by changing the body shape of each segment. The segment shape is constrained such that extension in length is coupled with contraction in diameter, and contraction in length is coupled with expansion in diameter. By actuating the segments in a given sequence, the robot can generate a spatial peristalsis wave to move either forward or backward <ref type="bibr">[4]</ref>.</p><p>To turn, the wave must be adjusted so the amplitude is different on the left and right of the segment. We have previously shown that even if the robot's structure is simplified as a series of 2D trapezoids (Figure <ref type="figure">1</ref>), changing from straight-line locomotion into a turn requires multiple, unique waves that are not periodic. This is in part because the shape of the segments can only be changed within certain bounds as shown in Figure <ref type="figure">2</ref> because of the limit of the segment deformation. As a result, both the length traveled and the angle turned for each wave are limited. Turning angle also limits traveling distance per wave: The more the robot turns in a certain wave, the less distance it can move <ref type="bibr">[3]</ref>. Our previous design, the compliant modular mesh worm robot with steering (CMMWorm-S) is typical of such robots <ref type="bibr">[4]</ref>.</p><p>patterns <ref type="bibr">[5]</ref>. To achieve such a goal, a modified rapidly exploring random tree (RRT) algorithm has been developed to form a feasible path from an initial position and orientation to a desired position and orientation. As with original RRT, motion is planned according to the decision trees which are expanded into new sampled states <ref type="bibr">[6]</ref>. However, in our modified method, we are going to determine the equation of a curve based on the initial and desired configuration of the robot and make the robot follow the curve.  The kinematic constraints we see in our robots limit the amount and type of possible turning <ref type="bibr">[3]</ref>. If each wave can involve only two segments due to power density constraints , the front segment can only reach a limited space of points after each wave (left, reachable area is outlined in blue with red filling as examples) and at point, the resulting orientation is narrowly constrained (right).</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Related Work</head><p>Although path planning for soft robots is a relatively new topic, there have been several approaches to solving similar problems.</p><p>A considerable amount of well-developed searching algorithms, most notably A-star and RRT, have been applied to path planning of autonomous and semi-autonomous vehicles and Unmanned aerial vehicles (UAVs) <ref type="bibr">[7]</ref>. Correspondingly, methods to smooth the path between waypoints of the path planning result have also been introduced depending on the specific kinetic constraints and requirements of the given moving subject <ref type="bibr">[8]</ref>. Clothoid and spline curves are often applied when the smoothness of acceleration is required. Simpler curves such as polynomial and Dubins curves are more preferred when the resources for runtime calculation are limited <ref type="bibr">[8,</ref><ref type="bibr">9]</ref>. In contrast to autonomous vehicles, worm-like robots have less velocity and each segment has a stationary support or anchoring phase while other segments locomote. As a result of these characteristics, the smoothness of acceleration has little impact on kinematics. A simpler and less costly path smoothing patterns <ref type="bibr">[5]</ref>. To achieve such a goal, a modified rapidly exploring random tree (RRT) algorithm has been developed to form a feasible path from an initial position and orientation to a desired position and orientation. As with original RRT, motion is planned according to the decision trees which are expanded into new sampled states <ref type="bibr">[6]</ref>. However, in our modified method, we are going to determine the equation of a curve based on the initial and desired configuration of the robot and make the robot follow the curve.  The kinematic constraints we see in our robots limit the amount and type of possible turning <ref type="bibr">[3]</ref>. If each wave can involve only two segments due to power density constraints , the front segment can only reach a limited space of points after each wave (left, reachable area is outlined in blue with red filling as examples) and at point, the resulting orientation is narrowly constrained (right).</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Related Work</head><p>Although path planning for soft robots is a relatively new topic, there have been several approaches to solving similar problems.</p><p>A considerable amount of well-developed searching algorithms, most notably A-star and RRT, have been applied to path planning of autonomous and semi-autonomous vehicles and Unmanned aerial vehicles (UAVs) <ref type="bibr">[7]</ref>. Correspondingly, methods to smooth the path between waypoints of the path planning result have also been introduced depending on the specific kinetic constraints and requirements of the given moving subject <ref type="bibr">[8]</ref>. Clothoid and spline curves are often applied when the smoothness of acceleration is required. Simpler curves such as polynomial and Dubins curves are more preferred when the resources for runtime calculation are limited <ref type="bibr">[8,</ref><ref type="bibr">9]</ref>. In contrast to autonomous vehicles, worm-like robots have less velocity and each segment has a stationary support or anchoring phase while other segments locomote. As a result of these characteristics, the smoothness of acceleration has little impact on kinematics. A simpler and less costly path smoothing Figure <ref type="figure">2</ref>. The kinematic constraints we see in our robots limit the amount and type of possible turning <ref type="bibr">[3]</ref>. If each wave can involve only two segments due to power density constraints, the front segment can only reach a limited space of points after each wave (left, reachable area is outlined in blue with red filling as examples) and at point, the resulting orientation is narrowly constrained (right).</p><p>Through this study, we are intending to develop and implement an efficient and robust path planning method for the CMMWorm-S robot as well as other robots following similar locomotion patterns <ref type="bibr">[5]</ref>. To achieve such a goal, a modified rapidly exploring random tree (RRT) algorithm has been developed to form a feasible path from an initial position and orientation to a desired position and orientation. As with original RRT, motion is planned according to the decision trees which are expanded into new sampled states <ref type="bibr">[6]</ref>. However, in our modified method, we are going to determine the equation of a curve based on the initial and desired configuration of the robot and make the robot follow the curve.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Related Work</head><p>Although path planning for soft robots is a relatively new topic, there have been several approaches to solving similar problems.</p><p>A considerable amount of well-developed searching algorithms, most notably A-star and RRT, have been applied to path planning of autonomous and semi-autonomous vehicles and Unmanned aerial vehicles (UAVs) <ref type="bibr">[7]</ref>. Correspondingly, methods to smooth the path between waypoints of the path planning result have also been introduced depending on the specific kinetic constraints and requirements of the given moving subject <ref type="bibr">[8]</ref>. Clothoid and spline curves are often applied when the smoothness of acceleration is required. Simpler curves such as polynomial and Dubins curves are more preferred when the resources for runtime calculation are limited <ref type="bibr">[8,</ref><ref type="bibr">9]</ref>. In contrast to autonomous vehicles, worm-like robots have less velocity and each segment has a stationary support or anchoring phase while other segments locomote. As a result of these characteristics, the smoothness of acceleration has little impact on kinematics. A simpler and less costly path smoothing method is therefore preferred. As a result, the ellipse is selected for our case which has less maximum curvature than Dubins method.</p><p>Here we assess whether elliptical curves are appropriate approximations for the specific nonholonomic constraints that arise from peristaltic locomotion.</p><p>For snake-like robots, techniques based on serpenoid curves and genetic algorithms have been proposed in which the range of path and curve deviation are used as constraints to compute a path <ref type="bibr">[10]</ref>. Planning a path for snake-like robots has also been solved with potential energy methods <ref type="bibr">[11]</ref>.</p><p>Algorithms have also been presented for deformable robots. Gayle et al. <ref type="bibr">[12]</ref> presented an algorithm for path planning of deformable robots by using the probabilistic roadmap method. In this algorithm, they used constraints like preserving volume in order to make corrections and make an appropriate path. In <ref type="bibr">[13]</ref>, roadmaps are built for deformable volumes. The nodes of these roadmaps are equilibrium configurations of volume under constraints and hence find the path by searching the roadmap. In <ref type="bibr">[14]</ref>, the probabilistic roadmap planner finds a path based on the Bezier surface and energy function. In <ref type="bibr">[15]</ref>, the path is formed in two stages: first, the approximate path is formed without considering collisions and second, the path is corrected by deforming the robot wherever there are collisions. In soft robotics, there is also research focused on an opposite principle: finding a path where the robot contacting the edge of the obstacles is considered having the lowest cost. In such a case, the soft robot can utilize such contacting points to enhance its locomotion <ref type="bibr">[16,</ref><ref type="bibr">17]</ref>.</p><p>Meanwhile, research has been done on the locomotion of worm-like robots and its relation to the robot properties such as size, stiffness and deforming pattern <ref type="bibr">[18,</ref><ref type="bibr">19]</ref>. Our simulation models shown in the following section follows the slip elimination criteria during locomotion. This has been previously published <ref type="bibr">[19]</ref> and states that in order for a peristaltic device to turn without slipping, the actuation pattern must change each wave depending on the previous configuration of the robot. Such waveforms have been termed as non-periodic waveforms.</p><p>To our knowledge, though different approaches on path-planning for the soft robot have been developed, no other research has focused on a similar topic as of this paper: path-planning solution to deal with the complicity and nonholonomic constraints of worm-like robot.</p><p>In order to find an appropriate pathfinding method for the worm-like robot, we started from two kinds of simple algorithms (RRT (Algorithm 1) and elliptical path generation (Algorithm 2)). Then we combined those two algorithms (combined RRT ellipse (Algorithm 3) to benefit both of their advantages. Based on such combination, we introduced a more advanced algorithm (enhanced combined RRT ellipse (Algorithm 4)) with some helpful improvements. A brief overview of these 4 algorithms is shown in Table <ref type="table">1</ref>. The rest of this paper is organized as follows: Section 2 will provide more details about the applied robot path planning algorithm; Section 3 will show the experimental results of the presented algorithm in a simulated environment; Section 4 will introduce a discussion of the different algorithms and their potentials; Finally, Section 5 will provide the summarized conclusions.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.">Methods: Pathfinding Algorithms</head></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.1.">Random Trees (RRT)</head><p>In this classical RRT algorithm, we initialize the configuration of the robot and the maximum number of iterations. The configuration includes the coordinate P(x,y) and heading angle of its first segment's center of mass; length of the left and right segments of trapezoids (W L and W R ). At each iteration, a random coordinate and then a configuration of the robot closest to that coordinate is selected and added to the decision tree. The configuration of the robot is selected based on its constraints as shown in Figure <ref type="figure">2</ref>. When finding such configurations, previous configurations from the decision tree are taken into consideration. Those steps will repeat until (1) the tree has reached the goal; (2) the number of iterations has reached its preset maximum value. In case <ref type="bibr">(2)</ref>, it selects the point and configuration that is closest to the goal.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Algorithm 1 RRT</head><p>Input: Initial and desired configuration of the robot, the maximum number of samples, N max Output: Tree, T 1.</p><p>Add initial configuration as a node C 1 to the tree, T 2.</p><p>For </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.2.">Elliptical Path Generation</head><p>RRT can be time-consuming as it explores many configurations of the robot. In order to reduce the time cost, we intend to find a simple mathematical expression of the path that can smoothly connect the initial and final configuration of the robot.</p><p>In this approach, instead of randomly exploring spaces to form a path for a robot, we are going to determine an equation of curve for the robot to follow. The equation of a curve is determined on the basis of the initial and desired configurations of the robot. The constraints are as follows:</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>&#8226;</head><p>The robot is tangent to the curve at the start coordinate</p><p>The robot is tangent to the curve at the goal coordinate &#8226;</p><p>The start coordinate of the head center of the robot satisfies the equation of the curve.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>&#8226;</head><p>The goal coordinate of the head center of the robot satisfies the equation of the curve.</p><p>We choose an elliptical curve as the path for the robot to follow. The general equation of the ellipse (in terms of coordinate (x,y)) can be written as:</p><p>Equations ( <ref type="formula">1</ref>) and (2) are equivalent. There are four unknown parameters in the ellipse's equation which are the center of the ellipse (h, k), major axis a and minor axis b. These unknowns can be determined by the above four constraints. As mentioned in Figure <ref type="figure">2</ref>, our robot has a range of angles it can turn in a single wave. Once we have the equation of the elliptical curve, we determine the angle by which the robot should turn per peristaltic wave. These angles are chosen such that the robot follows the generated elliptical path with minimal deviation, thereby minimizing errors. Once the robot reaches the goal, it stops following the ellipse.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Algorithm 2 Elliptical path generation</head><p>Input: Initial and desired configuration of the robot Output: List of angles, W 1.</p><p>Apply Equation ( <ref type="formula">1</ref>) to determine a,b,h,k based on initial and final configuration such that:</p><p>= 0 where (x r , y r ) is the robot's center coordinate of the head of initial configuration, m r is the robot's tangent of the orientation of initial configuration and (x d , y d ) is the center coordinate of the head of desired goal configuration, m d is the tangent of the orientation of the desired configuration 2.</p><p>Current configuration, C i = Initial configuration, I 3.</p><p>While C i Desired Configuration, D: a. Execute set of angles to follow ellipse to generate a new set of configurations {C} b. Select new configuration, N from {C} which closely satisfies the ellipse c.</p><p>Add angle of N to list of angles, W d.</p><p>Return W</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.3.">Combined RRT Ellipse</head><p>In some special cases, a single elliptical path from initial and final configuration may not exist. For example, from the initial condition shown in Figure <ref type="figure">4</ref>, if the goal is in the first quadrant and the desired orientation is zero degrees. In this case, an ellipse cannot be formed due to geometrical constraints. However, it is possible to reach the goal with multiple ellipses. Hence an algorithm is needed which not only forms multiple ellipses but also follows them. Thus, combining these two approaches wherein we take the robot's constraints into consideration and check whether the robot is deviating from generated ellipse and while checking whether the robot is getting stalled.</p><p>In this method, we randomly select major axis a, minor axis b and direction of the ellipse, and direction of the worm. After determining the ellipse from a, b and direction of the ellipse (finding center of ellipse (h, k)) we let the robot follow the ellipse until it has completed the ellipse, or drifted from the ellipse, or is stalled. In that case, we select a new configuration by which it can reach the goal with minimum distance and add that configuration to the decision tree. Finally, after all the iterations we select the configuration which is closest to the goal and execute the path.</p><p>In RRT, in order to add a new configuration to the tree, we selected the configuration that is close to the goal. In this method, we are estimating the remaining distance after each wave and adding it to the distance traveled so far by the robot. In order to estimate the remaining distance, we are determining a new ellipse after each wave based on constraints mentioned in the elliptical path generation. Once we find parameters of the ellipse, we estimate its arc length from its current position to the goal. The arc length is determined as:</p><p>where L EA is the Elliptical Arc length, &#952; d is the angle between the radii from position to goal and</p><p>where L total is the estimated total distance, L traveled is the recorded traveled distance and L EA is the Elliptical Arc length As previously mentioned, for some special cases an ellipse path is not feasible. In such cases, we eliminate the constraint that the robot is tangent to the start coordinate. From the remaining constraints, we determine a circle and hence compute the circular arc length. In this case, in order to determine estimated arc length, we multiply the circular arc length with a penalty and then add it to the distance traveled. By doing this, it is less likely to select that configuration by which an elliptical path is not possible.</p><p>where L total is the estimated total distance, L traveled is the recorded traveled distance, &#969; is a manually selected penalty weight and L EA is the circular arc length. Sample a configuration, C s from the tree, T c.</p><p>Apply Equation (2) to determine center coordinate of the ellipse (h,k) based on:</p><p>Execute a set of points from C s which the robot can follow and closely satisfy the ellipse to generate a new set of configurations {C} e.</p><p>Find best of {C} based on Equations ( <ref type="formula">4</ref>) or <ref type="bibr">(5)</ref> and add it to T</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>2.</head><p>Return T</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.4.">Enhanced Combined RRT Ellipse</head><p>In this method, the procedure is the same as the combined RRT and elliptical path generation until it selects the configuration to add it to the tree. Once the remaining path from the current configuration to the final goal can be generated as an ellipse, it directly completes the path without introducing errors instead of randomly selecting waypoints. After several iterations, we get many solutions. Among those solutions, it selects the path by which it requires a smaller number of waves (Figure <ref type="figure">3</ref>).  </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.">Experimental Results</head><p>All algorithms in Table <ref type="table">1</ref> have been tested in MATLAB simulation environment with the constraints described in Section 1. In the examples shown, the initial condition of the robot is horizontal for all segments. The error between the robot and the goal is evaluated based on the equation:</p><p>where E is the error between the robot and the goal (in centimeter); (xr, yr) and &#120572; &#119903; are the robot's center coordinate and heading angle in radian of the head of the robot's current configuration; (xd, yd) and &#120572; &#119889; are the center coordinate and heading angle in radian of the head of desired goal configuration; K is a manually chosen conversion weight indicating how critical the angle accuracy is to a specific path-planning problem (with a unit of centimeter per radian). The parameter K can be seen as a tradeoff between distance error and angular error is meant to be manually selected depending on scenario requirements; the more critical angular error matters to a specific case, the higher value K should be. For the examples in this paper, the K is always assigned to 1. The robot is considered reaching the goal once E is smaller than 2.</p><p>Specifically, as shown in Figure <ref type="figure">4</ref>, the initial configuration of the robot is such that its rear edge is on the y-axis and its centerline is on the x-axis. The initial and goal coordinates are based on the coordinate of the center of the head of the robot.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.1.">Rapidly Exploring Random Trees</head><p>As expected, RRT creates an expanding tree that considers discrete movements of individual waves. However, these waves appear inefficient. For example, we considered a goal just 2 body widths away from centerline here at position (105,40), with angle change of 40&#176; orientation as blue dot and arrow in Figure <ref type="figure">4</ref>. The yellow dot represents the initial center coordinate of the robot. The blue lines show the decision tree T, that traces the coordinates of the center of the first segment or head of the robot for 1000 iterations. The best resulting path is shown in magenta in Figure <ref type="figure">4</ref>. In other words, the difference between Algorithm 3 and 4 is that Algorithm 4 enables two new ellipses to be added in a single step if the goal is reached from the best of first ellipse.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Algorithm 4 Enhanced combined RRT and elliptical path</head><p>Input: Initial and desired configuration of the robot, the maximum number of samples, N max Output: Tree, T 1.</p><p>Add initial configuration to the tree, T 2.</p><p>For Find best of {C'} based on Equations (4) and add it to T iv.</p><p>If the robot reaches the goal position, then immediately return T Else: Add C new to T</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>3.</head><p>Return T</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.">Experimental Results</head><p>All algorithms in Table <ref type="table">1</ref> have been tested in MATLAB simulation environment with the constraints described in Section 1. In the examples shown, the initial condition of the robot is horizontal for all segments. The error between the robot and the goal is evaluated based on the equation:</p><p>where E is the error between the robot and the goal (in centimeter); (x r , y r ) and &#945; r are the robot's center coordinate and heading angle in radian of the head of the robot's current configuration; (x d , y d ) and &#945; d are the center coordinate and heading angle in radian of the head of desired goal configuration; K is a manually chosen conversion weight indicating how critical the angle accuracy is to a specific path-planning problem (with a unit of centimeter per radian). The parameter K can be seen as a tradeoff between distance error and angular error is meant to be manually selected depending on scenario requirements; the more critical angular error matters to a specific case, the higher value K should be.</p><p>For the examples in this paper, the K is always assigned to 1. The robot is considered reaching the goal once E is smaller than 2.</p><p>Specifically, as shown in Figure <ref type="figure">4</ref>, the initial configuration of the robot is such that its rear edge is on the y-axis and its centerline is on the x-axis. The initial and goal coordinates are based on the coordinate of the center of the head of the robot. </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.2.">Elliptical Path Generation</head><p>Following an ellipse is a faster way to calculate how to get from initial to the desired configuration, but an ellipse is only an approximation of the path the robot can follow. Here, starting from the same initial conditions as above, the ellipse can be accurately followed along some curves. (such as Figure <ref type="figure">5a</ref>.) However, as seen in Figure <ref type="figure">5b</ref>, the robot may fail to follow the ellipse in certain scenarios when the ellipse is too small. This is due to the fact that the robot's kinematic constraints are a function of the shape of the entire body of the robot, so they are not taken into account when determining ellipse parameters. In Figure <ref type="figure">5</ref>, the blue curve is the generated ellipse based on the initial and final configurations of the robot. The pink curve is the path robot has followed. </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.3.">Combined RRT and Elliptical Path</head><p>Using this algorithm, the robot approaches the goal in most cases. However, the RRT method is computationally expensive as compared to the Elliptical Path Generation methods. In order to reach the goal with a smaller error, many more iterations are required. This is shown in Figure <ref type="figure">6</ref> where with maximum iterations set to 1000 it approaches close to the goal, but to get even closer 10&#215; more iterations are required. </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.1.">Rapidly Exploring Random Trees</head><p>As expected, RRT creates an expanding tree that considers discrete movements of individual waves. However, these waves appear inefficient. For example, we considered a goal just 2 body widths away from centerline here at position (105,40), with angle change of 40 &#8226; orientation as blue dot and arrow in Figure <ref type="figure">4</ref>. The yellow dot represents the initial center coordinate of the robot. The blue lines show the decision tree T, that traces the coordinates of the center of the first segment or head of the robot for 1000 iterations. The best resulting path is shown in magenta in Figure <ref type="figure">4</ref>.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.2.">Elliptical Path Generation</head><p>Following an ellipse is a faster way to calculate how to get from initial to the desired configuration, but an ellipse is only an approximation of the path the robot can follow. Here, starting from the same initial conditions as above, the ellipse can be accurately followed along some curves. (such as Figure <ref type="figure">5a</ref>.) However, as seen in Figure <ref type="figure">5b</ref>, the robot may fail to follow the ellipse in certain scenarios when the ellipse is too small. This is due to the fact that the robot's kinematic constraints are a function of the shape of the entire body of the robot, so they are not taken into account when determining ellipse parameters. In Figure <ref type="figure">5</ref>, the blue curve is the generated ellipse based on the initial and final configurations of the robot. The pink curve is the path robot has followed.  </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.2.">Elliptical Path Generation</head><p>Following an ellipse is a faster way to calculate how to get from initial to the desired configuration, but an ellipse is only an approximation of the path the robot can follow. Here, starting from the same initial conditions as above, the ellipse can be accurately followed along some curves. (such as Figure <ref type="figure">5a</ref>.) However, as seen in Figure <ref type="figure">5b</ref>, the robot may fail to follow the ellipse in certain scenarios when the ellipse is too small. This is due to the fact that the robot's kinematic constraints are a function of the shape of the entire body of the robot, so they are not taken into account when determining ellipse parameters. In Figure <ref type="figure">5</ref>, the blue curve is the generated ellipse based on the initial and final configurations of the robot. The pink curve is the path robot has followed.  The blue curve is the ellipse generated and pink is the path executed. In case (a) where robot follows the ellipse, blue and red arrow almost coincide which shows that the robot has successfully reached its goal. In case (b) the robot is not able to follow the ellipse, and thus the pink and blue curves do not coincide because the elliptical axis length in the lateral direction is too small.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.3.">Combined RRT and Elliptical Path</head></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.3.">Enhanced Combined RRT Ellipse</head><p>Using this algorithm, the robot approaches the goal in most cases. However, the RRT method is computationally expensive as compared to the Elliptical Path Generation methods. In order to reach the goal with a smaller error, many more iterations are required. This is shown in Figure <ref type="figure">6</ref> where with maximum iterations set to 1000 it approaches close to the goal, but to get even closer 10&#215; more iterations are required. Red dot and arrow are the reached position and orientation of the robot. In this case, the robot successfully approached the goal with 10,000 maximum iterations.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.4.">Enhanced Combined RRT and Elliptical Path (ECRE)</head><p>This algorithm is much faster compared to the above three in yielding results. We demonstrate this in a challenging situation for worm-like robots in which the robot needs to reposition the body parallel to the original position but offset laterally by 1.5 body widths. In other words, this is a wormlike robot equivalent to a "parallel-parking" problem. As shown in Figure <ref type="figure">7</ref>, the best solution involves moving backward first and then moving forward again. With Algorithm 4, we can find this solution in 15 iterations and the goal and reached position almost coincide. Forward moves are also considered (as shown in blue lines).</p><p>In positions where multiple solutions are found after the set number of iterations, the path that requires the fewest number of waves is chosen. </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.4.">Enhanced Combined RRT Ellipse (ECRE)</head><p>This algorithm is much faster compared to the above three in yielding results. We demonstrate this in a challenging situation for worm-like robots in which the robot needs to reposition the body parallel to the original position but offset laterally by 1.5 body widths. In other words, this is a worm-like robot equivalent to a "parallel-parking" problem. As shown in Figure <ref type="figure">7</ref>, the best solution involves moving backward first and then moving forward again. With enhanced combined RRT ellipse, we can find this solution in 15 iterations and the goal and reached position almost coincide. Forward moves are also considered (as shown in blue lines). </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.5.">Algorithm Efficiency Comparison</head><p>As shown in Figure <ref type="figure">8</ref>, both classic RRT and combined RRT Ellipse require a massive number of iterations to eventually approach the goal. For RRT, as seen in Figure <ref type="figure">8a</ref>, even after 10,000 iterations, the robot has not reached the goal position and orientation, so the robot has chosen the configuration which is closest. The tree of combined RRT Ellipse is much closer to the goal compared to the one in classic RRT within the same maximum iterations. This is because, in RRT, just one wave is explored at each iteration; whereas, in combined RRT Ellipse, multiple waves are calculated in each iteration.</p><p>Our research evaluates the total wave needed to follow the path as an indicator of efficiency. This value is proportional to total locomotion time since the wave of earthworm robot (e.g., our CMMWorm-S robot) is normally generated in a certain temporal pattern. In a case where the energy consumption is more critical, some other indicators like the cost of transport can be introduced to replace the total waves in the cost function during pathfinding.</p><p>The advantage of enhanced combined RRT ellipse (Algorithm 4) is that the result is accurate as of the combined RRT Ellipse method (Algorithm 3), but requires much fewer iterations to find solutions, such that in fact multiple solutions are found and that the planner can pick the best one, shown in Figure <ref type="figure">8c</ref>. The one with fewest waves is selected. As a result, it takes less total time to find a solution, even considering the fact that each iteration takes slightly longer (Table <ref type="table">2</ref>).</p><p>Figure <ref type="figure">9</ref> shows how efficient the ECRE algorithm is. It can be seen that as we increase the number of iterations, the tree is closer to the goal (except the ellipse algorithm. The ellipse algorithm alone will not work for this goal as a single elliptical curve is not possible given those constraints). The enhanced combined RRT ellipse showed its extraordinary advantage on path planning amongst these 4 compared algorithms as distance approximately drops to zero within 10 iterations whereas RRT is not able to reach the goal even after 10.000 iterations.</p><p>Table <ref type="table">2</ref> depicts the comparison of time elapsed in each algorithm with more details. It can be seen that RRT consumes the least time to conduct one iteration, but as it requires massive iterations the total time consumption is far higher than other methods. Overall, the Enhanced RRT Ellipse cost significantly less time to stably find the path. The 10 s of total time consumption still holds the potential to be further reduced by a deeper code optimization (disabling path-image display, porting to higher execution efficient coding language). As for the low-velocity robots, such timescale is acceptable for runtime planning in stationary environments. For example, the 6-segment CMMWorm-S robot typically spends 18 s to finish a whole-body wave under 3 &#215; 1 wave pattern. In such case the computation time is about 1% of the total time to follow a path that requires 42 waves to reach the goal <ref type="bibr">[3,</ref><ref type="bibr">19]</ref>. In positions where multiple solutions are found after the set number of iterations, the path that requires the fewest number of waves is chosen.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.5.">Algorithm Efficiency Comparison</head><p>As shown in Figure <ref type="figure">8</ref>, both classic RRT and combined RRT Ellipse require a massive number of iterations to eventually approach the goal. For RRT, as seen in Figure <ref type="figure">8a</ref>, even after 10,000 iterations, the robot has not reached the goal position and orientation, so the robot has chosen the configuration which is closest. The tree of combined RRT Ellipse is much closer to the goal compared to the one in classic RRT within the same maximum iterations. This is because, in RRT, just one wave is explored at each iteration; whereas, in combined RRT Ellipse, multiple waves are calculated in each iteration.</p><p>Our research evaluates the total wave needed to follow the path as an indicator of efficiency. This value is proportional to total locomotion time since the wave of earthworm robot (e.g., our CMMWorm-S robot) is normally generated in a certain temporal pattern. In a case where the energy consumption is more critical, some other indicators like the cost of transport can be introduced to replace the total waves in the cost function during pathfinding.</p><p>The advantage of enhanced combined RRT ellipse is that the result is accurate as of the combined RRT Ellipse method, but requires much fewer iterations to find solutions, such that in fact multiple solutions are found and that the planner can pick the best one, shown in Figure <ref type="figure">8c</ref>. The one with fewest waves is selected. As a result, it takes less total time to find a solution, even considering the fact that each iteration takes slightly longer (Table <ref type="table">2</ref>).</p><p>Figure <ref type="figure">9</ref> shows how efficient the enhanced combined RRT ellipse algorithm is. It can be seen that as we increase the number of iterations, the tree is closer to the goal (except the ellipse algorithm. The ellipse algorithm alone will not work for this goal as a single elliptical curve is not possible given those constraints). The enhanced combined RRT ellipse showed its extraordinary advantage on path planning amongst these 4 compared algorithms as distance approximately drops to zero within 10 iterations whereas RRT is not able to reach the goal even after 10.000 iterations.    The error between reached solution and goal decreases with increasing iterations for all four algorithms where the goal is the same as in Figure <ref type="figure">8</ref>. Except for the single Ellipse approach, all the algorithms converge, however, nhanced combined RRT ellipse converges faster (reaching goal within 10 iterations) whereas combined RRT Ellipse requires 10,000 iterations to achieve a closer solution accuracy.</p><p>Table <ref type="table">2</ref>. Comparison of time elapsed for algorithms where the goal is the same as in Figure <ref type="figure">8</ref>. </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Algorithm</head></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.6.">Path Analysis of Reachable Space</head><p>It may seem that paths might scale with elliptical parameters, allowing previous solutions to similar problems to predict new results, however, there is a bifurcation in path strategy that corresponds to cases when the worm robot could reach its goal in fewer waves by moving backward first. In other words, there is a qualitative difference in the path strategy as the goal state varies laterally. In Figure <ref type="figure">10a</ref>,b, the goal is of similar type that is in the third quadrant and the desired angle is zero, but the coordinate is different in both cases. In Figure10a, we can see that path 1 is first turning right backward and then turning right forward and path 2 is forward left and forward right. Out of these two paths, the second path has the least number of waves, so it executed path 2. Now in Figure <ref type="figure">10b</ref>, we get similar traits of paths but in this case, it has chosen the first path as the solution. That's because in the figure while using paths 2 and 3, it has to take a tighter turn while changing the direction, hence the change in angle after each wave during the change in direction is very small thus Figure <ref type="figure">9</ref>. The error between reached solution and goal decreases with increasing iterations for all four algorithms where the goal is the same as in Figure <ref type="figure">8</ref>. Except for the single Ellipse approach, all the algorithms converge, however, enhanced combined RRT ellipse converges faster (reaching goal within 10 iterations) whereas combined RRT Ellipse requires 10,000 iterations to achieve a closer solution accuracy.</p><p>Table <ref type="table">2</ref> depicts the comparison of time elapsed in each algorithm with more details. It can be seen that RRT consumes the least time to conduct one iteration, but as it requires massive iterations the total time consumption is far higher than other methods. Overall, the enhanced combined RRT ellipse cost significantly less time to stably find the path. The 10 s of total time consumption still holds the potential to be further reduced by a deeper code optimization (disabling path-image display, porting to higher execution efficient coding language). As for the low-velocity robots, such timescale is acceptable for runtime planning in stationary environments. For example, the 6-segment CMMWorm-S robot typically spends 18 s to finish a whole-body wave under 3 &#215; 1 wave pattern. In such case the computation time is about 1% of the total time to follow a path that requires 42 waves to reach the goal <ref type="bibr">[3,</ref><ref type="bibr">19]</ref>.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.6.">Path Analysis of Reachable Space</head><p>It may seem that paths might scale with elliptical parameters, allowing previous solutions to similar problems to predict new results, however, there is a bifurcation in path strategy that corresponds to cases when the worm robot could reach its goal in fewer waves by moving backward first. In other words, there is a qualitative difference in the path strategy as the goal state varies laterally. In Figure <ref type="figure">10a</ref>,b, the goal is of similar type that is in the third quadrant and the desired angle is zero, but the coordinate is different in both cases. In Figure <ref type="figure">10a</ref>, we can see that path 1 is first turning right backward and then turning right forward and path 2 is forward left and forward right. Out of these two paths, the second path has the least number of waves, so it executed path 2. Now in Figure <ref type="figure">10b</ref>, we get similar traits of paths but in this case, it has chosen the first path as the solution. That's because in the figure while using paths 2 and 3, it has to take a tighter turn while changing the direction, hence the change in angle after each wave during the change in direction is very small thus increasing the number of waves and taking more time. Figure <ref type="figure">11</ref> shows different paths the robot takes where the x-coordinate is constant, and we have kept changing the y-coordinate.</p><p>Biomimetics 2020, 5, x FOR PEER REVIEW 13 of 16</p><p>In Figure <ref type="figure">12</ref>, 110 coordinates (center of each colored block) are alternately assigned as goal position with the horizontal right as orientation. The initial position of the head center is (70,0). The x-coordinates are with an interval of 35 from the initial position and y-coordinates are with an interval of 30. It can be seen that the robot takes the minimum number of waves to keep on increasing as we go from the bottom right corner to the top left corner. In this plot, we iterated for 10 iterations and stopped if path was found, but continued until a sufficient result was found as needed (for upper right corner where the number of waves is higher).</p><p>This figure shows how accurately this kind of worm robot would need to observe an entry point without having to back up. When the goal is 5 body lengths away, if the entry point is not within 2.5 body lengths (or 9 body widths), the robot will need to reverse to find the goal. Only the first quadrant data is plotted, but this is symmetric for left and right turns, or for vertical turns, defining a conical boundary that can be observed by the sharp increase in the number of waves as y-axis increases.   In Figure <ref type="figure">12</ref>, 110 coordinates (center of each colored block) are alternately assigned as goal position with the horizontal right as orientation. The initial position of the head center is (70,0). The x-coordinates are with an interval of 35 from the initial position and y-coordinates are with an interval of 30. It can be seen that the robot takes the minimum number of waves to keep on increasing as we go from the bottom right corner to the top left corner. In this plot, we iterated for 10 iterations and stopped if path was found, but continued until a sufficient result was found as needed (for upper right corner where the number of waves is higher).</p><p>This figure shows how accurately this kind of worm robot would need to observe an entry point without having to back up. When the goal is 5 body lengths away, if the entry point is not within 2.5 body lengths (or 9 body widths), the robot will need to reverse to find the goal. Only the first quadrant data is plotted, but this is symmetric for left and right turns, or for vertical turns, defining a conical boundary that can be observed by the sharp increase in the number of waves as y-axis increases.   Thus, with enhanced combined RRT ellipse, we can characterize each point in the nearby reachable space around the robot in terms of the number of waves required. In Figure <ref type="figure">12</ref>, we demonstrate the total required waves to reach each goal position with the 0 &#8226; goal front segment angle (horizontal rightwards). This seems most likely to be relevant for the case of a worm robot approaching an entry point such as a hole in the wall that must be entered orthogonally. </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.">Discussion</head><p>We have found a modification of RRT that enables the computation of appropriate plans for a worm-like robot to travel to goals in nearby space without slipping. This is an improvement over RRT alone, which takes a long time to find solutions that are not smooth. The basis of this approach is in following elliptical arcs. These are not sufficient alone because (a) the robot does not always follow the ellipse and (b) in some cases, there is no possible elliptical equation based on the initial and desired configuration. By adding the ellipse to RRT, the tree is closer to the goal than in RRT alone. We see that after 10,000 iterations, the tree reaches the goal. Since the shape of the trapezoids must the bounds shown in Figure <ref type="figure">2</ref>, the range at which the worm-like robot can turn is limited. This is the main reason why the tree requires a large number of iterations to reach the goal. For the specific problem of planning for worm-like robots, we have enhanced the process by following two ellipses in a single iteration, thereby computing the path in fewer iterations, which make it possible to commit path planning in real-time and redo such path-planning after each wave to adjust module inaccuracy and environmental influence.</p><p>The limitations on turning are not unique to our worm robots but could be common among soft robots where turning depends on body deformation. While in many cases the planning may be reactive or may take advantage of environmental features (such as an earthworm robot following the curvature of a tube), it seems desirable that such robots also be able to cross open terrain precisely in order to perhaps enter the next confined space opening. Understanding the planning constraints not only will help such robots efficiently align their bodies for subsequent stages but also can guide and benefit worm-like robot design to improve its maneuverability. Alternatively, this work may also show the value of omnidirectional movement mechanisms even in robots with long narrow form factors. We expect these considerations to be especially valuable in even more cluttered planning problems with obstacles, which will be addressed in future work. In Figure <ref type="figure">12</ref>, 110 coordinates (center of each colored block) are alternately assigned as goal position with the horizontal right as orientation. The initial position of the head center is (70,0). The x-coordinates are with an interval of 35 from the initial position and y-coordinates are with an interval of 30. It can be seen that the robot takes the minimum number of waves to keep on increasing as we go from the bottom right corner to the top left corner. In this plot, we iterated for 10 iterations and stopped if path was found, but continued until a sufficient result was found as needed (for upper right corner where the number of waves is higher).</p><p>This figure shows how accurately this kind of worm robot would need to observe an entry point without having to back up. When the goal is 5 body lengths away, if the entry point is not within 2.5 body lengths (or 9 body widths), the robot will need to reverse to find the goal. Only the first quadrant data is plotted, but this is symmetric for left and right turns, or for vertical turns, defining a conical boundary that can be observed by the sharp increase in the number of waves as y-axis increases.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.">Discussion</head><p>We have found a modification of RRT that enables the computation of appropriate plans for a worm-like robot to travel to goals in nearby space without slipping. This is an improvement over RRT alone, which takes a long time to find solutions that are not smooth. The basis of this approach is in following elliptical arcs. These are not sufficient alone because (a) the robot does not always follow the ellipse and (b) in some cases, there is no possible elliptical equation based on the initial and desired configuration. By adding the ellipse to RRT, the tree is closer to the goal than in RRT alone. We see that after 10,000 iterations, the tree reaches the goal. Since the shape of the trapezoids must be within the bounds shown in Figure <ref type="figure">2</ref>, the range at which the worm-like robot can turn is limited. This is the main reason why the tree requires a large number of iterations to reach the goal. For the specific problem of planning for worm-like robots, we have enhanced the process by following two ellipses in a single iteration, thereby computing the path in fewer iterations, which make it possible to commit path planning in real-time and redo such path-planning after each wave to adjust module inaccuracy and environmental influence.</p><p>The limitations on turning are not unique to our worm robots but could be common among soft robots where turning depends on body deformation. While in many cases the planning may be reactive or may take advantage of environmental features (such as an earthworm robot following the curvature of a tube), it seems desirable that such robots also be able to cross open terrain precisely in order to perhaps enter the next confined space opening. Understanding the planning constraints not only will help such robots efficiently align their bodies for subsequent stages but also can guide and benefit worm-like robot design to improve its maneuverability. Alternatively, this work may also show the value of omnidirectional movement mechanisms even in robots with long narrow form factors. We expect these considerations to be especially valuable in even more cluttered planning problems with obstacles, which will be addressed in future work.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="5.">Conclusions</head><p>Our study aimed to build and apply the challenging path planning for robots that are using soft body locomotion, like the worm robots in (Figure <ref type="figure">1</ref>). Each segment has a limited range of motion (Figure <ref type="figure">2</ref>). This results in nonholonomic constraints, like for a rolling wheel, for each anchoring segment. Furthermore, the turns possible depend on not only the configuration of a single segment but of all the segments on the ground. This makes the robot in a way "hyper-nonholonomic". Our proposed solution is to generate a reliable smooth path (Table <ref type="table">1</ref> and Figure <ref type="figure">3</ref>). The result is a connected tree of reachable configurations (Figure <ref type="figure">4</ref>). If the arcs are too tight, the worm robot will only be able to follow part of the arc (Figure <ref type="figure">5</ref>). As expected, running the algorithm for additional iterations makes the final configuration closer to the goal (Figure <ref type="figure">6</ref>). Sometimes reversing is required (Figure <ref type="figure">7</ref>). Our enhanced combined RRT ellipse method can find multiple smooth paths faster than the original RRT or combined RRT Ellipse (Paths are shown in Figure <ref type="figure">8</ref>, convergence over iterations shown in Figure <ref type="figure">9</ref>, path generating time consumption shown in Table <ref type="table">2</ref>). When two paths are possible, we choose the path with the least waves (Figure <ref type="figure">10</ref>). As the goal position is moved laterally, the best path requires reversing direction first (Figure <ref type="figure">11</ref>). We used our algorithm to determine the minimum number of waves to reach each position in local space from the initial position (Figure <ref type="figure">12</ref>), the diagonal discontinuity between colors indicates the boundary where reversals are required.</p></div></body>
		</text>
</TEI>
