Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/329684570

Simulation of e-puck path planning in webots

Article in International Journal of Applied Engineering Research · January 2016

CITATIONS READS

3 1,773

5 authors, including:

Oscar Gerardo Rubiano Montaña Ricardo Andrés Castillo Estepa


Nueva Granada Military University Nueva Granada Military University
8 PUBLICATIONS 15 CITATIONS 39 PUBLICATIONS 51 CITATIONS

SEE PROFILE SEE PROFILE

Oscar Fernando Aviles Mauricio Mauledoux


Nueva Granada Military University Nueva Granada Military University
184 PUBLICATIONS 423 CITATIONS 111 PUBLICATIONS 184 CITATIONS

SEE PROFILE SEE PROFILE

All content following this page was uploaded by Ricardo Andrés Castillo Estepa on 16 March 2023.

The user has requested enhancement of the downloaded file.


International Journal of Applied Engineering Research ISSN 0973-4562 Volume 11, Number 19 (2016) pp. 9772-9775
© Research India Publications. http://www.ripublication.com

Simulation of e-puck path planning in Webots

Germán A. Vargas, Oscar G. Rubiano, Ricardo A. Castillo, Oscar F. Avilés, Mauricio F. Mauledoux

DAVINCI Research Group, Universidad Militar Nueva Granada, Bogotá, Colombia

Abstract—This paper details simulation of an e-puck robot all necessary components to test the chosen path planning
platform running an A* path planning algorithm using the technique. Section 2 describes implementation of algorithms
Webots development environment. This is done as proof of for path planning and execution, environment monitoring and
concept for use of both the algorithm and the Webots communications. Lastly, sections 3 and 4 delve into simulation
simulation software in development of a modular robotics results and corresponding conclusions.
platform. In AI terms, the e-puck is the only rational agent
within the test environment, which is fully observable,
stochastic, sequential and continuous. Furthermore, the robot’s TEST ENVIRONMENT
initial and goal positions, as well as obstacle positions, can be Since our primary interest is evaluation of the A* path
modified by the software testing engineer at will. Results planning algorithm and the initial modular robot prototype was
indicate that the path planning algorithm requires modifications not ready at time of writing this article, we chose the e-puck
in order to better handle diagonal motions. mobile robot developed by EPFL university in Switzerland and
fully implemented within Webots to test the algorithm. Figure
Index Terms—Path planning, A* heuristic search, E-puck 1 shows a screen capture of the simulated environment in
mobile robot, Webots Webots.

INTRODUCTION
As a key component in autonomous mobile robotics, path
planning has been a topic largely discussed during the past
years [1]. Application-specific variants such as robot con-
straints, optimal behavior, uncertainty and hybrid robots have
led to development of algorithms based on space properties
(grids [2], geometry [3], potential fields [4]), time properties
(intervals [5]) or perception (sampling [6]), among others.

When dealing with planning in two-dimensional environments,


complexity is significantly reduced and space-based algorithms
yield good results. Within the grid-based planning category,
heuristic search algorithms have had widespread use given their
performance speed which makes them optimal candidates for
mobile robots with limited computing power [7] [8] [9].
Among these, A* search is the most widely-known algorithm,
possessing several variants in order to deal with very large
search spaces when necessary.

As part of an ongoing research project in modular robotics, all


of the robot’s subsystems (electronics, hardware, controller, Figure 1. Test environment developed in Webots
etc.) must be simulated before assembly. Furthermore, our
current lack of a physical prototype restrains us to the use of Due to the robot’s relatively small size and speed, we create
robotics development environments, where we must demon- a one square meter work environment and allocate four
strate a proof of concept for the path planning subsystem. From obstacles. Webots implements a “scene tree”, in which each of
the wide array of available commercial solutions, Webots is the previous elements is represented as a node (an instance of a
one of the eligible candidates given its inclusion of complete predetermined class) with a set of properties. In other words, in
models for common research robots such as Bioloid, DARwIn- Webots all elements within the simulation must be represented
OP, Lego Mindstorms, FESTO Robotino and many more [10] based on the Object-Oriented Programming paradigm.Given
[11] [12] [13] [14] [15]. that A* heuristic search is a grid-based algorithm, we overlay a
grid on top of the environment such that each of the generated
This article is divided as follows: the first section details the cells’ area is sufficient to allocate the e-puck robot within, thus
creation of a task environment within Webots containing guaranteeing the planned path will not lead the robot through

9772
International Journal of Applied Engineering Research ISSN 0973-4562 Volume 11, Number 19 (2016) pp. 9772-9775
© Research India Publications. http://www.ripublication.com

spaces where there is insufficient physical clearance for the motion or in-place rotation. The supervisor is in charge of both
robot to pass through. commanding and monitoring the e-puck’s path execution.

ALGORITHM IMPLEM ENTATION


Simulation of machine vision within robot development
environments is typically a complex, time-consuming task, as
noted in [16] [17] [18] [19]. In order to avoid said complexity
without sacrificing full environment observability, Webots
includes a supervisor node which acts as an overseer, capable
of reading any parameter visible within the scene tree, such as
the robot’s position and orientation, among others [20] [21].
Before execution of the path planning algorithm, a two-
dimensional array is defined to encode the previously overlaid
grid assigning arbitrary numerical values depending on what
the cell contains (free space, obstacles, starting and ending
points); this is ilustrated in Figure 2 for the same obstacle
distribution previously shown in Figure 1.

Figure 3. Change of robot orientation after message change

Movement commands are issued wirelessly to the robot by


sending a single char: ’S’ to stop the robot, ’F’ to move
forward, ’A’ to rotate counterclockwise and ’H’ to rotate
clockwise. Figure 3 shows the robot’s change of orientation
once a different char is read. The e-puck’s algorithm uses a
Figure 2. Matrix encoding the environment after grid overlay simple switch-case structure to decode the char value it
receives, setting necessary wheel speeds to achieve the desired
It is important to note that the path (if there is a viable one) motion according to its differential-drive kinematics. Current
generated by A* is ordered from the ending point to the starting pose (read from the “scene tree”) is cross-compared with the
point. Therefore, it is necessary to invert the resulting array so desired checkpoint pose; once the absolute value of the distance
that the path is ordered from start to goal. The search function between both poses lowers below a certain threshold, the
returns the sequence of interspersed X and Y cell coordinates supervisor moves on to the following array element. This
or ’checkpoints’ that the robot must traverse through, which process is repeated until the entire array is traversed, thus
is then split into two arrays, one for each axis. Afterwards, completing the e-puck robot’s path execution.
values for both cell size and number of cells are used to convert
from cell coordinates (dimensionless) to workspace
coordinates (in meters); Webots chooses the workspace’s RESULTS
center as the origin of its coordinates system by default. A key The A* heuristic search algorithm was chosen to obtain the
advantage of A* heuristic search is that the e-puck robot can path, given the ease of implementating its pseudocode
execute the path by linking each subsequent checkpoint (available at [WIKIPEDIA]) using object-oriented program-
alternating between two movements: forward motions (which ming and a low runtime when compared to other typical search
move the robot from one checkpoint to the next) and in-place algorithms (BFS, DFS, unitary cost) by avoiding unnecessary
rotations (which reorient the robot so that it faces the search space exploration.
forthcoming checkpoint), since its kinematics are compliant Under intricate obstacle placement the path may have multiple
with such movements given that the e-puck has a differential- Y values for a single X value; thus there cannot be any possible
drive chassis. function describing Y en terms of X, Y (X ). The chosen
By traversing the path array and comparing each checkpoint solution is to describe the X and Y values in terms of time, thus
with the following one, the algorithm can determine the global generating two trajectory functions X (t) y Y (t).
orientations that the robot must achieve for each in-place
rotation in the sequence. Once the sequence of movements has
been obtained, the algorithm uses a loop to traverse the
movement sequence array, checking a flag to determine
whether the current array element corresponds to a forward Figure 4. Planned path in cell coordinates (dimensionless)

9773
International Journal of Applied Engineering Research ISSN 0973-4562 Volume 11, Number 19 (2016) pp. 9772-9775
© Research India Publications. http://www.ripublication.com

Excluding the initial and goal points, there are a total of 16


intermediate path points; several of them can be avoided if the
algorithm could properly detect the underlying diagonal
Figure 5. Fraction of the planned path in workspace (simultaneous X and Y) motion. In other words, when the path
coordinates (meters) repetitively alternates between horizontal and vertical
movements (“zig-zags”), A* path planning is insufficient to
achieve maximum possible optimization in this case, namely,
deducing a diagonal line that follows the same heading.
Figure 6. Sequence of global orientations for robot alignment
during execution of the path fraction
CONCLUSIONS
TABLE I. list of Path checkpoints with corresponding Webots has a predefined structure for the ’Robot’ class, from
coordinates which implemented robots such as the simulated e-puck inherit
their properties and methods. In consequence, none of these
robots can be morphed into the ’Supervisor’ class and are thus
unable to access the “scene tree”. Said limitation must be taken
into consideration when the robot requires access to property
values in the “scene tree”. In such case, adding a supervisor to
read and broadcast these values to the robot will become
mandatory.
Despite the illusion of continuous movement provided by
powerful computer hardware, all elements within Webots are
simulated in discrete time steps. Therefore, common sensor
algorithm tasks such as conditional expressions should thor-
oughly avoid checking for specific values or very small value
ranges, since in the transition between subsequent discrete time
steps said value or range might be left out.
Although each robot and/or supervisor controller is executed as
Figure 4 presents a sample planned path output in cell coor- a separate Windows process in order to take advantage of
dinates (dimensionless) for the obstacle distribution previously multi-threaded processors, precautions must be taken when
shown in Figures 1 and 2. Figure 5 shows a fraction of the path simulating multiple algorithms simultaneously within Webots,
which has been converted to workspace coordinates (in meters) since unbounded loops can bring the simulation to a complete
and Figure 6 indicates the series of global orientations (in halt by preventing execution of the time step function.Path
radians) that the e-puck robot must obtain through in- place planning using the A* search algorithm on a grid-overlaid
rotations as it reaches each subsequent checkpoint in said representation of a continuous environment cannot guarantee
fraction. It is important to note that display preferences for the optimal results when the path repetitively alternates movement
Webots output console cannot be modified, and numbers are heading changes. It is thus necessary to identify and optimize
represented with 17-digit floating-point precision. Therefore, individual path sections in a posterior step.
these results are presented in Tables 1 and 2 in a more
streamlined manner.

TABLE II. List of orientation changes according to sequential ACKNOWLEDGMENT


checkpoint pairs This paper is a result of the ING-1755 research project, titled
“Development of a collaborative operation strategy for
heterogeneous multi-agent robotic systems”, funded by
Universidad Militar Nueva Granada.

REFERENCES

[1] Y. K. Hwang and N. Ahuja, “Gross motion planning - a


survey,” ACM Computing Surveys (CSUR), vol. 24, no.
3, pp. 219–291, 1992.
[2] A. Elfes, “Using occupancy grids for mobile robot
perception and navigation,” Computer, vol. 22, no. 6, pp.
46–57, 1989.
[3] P. Bhattacharya and M. L. Gavrilova, “Roadmap-based
path planning- using the voronoi diagram for a
clearance-based shortest path,” Robotics & Automation
Magazine, IEEE, vol. 15, no. 2, pp. 58–66, 2008.

9774
International Journal of Applied Engineering Research ISSN 0973-4562 Volume 11, Number 19 (2016) pp. 9772-9775
© Research India Publications. http://www.ripublication.com

[4] J. Barraquand, B. Langlois, and J.-C. Latombe, [17] A. Das, R. Fierro, V. Kumar, J. Ostrowski, J. Spletzer,
“Numerical potential field techniques for robot path and C. Taylor, “A vision-based formation control
planning,” Systems, Man and Cybernetics, IEEE framework,” Robotics and Automation, IEEE
Transactions on, vol. 22, no. 2, pp. 224–241, 1992. Transactions on, vol. 18, no. 5, pp. 813–825, Oct 2002.
[5] J. Frank and A. Jo´ nsson, “Constraint-based attribute [18] D. Cli, P. Husbands, and I. Harvey, “Evolving visually
and interval plan- ning,” Constraints, vol. 8, no. 4, pp. guided robots,” in Meyer, JA., HL Roitblatt, and SW
339–364, 2003. Wilson (1993) From Animals to Animats2.
[6] A. Bhatia, L. E. Kavraki, and M. Y. Vardi, “Sampling- Proceedings of the Second International Conference on
based motion planning with temporal goals,” in Simulation of Adaptive Behavior. MIT Press/Bradford
Robotics and Automation (ICRA), 2010, IEEE Books, Cambridge Ma. Citeseer, 1993, pp. 374–383.
International Conference on. IEEE, 2010, pp. 2689– [19] M. Asada, E. Uchibe, and K. Hosoda, “Cooperative
2696. behavior acquisition for mobile robots in dynamically
[7] D. Zhu and J.-C. Latombe, “New heuristic algorithms changing real worlds via vision-based reinforcement
for efficient hi- erarchical path planning,” Robotics and learning and development,” Artificial Intelligence, vol.
Automation, IEEE Transactions on, vol. 7, no. 1, pp. 9– 110, no. 2, pp. 275 – 292, 1999. [Online]. Available:
20, 1991. http://www.sciencedirect.com/science/
[8] D. Ferguson, M. Likhachev, and A. Stentz, “A guide article/pii/S0004370299000260
to heuristic- based path planning,” in Proceedings of [20] O. Michel, “Webots: Symbiosis between virtual and real
the international workshop on planning under mobile robots,” in Virtual Worlds, ser. Lecture Notes in
uncertainty for autonomous systems, international Computer Science, J.-C. Heudin, Ed. Springer Berlin
conference on automated planning and scheduling Heidelberg, 1998, vol. 1434, pp. 254–263.
(ICAPS), 2005, pp. 9–18. [21] L. Hohl, R. Tellez, O. Michel, and A. J. Ijspeert, “Aibo
[9] J. Bruce and M. Veloso, “Real-time randomized path and webots: Simulation, wireless remote control and
planning for robot navigation,” in Intelligent Robots and controller transfer,” Robotics and Autonomous Systems,
Systems, 2002. IEEE/RSJ International Conference on, vol. 54, no. 6, pp. 472–485, 2006.
vol. 3. IEEE, 2002, pp. 2383–2388.
[10] L. Wang, K. Tan, and V. Prahlad, “Developing khepera
robot applications in a webots environment,” in
Micromechatronics and Human Science, 2000. MHS
2000. Proceedings of 2000 International Symposium
on. IEEE, 2000, pp. 71–76.
[11] R. Szabo´ , “Navigation of simulated mobile robots in
the webots envi- ronment,” Periodica Polytechnica,
Electrical Engineering, vol. 47, no. 1, pp. 149–163,
2003.
[12] K. Pandey, P. Mohanty, and D. Parhi, “Real time
navigation strategies for webots using fuzzy controller,”
in Intelligent Systems and Control (ISCO), 2014 IEEE
8th International Conference on, Jan 2014, pp. 10–16.
[13] B. Magyar, Z. Forhecz, and P. Korondi, “Developing an
efficient mobile robot control algorithm in the webots
simulation environment,” in Industrial Technology,
2003 IEEE International Conference on, vol. 1, Dec
2003, pp. 179–184 Vol.1.
[14] J. Go, B. Browning, and M. Veloso, “Accurate and
flexible simulation for dynamic, vision-centric robots,”
in Proceedings of the Third International Joint
Conference on Autonomous Agents and Multiagent
Systems - Volume 3, ser. AAMAS ’04. Washington,
DC, USA: IEEE Computer Society, 2004, pp. 1388–
1389. [Online]. Available:
http://dx.doi.org/10.1109/AAMAS.2004.38
[15] S. Carpin, M. Lewis, J. Wang, S. Balakirsky, and C.
Scrapper, “Us- arsim: a robot simulator for research and
education,” in Robotics and Automation, 2007 IEEE
International Conference on. IEEE, 2007, pp. 1400–
1405.
[16] C.-C. Wang, “Extrinsic calibration of a vision sensor
mounted on a robot,” Robotics and Automation, IEEE
Transactions on, vol. 8, no. 2, pp. 161–175, Apr 1992.

9775

View publication stats

You might also like