Final Report
Final Report
University of Sfax
National Engineering School of Sfax Graduation Project
(ENIS) Serial N°: 2025 / DIMA-061
by
Ameur GARGOURI
Your unwavering support and encouragement have been my driving force throughout
this journey. Your belief in me has been the corner stone of my success.
Your constant encouragement to pursue my studies and strive for greater achievements
has been deeply appreciated.
My Friends
Thank you for your companionship and motivation. Your presence has made this
journey both enjoyable and meaningful.
To my mentors, the ESME Research Lab Autonomous Robot Project Interns, and the
ESME Research Lab Team, thank you for your guidance and support during my intern-
ship. Your insights and encouragement have been instrumental in shaping my perspective
and enriching my learning experience.
i
Acknowledgments
I am also very grateful to my academic supervisor, Mr. Bechir Zalila, for his ongoing
support, encouragement, and thoughtful feedback during every stage of this project. His
advice and direction have been essential to my progress.
A very special thanks to the entire ESME Research Lab team for their dedication,
enthusiasm, and collaboration. It has been a pleasure to work with such a motivated and
supportive community of people and has enriched this project’s progress immensely.
I also extend my heartfull thanks to the members of the jury. To Mr. Riadh Ben
Halima, President of the Jury, and Mrs. Afef Mdhaffar, Reviewer. Thank you for your
time, your consideration and the honor of having my work read by you. Your participation
in this process means a lot to me.
Finally, I also wish to express my gratitude to all the teachers at the National En-
gineering School of Sfax for their dedication and the knowledge they’ve instilled in me
throughout my studies. They have been a constant inspiration throughout my academic
journey.
ii
Acronyms
A* A-Star
iii
Acronyms
ImageNet ImageNet
AI Artificial Intelligence
ML Machine Learning
NAV2 Navigation 2
PID Proportional-Integral-Derivative
tf transform
iv
Acronyms
v
Contents
General Introduction 1
1 General Presentation 2
1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
vi
CONTENTS CONTENTS
1.6 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2 Robotics History 13
2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
vii
CONTENTS CONTENTS
2.6 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
3.5 Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
viii
CONTENTS CONTENTS
3.7.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
ix
CONTENTS CONTENTS
3.8.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
3.8.5 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
3.10 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
4.4 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
x
CONTENTS CONTENTS
General Conclusion 83
xi
List of Figures
1.2 Special School of Mechanics and Electricity (ESME) Research Lab logo[2] . 4
xii
LIST OF FIGURES LIST OF FIGURES
2.8 MiR100 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
2.20 Diagram of a PID control system with fuzzy logic enhancements [36]. . . . 31
xiii
LIST OF FIGURES LIST OF FIGURES
xiv
List of Tables
xv
General Introduction
A key challenge is transitioning from simulation to reality, where sensor noise and
environmental dynamics require careful calibration and algorithm adaptation. The robot’s
vision-guided search algorithm generates waypoints for efficient exploration, refining paths
dynamically to locate targets in cluttered spaces. A Flutter app provides a user-friendly
interface for control and supervision.
The first chapter offers a general presentation, detailing the project’s context, objec-
tives, and management using Agile and Scrum methodologies at ESME Research Lab.
The second chapter reviews the history and technologies of autonomous robotics, cov-
ering milestones, Robot Operating System (ROS) evolution, and key areas like sensors,
localization, navigation, and communication.
The third chapter explores software development, covering concept design, URDF
modeling, simulation, NAV2 navigation, search algorithm, You Only Look Once (YOLO)
integration, and the Flutter app.
1
1 General Presentation
1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2 Academic Context . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.3 Host Organism Presentation . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.3.1 ESME Research Lab Activities . . . . . . . . . . . . . . . . . . . . . . . . 5
1.3.2 ESME Research Lab Location . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.4 Project Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.4.1 Project Context . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.4.2 Project Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.4.3 Proposed Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.5 Project Management Approach and Methodology . . . . . . . . . . . . 9
1.5.1 Agile Methodology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.5.2 Scrum Framework . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.6 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2
Introduction Chapter 1
1.1 Introduction
This chapter examines the environmental factors and organizational context relevant
to our project. We begin by introducing the ESME Research Lab, a Paris-based hub
renowned for its dedication to technological innovation and interdisciplinary research.
This supportive environment, with its advanced infrastructure and expertise, has been
instrumental in the project’s success.
Next, we outline the academic context, highlighting the project as the capstone of
our computer engineering education at ENIS. It bridges theoretical learning with practi-
cal application, addressing real-world challenges while meeting degree requirements and
enhancing our technical and problem-solving skills.
The project overview details its goals, technical challenges, and expected outcomes, ad-
dressing broader issues, innovative approaches, and objectives. It also considers practical
constraints like hardware limitations, environmental variability, and system integration
complexities.
Finally, we discuss our project management strategy, employing Agile and Scrum
methodologies for a flexible, iterative process. This approach facilitated continuous feed-
back, efficient task allocation, progress evaluation, and adaptability to technical challenges
throughout the project lifecycle.
This project marks the culmination of my three years of engineering studies at the
National Engineering School of Sfax (ENIS). Throughout these years, we have acquired a
solid foundation in various domains, including embedded systems and computer engineer-
ing, which has been instrumental in shaping my understanding of autonomous systems.
This final-year project not only synthesizes the theoretical concepts gained during my
academic journey but also extends my technical capabilities through their application to
a real-world problem. It is worth mentioning that this graduation internship was car-
ried out at the ESME Research Lab in Paris, France, from February 1 to May 30, 2025.
This experience provided an excellent opportunity for me as a student to explore the
professional world, collaborate with new people, and acquire advanced techniques to fur-
ther develop my skills. The chance to work on a concrete and innovative project under
the guidance of research professionals significantly enriched my learning experience and
offered valuable insight into my future career path.
3
Host Organism Presentation Chapter 1
ESME Research Lab, affiliated with ESME Sudria, is a multidisciplinary research lab-
oratory based in Paris, France. The lab is dedicated to fostering innovation and advancing
applied research in areas such as robotics, embedded systems, artificial intelligence, and
the Internet of Things (IoT). Through its collaborative approach, the lab brings together
students, faculty, and industry partners to work on cutting-edge projects that address
real-world challenges. Its mission is to bridge the gap between academic research and
industrial application, empowering students to gain hands-on experience with emerging
technologies.
With a strong emphasis on innovation and practical implementation, the ESME Re-
search Lab plays a key role in the academic ecosystem of ESME Sudria. It provides
a dynamic environment where over a hundred projects are conducted annually, ranging
from autonomous systems and smart mobility to energy optimization and cybersecurity.
The lab also supports entrepreneurship through initiatives that encourage students and re-
searchers to transform their ideas into viable solutions. This vibrant and forward-thinking
environment makes the ESME Research Lab a cornerstone of technological advancement
and a vital contributor to the future of engineering education and research.
4
Project Overview Chapter 1
• Applied Research and Innovation: The ESME Research Lab actively engages
in applied research projects in fields such as robotics, embedded systems, Artificial
Intelligence (AI), the IoT, and cybersecurity. By fostering collaboration between
students, faculty, and industry professionals, the lab delivers tangible solutions to
contemporary technological challenges. Research projects often address societal and
industrial needs, offering students hands-on experience in innovation, system pro-
totyping, algorithm development, and experimental validation. This applied focus
prepares participants to navigate the complexities of modern engineering problems
with creativity and rigor.
The ESME Research Lab is located at the Paris campus of ESME Sudria, one of
France’s leading engineering schools. Situated in the heart of Paris, the lab benefits from
a vibrant academic environment and close proximity to numerous research institutions,
technology companies, and innovation hubs. This strategic location enables strong col-
laborations with both academic and industrial partners, enhancing the lab’s ability to
work on interdisciplinary projects that respond to current technological and societal chal-
lenges. The Paris campus also hosts state-of-the-art facilities, including robotics labs,
prototyping workshops, and digital platforms, providing students and researchers with
the infrastructure needed to carry out high-impact engineering work.
This section provides a detailed outline of our end-of-study project at the ESME Re-
search Lab. The project centers on the development of an advanced autonomous robot
5
Project Overview Chapter 1
prototype designed to locate and identify misplaced household objects. The section is
structured into five main parts: project context, problem statement, proposed solution,
objectives and requirements, and project constraints. By addressing each of these ele-
ments, we aim to clearly articulate the project’s goals, the technical challenges encoun-
tered, and the expected outcomes. This overview sets the stage for a deeper understanding
of the innovative approaches and technologies employed in the creation of a state-of-the-
art autonomous robotic system.
Our end-of-study project at the ESME Research Lab focuses on developing a fully
autonomous mobile robot capable of searching for misplaced objects, such as bottles, pails,
or everyday household items, within a home setting. Its autonomy is achieved through
the integration of several advanced technologies. We employ the ROS2 framework to
orchestrate system components and state-of-the-art computer vision algorithms, including
object detection using YOLO, to identify and locate target items. Additionally, onboard
sensors such as LIDAR, IMU and wheel encoders are used for obstacle avoidance and
accurate navigation.
This project showcases the feasibility and effectiveness of combining these technologies
into a single, self-sufficient robotic platform. The resulting prototype serves as a proof of
concept, demonstrating how autonomous systems can be designed to perform purposeful
tasks in real-world domestic environments. It also reflects our capability to innovate and
apply engineering knowledge in building intelligent robotic solutions.
6
Project Overview Chapter 1
Figure 1.3 illustrates the general architecture of our autonomous robot system that
integrates multiple technologies for seamless operation.
The architecture consists of a Mobile App with a User Interface that handles Task
Management, sending tasks to a Computer via WebSocket Server. The Computer’s Web-
Socket Server facilitates real-time communication, relaying tasks to the Control Logic,
which issues Commands to an Autonomous Robot. The Autonomous Robot provides
Status Updates back to the WebSocket Server, which are then transmitted to the Mobile
App for user monitoring and interaction.
• Mobile App: the mobile application includes a User Interface and Task Man-
agement, allowing users to send tasks to the Computer via WebSocket Server for
real-time interaction.
• Computer: this system hosts a WebSocket Server that receives tasks from the
Mobile App and forwards them to the Control Logic, while also relaying Status
Updates from the Autonomous Robot.
• Control Logic: tocated within the Computer, it processes tasks from the Web-
Socket Server and sends Commands to the Autonomous Robot to execute the as-
signed tasks.
• Autonomous Robot: this component receives Commands from the Control Logic
and sends Status Updates back to the WebSocket Server, enabling continuous mon-
itoring and control.
7
Project Overview Chapter 1
Designing a fully autonomous mobile robot capable of performing domestic tasks, such
as searching for misplaced items within a household environment, involves overcoming sev-
eral complex engineering challenges. This project focuses on developing such a robot with
a high degree of autonomy, capable of navigating and operating independently without
any external intervention or inter-robot communication.
One of the primary technical challenges addressed in this project is achieving accurate
and robust localization in indoor environments. Since traditional solutions like Global
Positioning System (GPS) are not applicable indoors, the robot relies on a sensor fusion
approach that combines data from wheel encoders, Inertial Measurement Units (IMUs),
and a 2D LiDAR. This fusion of proprioceptive and exteroceptive sensor data enables
precise real-time estimation of the robot’s pose (position and orientation), which is critical
for effective navigation and autonomous operation.
Autonomous navigation is another essential aspect of the system. The robot must
be capable of building and updating a map of its environment, planning paths, avoid-
ing obstacles, and systematically exploring areas to search for objects. These tasks are
computationally demanding and are therefore managed by a distributed processing archi-
tecture. Specifically, high-level navigation algorithms including Simultaneous Localization
and Mapping (SLAM), path planning, and global map handling, are executed on an ex-
ternal host PC running ROS2. Meanwhile, the onboard Raspberry Pi is responsible for
low-level motor control, sensor data acquisition, and command execution. This division
of labor optimizes system performance and ensures responsiveness during exploration and
search routines.
Precise motion control is critical for maintaining stability and accuracy during nav-
igation. To achieve this, the robot implements a closed-loop control strategy using an
adaptive fuzzy logic PID controller. This enhanced control method dynamically tunes
the PID gains in real time based on system behavior, improving response performance
and reducing steady-state errors under varying load conditions or surface properties. The
result is smoother, more accurate movements, which are essential for reliable localization
and object search.
By addressing these challenges, the project demonstrates the feasibility of a fully au-
tonomous indoor robot that combines advanced sensor fusion, adaptive motion control,
reliable navigation, and efficient power management into a cohesive and functional pro-
totype.
8
Project Management Approach and Methodology Chapter 1
To address the challenges outlined in the problem statement, our proposed solution
involves the development of an advanced autonomous robot prototype that integrates
multiple modern technologies. This integration ensures that the robot can navigate au-
tonomously, communicate effectively, and operate continuously without human interven-
tion.
The diagram illustrates the architecture of the autonomous robot, detailing the main
unit, power unit, and radio unit, along with their interconnections.
9
Project Management Approach and Methodology Chapter 1
The Agile methodology is adopted for its adaptability and capacity to accommodate
shifting requirements. It prioritizes collaboration, quick responsiveness, and iterative
progress (as depicted in Figure 1.5). The fundamental Agile principles guiding this project
include:
These principles, paired with a commitment to regular feedback and incremental ad-
vancements, help maintain project momentum while flexibly addressing new challenges
or adjustments.
The Scrum framework, a widely recognized component of Agile, is chosen for its
straightforwardness and effectiveness in handling intricate projects. Key components of
the Scrum framework are illustrated in Figure 1.6.
10
Project Management Approach and Methodology Chapter 1
In developing the autonomous indoor mobile robot, the Scrum framework is imple-
mented with the following customizations:
By leveraging Agile and Scrum, the development of the autonomous indoor mobile robot
is designed to be iterative, responsive to changes, and focused on delivering incremental
value. This approach promotes transparency, self-improvement, and adaptability, which
are crucial for the successful execution of a solo, complex project.
11
Conclusion Chapter 1
1.6 Conclusion
In this chapter, we have established a foundation for understanding the key environ-
mental factors relevant to our project. We began by introducing the host organization,
ESME Research Lab, detailing its background, research focus, and facilities. This pro-
vided a clear picture of the lab’s capabilities and the resources available to support our
project. We then outlined the academic context, underscoring the importance of this
project as a pivotal part of our engineering studies at ENIS.
Additionally, we explored the larger scope of our project, focusing on the integration
of advanced technologies to develop an autonomous indoor mobile robot. By examining
the project’s context, we emphasized its significance and potential impact in domestic
applications, such as locating misplaced items with precision.
The project overview section offered a detailed narrative of our project’s objectives,
challenges, and anticipated outcomes. We analyzed the project statement, proposed solu-
tions, objectives, requirements, and constraints. This thorough overview laid the ground-
work for understanding the technical complexities and innovative strategies we are imple-
menting, including the use of ROS2, YOLO-based object detection, and adaptive control
systems.
In the next chapter, we will investigate the state of the art in autonomous robotics,
focusing on existing technologies and research that have influenced sensor integration,
object detection, and navigation algorithms. This exploration will provide the foundation
for the technical solutions and innovations we aim to implement in our project.
12
2 Robotics History
2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.2 Autonomous Robotics History . . . . . . . . . . . . . . . . . . . . . . . . 14
2.2.1 Al-Jazari’s Hand-Washing Automaton (1206) . . . . . . . . . . . . . . . . 14
2.2.2 Leonardo da Vinci’s Mechanical Knight (1495) . . . . . . . . . . . . . . . 15
2.2.3 Jacques de Vaucanson’s Digesting Duck (1738) . . . . . . . . . . . . . . . 16
2.2.4 Charles Babbage’s Analytical Engine (1837) . . . . . . . . . . . . . . . . . 16
2.2.5 Walter’s "Tortoise" Robots (1949) . . . . . . . . . . . . . . . . . . . . . . 17
2.2.6 Shakey the Robot (1966–1972) . . . . . . . . . . . . . . . . . . . . . . . . 18
2.2.7 Clearpath Husky UGV (2013) . . . . . . . . . . . . . . . . . . . . . . . . . 18
2.2.8 MiR100 Autonomous Mobile Robot (2016) . . . . . . . . . . . . . . . . . . 19
2.2.9 Boston Dynamics’ Advanced Robotics (2016) . . . . . . . . . . . . . . . . 19
2.3 Robot Operating System (ROS) . . . . . . . . . . . . . . . . . . . . . . 20
2.3.1 Introduction and System Structure . . . . . . . . . . . . . . . . . . . . . . 20
2.3.2 Key Development Tools in ROS . . . . . . . . . . . . . . . . . . . . . . . . 21
2.3.3 Advantages of ROS for Autonomous Robotics . . . . . . . . . . . . . . . . 23
2.3.4 ROS vs. ROS2 vs. Alternative Methods . . . . . . . . . . . . . . . . . . . 24
2.4 Technologies in Autonomous Robots . . . . . . . . . . . . . . . . . . . . 26
2.4.1 Sensors and Perception Systems . . . . . . . . . . . . . . . . . . . . . . . . 26
2.4.2 Localization and Mapping Techniques . . . . . . . . . . . . . . . . . . . . 28
2.4.3 Navigation and Path Planning . . . . . . . . . . . . . . . . . . . . . . . . 29
2.4.4 Motion Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
2.5 Communication Tools and Protocols in Embedded Systems . . . . . . 33
2.6 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
13
Introduction Chapter 2
2.1 Introduction
Autonomous robotics has seen remarkable progress over recent decades, driven by
advancements in technology, computing, and AI. This chapter provides an in-depth ex-
ploration of the current state-of-the-art, highlighting key technologies, methodologies, and
influential projects that shape the field. It examines the core components—sensors, actu-
ators, and algorithms—that enable robots to perceive, navigate, and interact with their
environments, while also addressing challenges, constraints, and future trends.
The chapter begins with a historical overview of autonomous robotics, tracing its
evolution from early innovations to modern applications. It then delves into foundational
technologies, including sensors and perception, localization and mapping, navigation and
path planning, communication protocols, and motion control, with a focus on the pivotal
role of ROS in system development and integration.
14
Autonomous Robotics History Chapter 2
and sequential control, inspiring later mechanical clocks and automata in European work-
shops and presaging modern robotics’ emphasis on integrating sensing and timed actua-
tion.
Around 1495, Leonardo da Vinci designed a humanoid automaton known as the "Me-
chanical Knight" in Italy. This early robot could sit, wave its arms, and move its head
and jaw through a sophisticated system of pulleys and gears. While it remains uncertain
whether da Vinci constructed a fully functional model, modern reconstructions based on
his sketches have validated its design and demonstrated its operational potential [7, 8].
The Mechanical Knight represents one of the earliest conceptual designs for a hu-
manoid automaton, illustrating the integration of mechanical engineering and artistic
vision, and laying a foundation for later developments in robotics and automation.
15
Autonomous Robotics History Chapter 2
In 1738, French inventor Jacques de Vaucanson created the "Digesting Duck," a lifelike
automaton that could flap its wings, eat grain, and excrete waste, simulating the process
of digestion. This mechanical duck showcased remarkable realism and complexity, using
a system of internal mechanisms to mimic biological processes [9].
16
Autonomous Robotics History Chapter 2
Although never fully constructed, the Analytical Engine introduced principles of pro-
grammability and data processing that would later influence the development of modern
computing systems, indirectly impacting robotics through advancements in control and
computation.
In 1949, neurophysiologist W. Grey Walter built Elmer and Elsie, simple three-wheeled
robots powered by analog circuits modeling two-neuron networks. Equipped with light
and touch sensors, they exhibited phototaxis and obstacle avoidance behaviors, wandering
and interacting with their environment without human intervention [11, 12].
Figure 2.5: Grey Walter’s Elmer and Elsie "tortoise" robots (1949).
Walter’s tortoises demonstrated that simple reactive circuits could yield emergent au-
tonomous behavior, laying the groundwork for behavior-based robotics and subsumption
architectures still used in mobile robot design.
17
Autonomous Robotics History Chapter 2
From 1966 to 1972, SRI International’s Shakey was the first mobile robot integrating
perception, reasoning, and action. With onboard cameras, range finders, and the STRIPS
planning system, Shakey could analyze its environment, formulate plans, and execute
tasks such as stacking boxes [13, 14].
Since its introduction in 2013, the Clearpath Husky Unmanned Ground Vehicle (UGV)
has served as a versatile field robotics platform. Deployed in agriculture, environmental
monitoring, and research, it demonstrated how robust hardware and software ecosystems
could bring autonomy to real-world outdoor tasks [15].
18
Autonomous Robotics History Chapter 2
Husky bridged laboratory research and industrial applications, showing that scalable,
rugged robotic platforms could operate autonomously outside controlled settings.
Launched in 2016 by Mobile Industrial Robots, the MiR100 marked a significant mile-
stone in industrial automation by introducing the concept of autonomous mobile robots
(Autonomous Mobile Robot (AMR)) in warehouse environments. With a payload capac-
ity of up to 100 kg, it could navigate autonomously without relying on any additional
infrastructure [16, 17].
As the first dependable and commercially viable AMR platform, the MiR100 played
a pivotal role in shaping the evolution of flexible robotic fleets in logistics. It laid the
groundwork for the modern development of AGV and AMR systems used today.
Since its founding in 1992, Boston Dynamics has become a leader in advanced robotics,
with significant contributions starting around 2016 with the introduction of robots like
Spot and Atlas. Spot, a quadruped robot launched in 2016, can navigate uneven terrain,
climb stairs, and perform inspection tasks in industrial settings, while Atlas, a bipedal hu-
manoid, demonstrates dynamic capabilities like running, jumping, and performing back-
flips, thanks to advanced control algorithms and hydraulic actuation [18, 19]. These robots
integrate perception, navigation, and manipulation, showcasing the potential for highly
mobile and adaptable robotic systems.
Boston Dynamics’ innovations have pushed the boundaries of robotic mobility and
human-robot interaction, influencing applications in search and rescue, construction, and
entertainment, and setting new standards for autonomous robotic performance in un-
structured environments.
19
Robot Operating System (ROS) Chapter 2
The Robot Operating System (ROS) serves as a foundational framework for robotics
development, enabling modular and scalable solutions critical to autonomous systems.
At its core, ROS organizes functionality into distributed processes called nodes, which
communicate through a graph-based structure. Nodes exchange information via named
topics for continuous data streams, services for synchronous communication, and actions
for long-duration tasks [21]. These elements are grouped into packages that can be reused
and shared across different projects.
Figure 2.10 illustrates a basic example where two nodes, talker and listener, in-
teract through a topic named chatter. In this setup, one node publishes messages that
the other subscribes to, demonstrating the modular and asynchronous nature of ROS
communication.
20
Robot Operating System (ROS) Chapter 2
The ROS ecosystem includes several essential tools that facilitate simulation, visual-
ization, and system management during development:
• RViz: This tool enables real-time 3D visualization of data from sensors and robot
states, providing developers with a comprehensive view for debugging and monitor-
ing [20].
21
Robot Operating System (ROS) Chapter 2
• Gazebo: This high-fidelity simulation tool works in tandem with ROS to test and
refine robotic algorithms in a virtual environment, replicating real-world physics
and sensor data [20].
22
Robot Operating System (ROS) Chapter 2
• tf2: This utility handles coordinate frame transformations over time, which is vital
for spatial awareness in robotic operations such as navigation or manipulation [20,
22].
These tools collectively enable thorough testing and debugging, significantly improv-
ing development efficiency and system reliability by reducing dependency on physical
hardware early in the development lifecycle.
• Advanced Simulation Capabilities: Tools like Gazebo and RViz allow for high-
fidelity simulation and real-time visualization, ensuring algorithms are well-tested
before real-world deployment [20].
23
Robot Operating System (ROS) Chapter 2
Our project employs ROS2, which stands out as a leading framework among various
options for autonomous robotics, offering significant enhancements over its predecessor,
ROS, as well as simpler alternatives commonly used in the field. Below, we compare ROS,
ROS2, and other notable methods to highlight why ROS2 is the optimal choice for our
system, particularly for the complex task of searching for lost items.
• Lifecycle Management and QoS: ROS2 includes lifecycle states and Quality of
Service (QoS) policies, enabling robust and configurable system behavior, which is
vital for our robot’s reliability. ROS lacks these features, and alternative approaches
like ad-hoc scripting or proprietary embedded systems offer no comparable lifecycle
or QoS support, reinforcing ROS2’s advantage [22].
24
Robot Operating System (ROS) Chapter 2
Thanks to these superior features, ROS2 has empowered our system to achieve ex-
ceptional performance and robustness, perfectly aligning with the intricate demands of
modern autonomous robotic applications like ours. Its advanced capabilities outshine
both ROS and simpler alternatives, making it the best choice for integrating the robot’s
diverse hardware and software components effectively.
25
Technologies in Autonomous Robots Chapter 2
This section provides an overview of the core technologies driving the development of
autonomous robots, with a focus on their application in the context of our indoor mobile
robot project. We will examine key components such as sensor integration, navigation
systems, and object detection, highlighting how these technologies enable the robot to
operate independently and efficiently in dynamic environments.
Autonomous robots designed to search for lost household items depend on a range of
sensors to understand their indoor surroundings. These sensors gather the information
needed for the robot to navigate, avoid obstacles, and locate items like phones or keys.
Key types of sensors in this project include LiDAR, cameras, encoders, and potential
future additions like IMUs and ultrasonic sensors.
Types of Sensors:
• LiDAR (Light Detection and Ranging): The robot uses a YDLIDAR TSA, a
LiDAR sensor that measures distances by sending out laser pulses and timing their
return after bouncing off objects. This time-of-flight method helps create accurate
maps of the environment, which can be two-dimensional (2D) or three-dimensional
(3D) depending on the LiDAR model. The YDLIDAR TSA is particularly helpful
for mapping indoor spaces, detecting obstacles, and aiding navigation with its precise
and detailed measurements. While some LiDAR systems focus on 2D maps, which
are often enough for basic navigation and obstacle avoidance, others can produce
3D maps for more complex tasks.
• Cameras: Cameras capture visual information, which is processed using the YOLO11n
model to identify and classify objects, recognize patterns, and understand indoor
26
Technologies in Autonomous Robots Chapter 2
settings. For this project, a Logitech StreamCam captures images at 640x480 reso-
lution (with plans to adjust to 128x128 for better performance). These visuals are
essential for detecting lost items like phones or remotes and supporting navigation,
often working alongside other sensors to provide a fuller picture.
• Encoders: Encoders track the position, speed, and direction of the robot’s wheels,
offering important data for motion control to ensure accurate movement and posi-
tioning. They come in two types: incremental encoders, which produce signals with
each wheel turn for relative positioning that needs a starting point, and absolute
encoders, which give a unique signal for each position, ensuring precise tracking
without a reference. Absolute encoders are especially useful for the robot’s need to
move reliably while searching for items.
• Ultrasonic Sensors: Ultrasonic sensors detect objects by sending out sound waves
and measuring the time it takes for the echoes to return, thus calculating distances.
These sensors are considered for simple obstacle detection and avoidance due to their
affordability and ease of use, potentially improving the robot’s ability to navigate
safely through cluttered indoor spaces.
27
Technologies in Autonomous Robots Chapter 2
– Data Type: LiDAR offers mapping data, cameras provide visual clues for item
detection, encoders track movement, ultrasonic sensors measure distances, and
IMUs monitor orientation.
– Environmental Sensitivity: LiDAR and cameras may struggle with poor
lighting or obstructions, ultrasonic sensors can be affected by soft surfaces,
IMUs might drift over time, while encoders remain consistent with wheel data.
– Resolution and Range: LiDAR and cameras provide detailed spatial data,
ultrasonic sensors offer short-range detection, IMUs focus on motion, and en-
coders ensure precise movement tracking.
– Use Case Fit: LiDAR excels in mapping, cameras are key for spotting items,
encoders ensure accurate movement, ultrasonic sensors aid in obstacle avoid-
ance, and IMUs support navigation stability.
This part delves into the critical techniques of localization and mapping, which are
essential for enabling the autonomous indoor mobile robot to navigate and understand
its environment. We will explore how these methods allow the robot to determine its
position accurately and construct a reliable map of its surroundings.
• SLAM: SLAM methods allow robots to create a map of an unfamiliar space while
figuring out their own position within it. This is especially important for navigating
indoors, where GPS signals aren’t available. In ROS2, there are several well-known
SLAM options that could suit this project, though they are not yet fully imple-
mented:
28
Technologies in Autonomous Robots Chapter 2
items. This method enhances accuracy and adaptability, making it a strong fit
for the robot’s needs [26].
– Cartographer: Developed by Google, Cartographer can handle both 2D and
3D SLAM, using laser scans from the YDLIDAR TSA and potentially data
from an IMU in the future. This makes it strong and able to manage complex
indoor spaces, like homes with lots of furniture. Cartographer is great for
detailed mapping and is known for being accurate and reliable [27].
– SLAM Toolbox: SLAM Toolbox is a flexible package that supports both live
and pre-recorded SLAM. It offers features like lifelong mapping, which lets the
robot update its map over time, and tools to combine maps. It’s very reliable
and works well for various tasks, from small homes to more cluttered spaces,
making it a solid option for the robot’s search mission [26].
• Real-Time Object Tracking: The robot tracks objects in real-time using a cus-
tom ROS 2 setup that processes data from the Logitech StreamCam. By detecting
items like remotes or laptops with YOLO11n, the robot can adjust its search path
on the go. This ability is key for a robot tasked with finding lost items, ensuring it
can respond quickly to new detections while exploring a home [28].
The NAV2 stack is a powerful navigation framework crafted for ROS2. It offers
a collection of tools and features to help robots navigate on their own, supporting
tasks like mapping, localization, path planning, and movement control. Built on
ideas from the original ROS navigation system, NAV2 adds improvements and new
capabilities that make it well-suited for today’s robotic projects, such as searching
for lost items in a home.
Key features of the NAV2 stack include:
– A flexible design that can be easily adjusted and expanded, fitting different
robot setups.
29
Technologies in Autonomous Robots Chapter 2
– Support for smart path planning methods and movement controllers, perfect
for navigating tricky indoor spaces.
– Better performance and dependability thanks to improved system connections,
ensuring a steady and strong setup.
– Helpful tools for testing, viewing progress, and solving issues, making develop-
ment and testing easier [29–31].
• Algorithms:
– A-Star (A*): A* is a well-known algorithm for finding the shortest path from
a starting point to a goal in a map, using clever guesses to work faster. It’s
often used in robots like this one to plan efficient routes through a home. In the
ROS2 NAV2 stack, A* is part of the Smac Planner for overall path planning,
supporting different movement styles like Dubins or 2D Moore [30].
– Dijkstra: Dijkstra’s algorithm finds the shortest routes between points in a
map, making it great for steady path planning without relying on guesses.
It’s used in the ROS2 NAV2 stack for reliable overall planning when accuracy
matters most [31].
– Rapidly-exploring Random Tree (RRT): RRT explores spaces by ran-
domly growing a tree, which works well in complicated areas. It’s helpful for
planning paths in busy or dynamic indoor settings. The RRT and its improved
versions, like RRT*, are part of the ROS2 NAV2 stack for tackling tough nav-
igation tasks where simpler methods might not work [32].
– Smac Planner: The Smac Planner is a versatile tool in the ROS2 NAV2 stack,
offering options like hybrid A* and state lattice planning. It’s built to handle
different movement styles and delivers strong performance for various robot
tasks. The Smac Planner can plan both overall routes and smaller adjustments,
making it a key part of the NAV2 system [30].
30
Technologies in Autonomous Robots Chapter 2
• Fuzzy Logic PID Controllers and Their Applications: The robot uses a fuzzy
logic PID controller to keep its movements on target by adjusting for differences
between the intended and actual positions. This approach blends the traditional PID
method—using proportional, integral, and derivative terms to correct errors with
fuzzy logic to handle uncertain conditions. In this project, it ensures precise control
of motor speed, position, and orientation while navigating indoor spaces to find
items like phones or keys. This combination is especially valuable for maintaining
stability and accuracy in dynamic home settings [33, 35].
Figure 2.20: Diagram of a PID control system with fuzzy logic enhancements [36].
• Encoders and Feedback Systems: Encoders are essential parts of the motion
control setup, offering feedback on the position, speed, and direction of the robot’s
wheels. They work alongside the fuzzy logic PID controller to ensure accurate
movement. There are two main types: incremental encoders, which provide relative
position data based on wheel turns and need a starting point, and absolute encoders,
which give a unique signal for each position within a full rotation or movement,
ensuring continuous tracking without a reference.
Encoders produce signals to show the direction and extent of movement. Typically,
they generate two signals (A and B) with a 90-degree phase difference, which helps
31
Technologies in Autonomous Robots Chapter 2
determine the rotation direction based on the signal sequence. As shown in Figure
4.3, Hall sensors are used to create these quadrature signals.
• Speed Controllers: Speed controllers are used to regulate the angular speed of
motors in motion control systems. They work by adjusting the voltage or cur-
rent supplied to the motor based on the feedback received from encoders. These
controllers are implemented using PID controllers, which utilize feedback from en-
coders to maintain the desired angular speed. Speed controllers are crucial in ap-
32
Communication Tools and Protocols in Embedded Systems Chapter 2
In embedded systems, communication protocols are crucial for facilitating data ex-
change between the robot’s components and devices. These protocols ensure reliable,
efficient, and timely communication, which is vital for the robot’s performance and sta-
bility while searching for lost items in a home. Below, we explore the key protocols
relevant to this project, focusing on their unique specifications, roles, and applicability to
the robot’s operations:
– Two-Wire Interface: I2C uses just two lines—SDA for data and SCL for
clock—allowing for a compact setup to connect multiple devices on a single
bus.
– Communication Speed: It supports speeds up to 400 kbps in standard
mode, with faster modes (up to 5 Mbps) available in some implementations,
sufficient for connecting sensors in this project.
– Device Addressing: Each device on the bus has a 7-bit or 10-bit address,
enabling up to 128 or 1024 devices to share the same bus, which is useful for
adding a potential IMU or other sensors.
– Acknowledge Mechanism: After each byte, the receiver sends an acknowl-
edgment bit, ensuring data integrity during transmission, which is critical for
reliable sensor data collection.
33
Communication Tools and Protocols in Embedded Systems Chapter 2
– Four-Wire Setup: SPI uses four lines—MISO (Master In Slave Out), MOSI
(Master Out Slave In), SCLK (clock), and CS (chip select)—offering a full-
duplex communication channel for faster data transfer.
– High-Speed Capability: It can achieve speeds up to 10 Mbps or more,
depending on the hardware, making it suitable for quick data exchanges with
components like the YDLIDAR TSA.
– Clock Polarity and Phase: SPI allows configuration of clock polarity (CPOL)
and phase (CPHA), providing flexibility to match the timing requirements of
different peripherals.
– Simultaneous Read/Write: Its full-duplex nature enables simultaneous
sending and receiving of data, which enhances efficiency when communicat-
ing with high-speed devices.
• Ethernet:
– Layered Protocol Stack: Ethernet operates within the OSI model’s data
link and physical layers, using standards like IEEE 802.3 to manage high-speed,
structured data transfer.
– Speed Variants: It supports speeds from 10 Mbps to 10 Gbps or higher,
depending on the implementation, making it ideal for applications requiring
substantial data throughput.
– Frame Format: Ethernet frames include source and destination MAC ad-
dresses, a type field, payload (46-1500 bytes), and a CRC for error checking,
ensuring structured and reliable data packets.
– Network Scalability: It supports large-scale networks through switches and
routers, enabling complex setups with many devices communicating over long
distances.
34
Communication Tools and Protocols in Embedded Systems Chapter 2
35
Conclusion Chapter 2
2.6 Conclusion
The landscape of autonomous robotics, particularly for applications like searching for
lost household items, showcases impressive advancements and a wide range of technologies
that collectively elevate robotic performance. This section has provided a detailed exami-
nation of the core components and strategies that enable this robot to function effectively,
covering sensors and perception systems such as the YDLIDAR TSA and Logitech Stream-
Cam, localization and mapping approaches like SLAM paired with YOLO11n-based vision
tracking, navigation and path planning through the ROS2 NAV2 stack, communication
protocols including UART and I2C, and motion control techniques driven by a fuzzy logic
PID controller. Each of these aspects plays an indispensable role in allowing the robot to
operate independently and proficiently in indoor settings.
The incorporation of cutting-edge tools like AI and Machine Learning (ML) continues
to expand the robot’s capabilities, enabling it to adapt to its environment, handle new
tasks, and operate with increased intelligence and autonomy. Emerging trends, such as
the potential for robots to collaborate in teams or work alongside humans, suggest a future
where this robot could enhance its search efficiency through cooperative strategies.
However, the path forward is not without obstacles. Technical challenges, including
the need for precise sensor data, efficient real-time processing, and seamless system inte-
gration, must be addressed to ensure the robot’s dependability and safety. Additionally,
ethical and societal issues, such as protecting user privacy and managing the robot’s role
in daily life, require thoughtful consideration as it becomes more integrated into homes.
36
3 Software Development of Autonomous
Robot
37
Chapter 3
38
Introduction to the Robot Development Process Chapter 3
The development of an autonomous indoor mobile robot for locating misplaced house-
hold items integrates advanced hardware, software, and simulation techniques. This
chapter traces the journey from conceptual design to a fully functional robot capable
of navigation, search, and user interaction, focusing on key software development stages
that enable these capabilities, including navigation, perception, and control. Subsequent
chapters will explore additional features and optimizations.
A systematic approach is vital to ensure the robot’s reliability in dynamic home envi-
ronments. This chapter follows a structured process—conceptual planning, URDF mod-
eling, simulation, navigation system implementation, search mechanism development, ob-
ject detection integration, and mobile app creation—documenting each phase to highlight
iterative improvements essential for a robust system.
The process unfolds in distinct stages: conceptualization outlines the robot’s purpose
and specs, URDF modeling creates a digital prototype, simulation in Gazebo validates
navigation and perception, navigation system implementation uses the NAV2 stack for au-
tonomous movement, search mechanism development enables item location, object detec-
tion integration employs YOLO for real-time identification, and Flutter app development
delivers a user interface. These steps establish a solid operational foundation.
The idea for this autonomous robot began as the daily problem of finding missing
objects such as keys or phones in messy homes. The project was conceptualized as utiliz-
ing robotics to autonomously move around interior spaces, inspired by developments in
autonomous systems. That idea formed the basis for a robot that combined navigation,
perception, and eventual search functionality, starting off by building a solid foundation
in navigation.
To shape the robot’s development, clear functional specifications were set to meet
its goals. The robot must autonomously navigate indoor environments, avoiding obsta-
cles while employing SLAM for mapping. It requires sensors such as LiDAR for spatial
awareness and a camera for potential object detection, with real-time processing capabil-
ities. The design also prioritizes scalability for future enhancements like advanced search,
providing a strong foundation for the navigation focus of this chapter.
39
Proposed Modeling and Robot Description Chapter 3
An initial system design sketch outlined the robot’s architecture, emphasizing hard-
ware and software integration. The design features a Raspberry Pi as the central processor
running ROS2 Humble, an ESP32 for motor control and sensor data, and sensors includ-
ing YDLIDAR TSA and Logitech StreamCam. Planned communication includes UART
between ESP32 and Raspberry Pi, USB for sensors, and WebSocket to an Edge Device for
navigation support. Figure 3.1, depicted in a block diagram below, served as the initial
blueprint for development.
This section has outlined the critical early steps of conceptualizing the autonomous
robot, from identifying the need to locate household items to defining its functional re-
quirements and sketching a system design.The next section will explore how this con-
ceptual design is translated into a virtual model through URDF modeling, marking the
transition from planning to practical implementation.
This section outlines the modeling process for the autonomous indoor mobile robot,
detailing the tools and methodologies used to create an accurate digital representation
essential for simulation and development.
40
Proposed Modeling and Robot Description Chapter 3
The URDF serves as a fundamental XML-based format within the ROS ecosystem,
designed to define a robot’s physical structure, including its links, joints, and sensors.
This format enables accurate simulation and visualization, providing a digital blueprint
that tools like RViz and Gazebo can interpret to mimic the robot’s behavior. To enhance
this process, Xacro is employed as an extension, offering a more flexible and maintain-
able approach by allowing parameters and reusable components. Together, URDF and
Xacro create a robust foundation for modeling the robot, streamlining the transition from
concept to virtual testing.
The robot’s physical design was crafted to support its navigation purpose, beginning
with a sturdy rectangular chassis optimized for indoor mobility. This chassis serves as the
platform for four wheels, each designed with joints to enable smooth rotation, ensuring the
robot can maneuver effectively. Specific mounting points were incorporated, strategically
placing the LiDAR at the top center for wide-area scanning and the camera at the front
for forward-facing perception. The design, illustrated in Figure 3.2, establishes a balanced
and functional structure tailored for the robot’s intended environment.
The robot’s design was enhanced by integrating key sensors and actuators into the
model. The YDLIDAR TSA was positioned centrally on the chassis, configured to provide
comprehensive spatial data for navigation tasks. The Logitech StreamCam was placed at
the front, aligned to capture visual information, supporting potential object detection in
41
Proposed Modeling and Robot Description Chapter 3
later stages. Additionally, the wheel motors were included as actuators, designed to drive
the robot’s movement, ensuring that the virtual model accurately reflects the planned
hardware setup for simulation purposes.
Transformations, managed via the tf2 package in ROS2, establish the spatial relation-
ships between the robot’s components as defined in the URDF. The Table 3.1 represent
key parts of the robot:
These frames form the foundation for coordinating the robot’s perception, localization,
and navigation in the simulation environment.
42
Simulation Environment Development Chapter 3
To confirm the accuracy of the modeled design, the URDF was validated using RViz,
a visualization tool in the ROS2 ecosystem. The model was loaded to inspect the robot’s
structure, verifying that the chassis, wheels, and sensor placements aligned with the de-
sign specifications. Joint movements were tested to ensure proper rotation, and sensor
orientations were checked for consistency. A screenshot of this validation process, shown
in the figure 3.3, confirms the model’s readiness for simulation in Gazebo.
This section detailed the creation of the robot’s URDF model, enhanced by Xacro, to
establish a virtual representation for simulation. This foundational work sets the stage for
the next section, where the model will be utilized in a simulated environment to develop
navigation capabilities.
This section details the creation of a virtual environment to test and validate the
autonomous robot’s functionality, an essential step before real-world deployment.
The simulation phase began with the selection of Gazebo and RViz as primary tools,
both compatible with ROS2 Humble, to create a virtual testing environment. Gazebo
provides a physics-based simulation for realistic robot interactions, while RViz offers vi-
sualization of sensor data and robot states. These tools were integrated with ROS2 by
43
Simulation Environment Development Chapter 3
installing the necessary packages and configuring the workspace, ensuring a robust plat-
form for simulating the robot’s behavior in a controlled setting.
The previously developed URDF model was imported into Gazebo to enable simu-
lation of the robot’s physical interactions. This process involved loading the model and
adjusting physics parameters, such as friction and gravity, to reflect real-world conditions.
Sensor plugins were configured to simulate the YDLIDAR TSA’s laser scans and the Log-
itech StreamCam’s image capture, ensuring accurate data generation. The configuration
ensures the virtual robot closely mirrors its physical counterpart for effective testing.
Initial tests were conducted in Gazebo to verify the robot’s basic functionality within
the virtual environment. The robot was commanded to move forward, testing wheel
44
Simulation Chapter 3
rotation and motor response, while sensor data from the LiDAR and camera were collected
to assess their accuracy. These tests confirmed that the robot could navigate simple paths
and detect obstacles, though minor adjustments were needed for sensor alignment. A
screenshot of these initial test results in Gazebo is shown in the figure 3.5, highlighting
the robot’s early performance.
This section outlined the setup of the simulation environment, a critical step in de-
veloping the robot’s navigation capabilities. The next section will focus on implementing
and refining perception and navigation algorithms using this environment.
3.5 Simulation
This part explores the simulation process for the autonomous robot, focusing on the
integration and testing of key components within a virtual environment using ROS2.
The ROS2 nodes were essential for simulation, each serving a specific role in the
system:
45
Simulation Chapter 3
These nodes collectively enable the robot’s perception, localization, and navigation in
the simulation environment.
46
Simulation Chapter 3
Launch files and configurations were meticulously crafted to streamline the simulation
process:
These launch files and configurations automate node startup and parameter tuning,
ensuring a cohesive simulation workflow.
Localization tracks the robot’s position within the virtual environment using various
techniques, each with specific algorithms:
• Particle Filter Localization: Utilizes the amcl algorithm to estimate the robot’s
pose by maintaining a set of particles representing possible positions, updated with
LiDAR scan data against a preloaded map.
47
Simulation Chapter 3
These techniques ensure reliable position tracking, with tests in Gazebo confirming
effective localization.
The map is visualized as a screenshot of the saved map from the Cartographer al-
gorithm in .pgm file format, as shown in Figure 3.6, providing a spatial foundation for
navigation.
48
Navigation System Implementation Chapter 3
The nav2_bringup node serves as the orchestrator of the NAV2 stack in the simulation,
launching essential nodes such as planner_server, controller_server, bt_navigator,
and costmap_server. It loads configurations (e.g., nav2_params.yaml) to ensure all
nodes operate cohesively, setting up the navigation pipeline from goal setting to execution
in the environment.
49
Navigation System Implementation Chapter 3
The planner_server node is responsible for global path planning in the simulation,
computing a feasible path from the robot’s current position to a user-defined goal.
Path Publication: The resulting global path is published on the /plan topic as a
sequence of waypoints, serving as a reference for local planning and execution.
The controller_server node manages local path planning in the simulation, ensuring
the robot follows the global path while dynamically avoiding obstacles.
50
Navigation System Implementation Chapter 3
• Regulated Pure Pursuit (RPP): NAV2 also offers the Regulated Pure Pursuit
algorithm in simulation, which adjusts the robot’s velocity to follow the global path
by pursuing a lookahead point, adapting to curvature and speed constraints for
smoother navigation.
51
Navigation System Implementation Chapter 3
Based on the comparison, the Dynamic Window Approach (DWA) has been selected
for global planning, while A* has been chosen for local planning for the remainder of
the project. DWA’s strengths in handling dynamic environments and its high real-
time performance make it an excellent fit for the simulated Gazebo environment,
where the virtual robot must adapt to changing obstacles and maintain efficient nav-
igation across broader areas. Meanwhile, A*’s ability to compute optimal shortest
paths ensures precise local adjustments, providing robust obstacle avoidance critical
for the project’s goals. This combination leverages DWA’s proven performance in
simulation for global adaptability and A*’s efficiency for detailed local development.
52
Navigation System Implementation Chapter 3
53
Navigation System Implementation Chapter 3
– Path Visualization: The global and local paths are visualized in RViz via the
/plan topic, allowing developers to inspect the planned trajectory and identify
issues.
– Costmap Visualization: The global and local costmaps are published and
visualized in RViz, showing obstacle costs, inflation zones, and the robot’s
footprint, aiding in debugging navigation failures in the simulation.
– Navigation Status: The bt_navigator provides status updates via the
/navigate_to_pose action feedback, reporting progress, current state, and
any errors (e.g., goal unreachable) in the environment, facilitating system mon-
itoring.
This section outlined the implementation of the navigation system using the NAV2
stack, detailing key components such as path planning, costmap management, and be-
havior execution. The next section will demonstrate the utility of this navigation system
in implementing the search mechanism.
54
Search Mechanism and Custom Search Algorithm Chapter 3
3.7.1 Overview
Various search strategies were assessed before finalizing the custom algorithm. The
evaluation focused on factors like coverage, obstacle adaptability, computational cost, and
integration with the Nav2 stack.
• Random Walk: Involves unpredictable motion. It can eventually cover the area
but lacks any assurance of completeness or efficiency.
• Zigzag Search: Ensures structured coverage in open areas but lacks flexibility in
obstacle-dense environments.
• Grid-Based Search: Divides the map into cells and visits each cell’s center sys-
tematically. It adapts well to obstacles, integrates with costmaps, and supports
waypoint navigation, making it optimal for our use case.
55
Search Mechanism and Custom Search Algorithm Chapter 3
After comparing these options, a greedy grid-based search algorithm was chosen be-
cause it provides a good balance between coverage and simplicity, as indicated by the
comparison table. Waypoints are generated based on the sensor’s field of view, and the
nearest unvisited waypoint is selected at each step. By always choosing the closest next
goal, the algorithm efficiently covers the area with minimal computation. This greedy ap-
proach allows for quick adaptation and straightforward implementation, making it suitable
for real-time search tasks.
56
Search Mechanism and Custom Search Algorithm Chapter 3
The overall complexity of the algorithm is influenced by three main stages: waypoint
generation, waypoint selection, and scan-based detection. Let n denote the number of grid
cells used to generate waypoints, and m denote the number of valid, navigable waypoints.
O(n log n)
• Waypoint Selection: During each loop iteration, the algorithm selects the nearest
waypoint from the remaining m valid ones. Since distance calculations are precom-
puted and the list is sorted, selecting the closest waypoint takes:
O(log m)
57
Search Mechanism and Custom Search Algorithm Chapter 3
the detector’s field of view, this results in constant-time work per waypoint:
O(1)
• Total Complexity: The main loop iterates over up to m valid waypoints. Each
iteration involves O(log m) for waypoint selection and O(1) for scanning and retry
logic. The total complexity of the full search process becomes:
• Waypoint Generation: Uses camera FOV (60◦ ) and range (0.75 m) to compute:
width height
cols = , rows =
2 · span 2 · span
Points in occupied or recently visited zones (within 0.2 m) are filtered.
58
Search Mechanism and Custom Search Algorithm Chapter 3
360◦
spins = =6
60◦
• Resilience and Updates: If all waypoints are exhausted or failed, new ones are
generated every 15 seconds.
• The robot’s camera has a 0.75 m radius field of view. As shown in Figure 3.11, the
placement of 11 waypoints and their corresponding circular coverage zones result in
over 95% area coverage of the room, validated by overlapping circular visual spans.
Figure 3.11: Coverage Map: Circular FOVs Overlapping for Room Coverage
59
YOLO Model Integration for Object Detection Chapter 3
This section explores the integration of the YOLO model for real-time object detection,
a crucial component for enabling the autonomous robot to identify and locate misplaced
household items.
3.8.1 Overview
Ultralytics has developed a series of YOLO (You Only Look Once) models, advancing
real-time object detection and computer vision tasks since the release of YOLOv5 in 2020.
These models, evolving through YOLOv8, YOLOv9, YOLOv10, and YOLO11 (launched
on September 30, 2024, at YOLO Vision 2024), offer a balance of speed, accuracy, and effi-
ciency. YOLOv5 introduced PyTorch-based usability with export options, YOLOv8 added
anchor-free detection and multi-task support, YOLOv9 incorporated Programmable Gra-
dient Information (PGI) and Generalized Efficient Layer Aggregation Network (GELAN)
for edge efficiency, YOLOv10 eliminated Non-Maximum Suppression (NMS) with dual
label assignments, and YOLO11 enhanced accuracy with fewer parameters using C2PSA
modules and C3k2 blocks. Available in nano to extra-large scales with pre-trained weights
on Common Objects in Context (COCO) and ImageNet (ImageNet), these models sup-
port detection, segmentation, classification, pose estimation, and Oriented Bounding
Boxes (OBB). In this system, the YOLO model serves as the primary method for real-
time object detection, processing camera input to identify target items and guide the
search algorithm. [43]:
60
YOLO Model Integration for Object Detection Chapter 3
The comparison highlights YOLO11n as the fastest model, with the lowest inference
time on Graphics Processing Unit (GPU) (0.70 ms) and Central Processing Unit (CPU)
(3.2 ms), while maintaining a competitive mAPval of 39.5% with only 2.6 million pa-
rameters. This makes YOLO11n the optimal choice for real-time object detection on the
Raspberry Pi, balancing speed and accuracy without requiring retraining or modifications.
The YOLO11n model is integrated into the Raspberry Pi, serving as the vision
processing hub for the robot. This integration leverages the provided ROS 2 node
(ObjectDetectionNode) and is detailed as follows:
• Integration with System: The node subscribes to /image _raw for video input
and publishes to /detections, interfacing with the ROS 2 ecosystem. Startup is
logged with self.get_logger().info(), and rclpy.spin(node) ensures continu-
ous operation with proper cleanup on shutdown.
61
Flutter App Development Chapter 3
The detection pipeline begins with the Raspberry Pi capturing video frames from
the camera, published as /image_raw. These frames are preprocessed by resizing to
256x256 pixels and converting to the required format. The YOLO11n model, running on
the Pi’s CPU, performs inference, identifying objects and generating bounding boxes with
confidence scores and class IDs. The results are parsed into a Detection2DArray message,
published to /detections, where the SearchController uses them to halt navigation
upon detecting a target with a confidence score above 0.7, ensuring accurate and timely
search termination.
3.8.5 Conclusion
The integration of the YOLO model for object detection has successfully enhanced the
AMR system, enabling real-time item identification. Leveraging ROS2 and WebSocket
communication, the system effectively triggers YOLO-based detection, integrating results
into the navigation workflow with robust performance. Future improvements could focus
on reducing latency and expanding the detection dataset for greater versatility.
62
Flutter App Development Chapter 3
Flutter was preferred over other mobile development platforms due to its cross-platform
efficiency, performance, and seamless integration with ROS2 via WebSockets. The table
3.7 compares Flutter with React Native, Xamarin, and native development (Swift for iOS,
Kotlin for Android):
63
Flutter App Development Chapter 3
This part outlines the implementation of the Flutter app’s features for controlling the
autonomous robot, focusing on user interaction and real-time monitoring.
The app connects to the ROS2 system via a WebSocket server launched with ros2
launch rosbridge_server rosbridge_websocket_launch.xml.
This setup facilitates:
• Subscriptions: The app subscribes to ROS2 topics such as /amcl_pose for real-
time robot position and /map for map data.
• Robot Position Initialization: A “Set Initial Pose” button to set the robot’s
starting position using AMCL data.
64
Flutter App Development Chapter 3
• Navigation Control: A “Set Goal Pose” button allows users to set navigation
goals by tapping the map or entering coordinates, utilizing RPP or DWA.
• Map and Real-Time Position Display: A map view displays the robot’s position
(e.g., x = −0.0431, y = 0.1068, yaw= −1.0548 rad) and environment, updated in
real-time from /amcl_pose.
Figure 3.14: Main Interface of the Flutter App for robot Control.
As shown in Figure 3.14, we can initialize the robot’s position, set goal poses for
autonomous navigation, and start the item search process.
Implementation Details
• Flutter project: The Flutter project contains Dart files (e.g., main.dart) us-
ing the web_socket_channel package for WebSocket communication. It include a
CustomPaint widget for map rendering, as seen in Figure 3.14.
• Map Rendering: The map is rendered with a black outline, updated with the
robot’s pose from /amcl_pose.
65
Conclusion Chapter 3
• Navigation and Search: The app publishes /goal_pose messages and triggers
item detection via the topic /search_order, as inferred from the interface.
3.10 Conclusion
The development of the Flutter app established an intuitive user interface, facilitating
real-time control, monitoring, and interaction with the robot via WebSocket communica-
tion, completing the system’s core functionality.
In the next chapter, we will focus on the hardware integration and real-world testing
phases, evaluating the robot’s performance in actual indoor environments and addressing
the practical challenges encountered during deployment.
66
4 Hardware Realization and Integration
4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
4.2 Hardware Integration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
4.3 ESP32 Firmware for Motor Speed and Communication . . . . . . . . 70
4.3.1 FreeRTOS for Multitasking and Real-Time Execution . . . . . . . . . . . 70
4.3.2 Motor Speed Calculation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
4.3.3 Motor Speed Regulation Process . . . . . . . . . . . . . . . . . . . . . . . 73
4.3.4 Communication Between ESP32 and Raspberry Pi . . . . . . . . . . . . . 80
4.4 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
67
Introduction Chapter 4
4.1 Introduction
This chapter centers on the hardware realization and integration of the autonomous
indoor mobile robot, designed to navigate and locate misplaced household items, marking
the shift from simulation to physical deployment. Building on the software framework
from the previous chapter, the navigation system, driven by the NAV2 stack, is now
implemented on a tangible platform. The integration process involves assembling and
configuring hardware to interface with the ROS 2 ecosystem, ensuring real-time data
exchange for accurate navigation and control.
The process includes hardware assembly, firmware optimization, and performance test-
ing. The robot relies on a Raspberry Pi 4 for ROS 2 processing, an ESP32 for low-level
control, and advanced sensors for perception, enhanced by a WebSocket-linked Edge De-
vice. This chapter covers hardware integration, firmware implementation, communication
protocols, and a concluding analysis, laying the groundwork for real-world testing and fu-
ture refinements.
A significant challenge is adapting the Fuzzy Logic PID controller from simulation
to real-world conditions, where friction, uneven surfaces, and sensor noise require precise
tuning for smooth motor control. This transition highlights the complexity of aligning
virtual models with physical systems, to be addressed through iterative adjustments and
testing.
The autonomous robot is equipped with several essential hardware components, each
serving a specific role in ensuring its proper operation:
68
Hardware Integration Chapter 4
• L298N motor driver: controls the DC motors, managing power delivery and
direction based on commands from the ESP32.
• Raspberry Pi 4: runs the ROS 2 navigation stack, processing data for global and
local path planning.
• 12V LiPo battery: powers all components, ensuring stable operation through a
voltage regulator.
69
ESP32 Firmware for Motor Speed and Communication Chapter 4
The ESP32 firmware is designed to manage motor speed regulation and communication
with the ROS 2 navigation stack efficiently. This is achieved through the use of FreeRTOS
for multitasking, precise speed calculation from encoder data, and a custom Fuzzy Logic
PID controller for motor speed regulation.
• Communication Task: This task manages the reception and processing of ROS 2
/cmd_vel messages, ensuring the ESP32 can interpret velocity commands from the
navigation stack in real time.
• Motor Regulation Task: This task continuously adjusts motor speeds based on
70
ESP32 Firmware for Motor Speed and Communication Chapter 4
encoder feedback, using the Fuzzy Logic PID controller to maintain the desired
velocity.
The importance of FreeRTOS lies in its ability to prioritize tasks, manage resources
efficiently, and guarantee timely execution. By assigning appropriate priorities to the
communication and motor regulation tasks, FreeRTOS ensures that velocity commands
are processed without delay, while motor adjustments occur at regular intervals (e.g.,
every 10ms). This multitasking capability minimizes latency, prevents task starvation,
and maintains system stability, which is critical for real-time robotic applications where
precise and timely motor control is essential.
The motor speed is calculated using data from the DC motors’ encoders, which are
interfaced with the ESP32 through two pins (encA and encB) to detect rotational move-
ment. The process ensures accurate speed measurement for the subsequent Fuzzy Logic
PID regulation.
– If encB is high and encA is high, the wheel rotates clockwise, so the position
increments by +1.
– If encB is high and encA is low, the wheel rotates counter-clockwise, so the
position decrements by -1.
– If encB is low and encA is high, the wheel rotates counter-clockwise, so the
position decrements by -1.
– If encB is low and encA is low, the wheel rotates clockwise, so the position
increments by +1.
The ‘Position‘ variable tracks the cumulative encoder ticks, incrementing for clock-
wise rotation and decrementing for counter-clockwise rotation, providing an accurate
measure of the motor’s position.
71
ESP32 Firmware for Motor Speed and Communication Chapter 4
counts/s
v= × 60
204
where 204 is the number of counts per revolution, and 60 converts seconds− 1 to
minutes− 1.
• Low-Pass Filtering for Speed Smoothing: To reduce noise and ensure smooth
motor speed control, a low-pass filter with a 25 Hz cut-off frequency is applied to
the calculated speed. The filter smooths out rapid fluctuations, providing a stable
input to the PID (Proportional-Integral-Derivative) controller. The filtering process
uses the recursive equation:
where vfilt is the filtered speed, v is the current speed, and vprev is the previous speed
reading.
• State Update: The method updates the previous position, velocity, and time
72
ESP32 Firmware for Motor Speed and Communication Chapter 4
This process provides a reliable speed measurement, critical for the subsequent Fuzzy
Logic PID regulation.
The motor speed regulation process aims to maintain the desired speed of the DC
motors using speed data derived from encoder measurements. Initially, a manual PID
tuning method was employed, followed by an adaptive Fuzzy Logic PID controller to im-
prove performance under varying conditions. The following sections outline the regulation
process, comparing the two approaches and detailing the Fuzzy Logic implementation.
The initial approach involved manual PID tuning, where the PID gains—Kp (Propor-
tional gain), Ki (Integral gain), and Kd (Derivative gain)—were adjusted through trial
and error to achieve a stable response. The tuning process included:
• Setting initial gains (e.g., Kp = 1.0, Ki = 0.0, Kd = 0.0) and observing the motor’s
response to a setpoint speed.
• Increasing Kp until the motor speed oscillated, then reducing it slightly to stabilize
the response.
• Fine-tuning Kd to dampen oscillations, though it was kept low to avoid noise am-
plification.
The results of this method are depicted in Figure 4.4, which shows the motor speed often
exceeding the target setpoint, causing overshoot (reaching up to 220 RPM when the target
is 200 RPM). This led to non-smooth speed variations, particularly under varying loads,
with a settling time of approximately 0.6 seconds and noticeable oscillations.
73
ESP32 Firmware for Motor Speed and Communication Chapter 4
However, manual PID tuning has inherent limitations. The fixed gains struggle to
adapt to dynamic conditions such as sudden load changes or uneven terrain, resulting in:
• Overshoot and oscillations, as observed in the chart, which can destabilize the robot.
To address these shortcomings, an adaptive Fuzzy Logic PID controller was devel-
oped. This method dynamically adjusts the PID gains based on the error (e) and its
rate of change (dedt), providing a more robust solution. Comparison of Member-
ship Functions: Different membership functions can be used to define the fuzzy sets,
influencing the controller’s performance. The following describes each type individually:
74
ESP32 Firmware for Motor Speed and Communication Chapter 4
1.0 at the center and drops linearly to 0.0 on both sides. For instance, a triangular
NB might peak at -0.8 and taper to 0.0 at -1.0 and -0.6. It lacks a flat top, leading
to rapid membership changes and potential ambiguity when errors lie between sets,
which can result in less consistent control responses.
• Gaussian Membership Function:
This function uses a bell-shaped curve based on an exponential decay, centered
at a mean with a defined standard deviation. It provides very smooth transitions
with no sharp edges, but its membership never reaches exactly 0 or 1, requiring
more complex tuning. For example, a Gaussian NB might center at -0.8, decaying
symmetrically, making it computationally intensive due to exponential calculations.
Based on this comparison, trapezoidal membership functions were chosen for this sys-
tem. Their flat top ensures a stable and decisive response for significant errors, critical
for rapid correction in motor speed regulation. The overlapping regions provide smooth
transitions in control output, avoiding jerky behavior under load, while their low compu-
tational complexity suits the resource-constrained ESP32 platform. Triangular functions
lack the plateau, potentially leading to less decisive actions, and Gaussian functions,
though smoother, are computationally intensive, making trapezoidal the optimal choice
for stability, responsiveness, and efficiency.
The Fuzzy Logic system begins with the selection of fuzzy rules, designed to achieve
an aggressive response to quickly correct errors and stabilize motor speed. The error
75
ESP32 Firmware for Motor Speed and Communication Chapter 4
(e) and error derivative (dedt), both normalized to the range [-1.0, 1.0], are categorized
into seven linguistic variables: Negative Big (NB), Negative Medium (NM), Negative
Small (NS), Zero (Z), Positive Small (PS), Positive Medium (PM), and Positive Big
(PB). The trapezoidal membership function (trapezoidalMF) defines these variables, with
parameters set to overlap slightly for smooth transitions. For example, NB ranges from
-1.0 to -0.6, NM from -0.8 to -0.2, as specified in the ‘calculateMemberships‘ function.
The membership functions are visualized in Figure 4.5.
The fuzzy rules are implemented as 7x7 matrices (‘rule_kp‘ and ‘rule_ki‘) within the
‘fuzzyInference‘ function to dynamically adjust the PID controller gains for motor speed
regulation, mapping combinations of e and dedt memberships to proportional (Kp) and
integral (Ki) gains, with Kd set to 0.0. The values are designed to increase aggressively
for large errors (e.g., 6.0 for NB-NB) and decrease for small errors (e.g., 0.6 for PB-PB),
scaled by factors (1.5 for Kp, 7.0 for Ki) to enhance responsiveness. The tables are:
dedt e NB NM NS Z PS PM PB
NB 6.0 5.8 5.6 5.4 5.2 5.0 4.8
NM 4.8 4.6 4.4 4.2 4.0 3.8 3.6
NS 3.6 3.4 3.2 3.0 2.8 2.6 2.4
• Rule Table for Kp (x 1.5):
Z 2.4 2.2 2.0 1.8 1.6 1.4 1.2
PS 2.2 2.0 1.8 1.6 1.4 1.2 1.0
PM 2.0 1.8 1.6 1.4 1.2 1.0 0.8
PB 1.8 1.6 1.4 1.2 1.0 0.8 0.6
76
ESP32 Firmware for Motor Speed and Communication Chapter 4
dedt e NB NM NS Z PS PM PB
NB 6.0 5.8 5.6 5.4 5.2 5.0 4.8
NM 4.8 4.6 4.4 4.2 4.0 3.8 3.6
NS 3.6 3.4 3.2 3.0 2.8 2.6 2.4
• Rule Table for Ki (x 7.0):
Z 2.4 2.2 2.0 1.8 1.6 1.4 1.2
PS 2.2 2.0 1.8 1.6 1.4 1.2 1.0
PM 2.0 1.8 1.6 1.4 1.2 1.0 0.8
PB 1.8 1.6 1.4 1.2 1.0 0.8 0.6
The rules prioritize rapid error correction for large deviations (e.g., NB-NB yields
high Kp and Ki) and reduce gain intensity as the error nears zero (e.g., PB-PB yields low
Kp and Ki), ensuring stability near the setpoint. The relationship between error, error
derivative, and Kp gain is visualized in Figure 4.6.
The FIS rules operate as follows. The ‘fuzzyInference‘ function computes membership
degrees for e and dedt using ‘calculateMemberships‘. It applies the minimum operator
to determine the firing strength of each rule. The weighted sums are calculated as:
6 X
X 6
sum_kp = (weight × rule_kp[i][j] × 1.5)
i=0 j=0
77
ESP32 Firmware for Motor Speed and Communication Chapter 4
6 X
X 6
sum_ki = (weight × rule_ki[i][j] × 7.0)
i=0 j=0
6 X
X 6
sum_weights = weight
i=0 j=0
sum_kp sum_ki
kp = , ki =
sum_weights sum_weights
If sum_weights > 0; otherwise, the previous gains are retained. This center-of-gravity
method ensures a smooth transition of gains.
The Fuzzy Logic PID controller enhances motor speed regulation by dynamically ad-
justing Kp and Ki gains based on normalized error and its rate of change. It employs
trapezoidal membership functions to categorize inputs into seven linguistic sets (NB to
PB), uses aggressive rule tables for gain determination, and applies a weighted average
defuzzification method, outperforming manual PID tuning under varying loads.
Implementation Process
• Error Calculation: The ‘ComputeFuzzy‘ method calculates the error (e) as the
difference between the desired setpoint (from ROS 2 /cmd_vel) and the filtered
speed (from ‘GetfilteredVelocity‘). The time difference since the last call is com-
puted using ‘micros()‘ to ensure accurate derivative calculations, with a safeguard
to prevent division by zero.
• Normalization: The ‘Map‘ function normalizes the error (e) and error derivative
(dedt) to a range of -1.0 to 1.0, ensuring compatibility with the fuzzy logic system
and handling edge cases like zero or negative setpoints.
• Fuzzy Inference: The ‘fuzzyInference‘ function applies the rules and computes
the adjusted gains (Kp, Ki, Kd), with Kd set to 0.0.
78
ESP32 Firmware for Motor Speed and Communication Chapter 4
The integral term includes anti-windup protection, and the output is limited to
prevent saturation.
• Motor Control Output: The control signal is applied to the DC motors via the
L298N motor driver, adjusting the PWM signal. The ESP32 updates the previous
error (e) and time for the next iteration.
The Fuzzy Logic PID results are shown in Figure 4.7. Unlike the manual PID, the chart
indicates minimal overshoot, with the speed closely tracking the setpoint (e.g., stabilizing
around 200 RPM without exceedance). This ensures smoother speed variations, especially
under load, with a settling time reduced to under 0.3 seconds and almost 0 oscillations,
enhancing navigation performance.
This adaptive process ensures precise motor speed regulation, effectively handling real-
time variations while maintaining seamless communication with the ROS 2 navigation
stack.
79
ESP32 Firmware for Motor Speed and Communication Chapter 4
This part details the communication strategy enabling data exchange between the
ESP32 and Raspberry Pi, a necessary aspect for real-time coordination in the autonomous
robot system.
• Initialization: The ESP32 initializes its UART module, setting the baud rate (e.g.,
115200 bps), 8 data bits, no parity, and 1 stop bit to align with the Raspberry Pi’s
80
ESP32 Firmware for Motor Speed and Communication Chapter 4
serial settings. FreeRTOS tasks are created to handle transmission and reception
concurrently, preventing delays in real-time operations.
• Data Collection on ESP32: The ESP32 gathers sensor data, including encoder
values (encoder1, encoder2) from motor encoders, orientation data (yaw, pitch,
roll) from the IMU, and acceleration data (accel_x, accel_y, accel_z) from the
accelerometer. This data is formatted as
[encoder1,encoder2,yaw,pitch,roll,accel_x,accel_y,accel_z].
• Data Reception on Raspberry Pi: The Raspberry Pi receives the data via its
RX pin, where a ROS 2 node parses the packet to extract values for pose estimation
and path planning, relying on the real-time data stream from the ESP32.
• Command Execution on ESP32: The extracted speeds are fed into the Fuzzy
Logic PID controller, which adjusts PWM signals to the L298N motor driver. FreeR-
TOS ensures this execution occurs in real-time, maintaining responsiveness to dy-
namic conditions.
• Continuous Loop: The process runs in a continuous loop, with FreeRTOS schedul-
ing tasks to maintain real-time performance. The ESP32 transmits sensor data
periodically, and the Raspberry Pi responds with commands, sustaining seamless
integration with the ROS 2 ecosystem.
81
Conclusion Chapter 4
Importance of FreeRTOS
4.4 Conclusion
This chapter outlined a comprehensive approach to motor speed regulation and inter-
device communication for the robotic system, integrating the ESP32 and Raspberry Pi.
Initial manual PID tuning established a baseline but showed limitations like overshoot
and a 0.6-second settling time. An adaptive Fuzzy Logic PID controller, using trapezoidal
membership functions and aggressive rule tables, improved performance, reducing settling
time to under 0.3 second with smoother speed control.
82
General Conclusion
The rapidly evolving field of autonomous robotics presents both opportunities and
challenges as cutting-edge technologies emerge. This report has explored the develop-
ment of an autonomous indoor mobile robot, tracing its evolution from conceptual design
and simulation to real-world implementation. The project has tackled critical aspects
including communication protocols, control systems, and navigation algorithms within
an embedded framework, unifying these elements into a cohesive system for household
applications such as locating misplaced items.
The study addressed key technical areas: the first chapter provided a foundational
overview, detailing the project’s context, objectives, and management approach at ESME
Research Lab. The second chapter reviewed the history and technologies of autonomous
robotics, setting the stage with insights into sensors, localization, and navigation. The
third chapter detailed the software development process, covering concept design, URDF
modeling, simulation, NAV2 navigation, a custom search algorithm, YOLO integration,
and the Flutter app, establishing a robust software foundation. The fourth chapter focused
on hardware realization, integrating components like the ESP32 and Raspberry Pi, with
FreeRTOS and a fuzzy logic PID controller ensuring precise motor control and reliable
UART communication.
Personally, this project fostered substantial growth. Mastering ROS2 and integrating
YOLO for object detection required extensive self-learning, enhancing my ability to tackle
cutting-edge technologies. Troubleshooting independently was pivotal in overcoming tech-
nical hurdles. Additionally, I honed communication skills by organizing complex concepts
for this report and team discussions, strengthening my ability to convey technical details
effectively.
83
Conclusion Chapter 4
tion, control, and navigation challenges, with applications extending beyond this robot to
other autonomous systems. The integration of YOLO, ROS2, and a Flutter app demon-
strates the potential for adaptable, practical solutions.
Future work could focus on reducing detection latency, expanding the object dataset,
or incorporating machine learning for adaptive behavior. Exploring energy efficiency
and multi-robot collaboration will further enhance applicability as autonomous robots
integrate into daily life. This report lays a foundation for ongoing advancements, affirming
the feasibility of autonomous robots in household settings and opening avenues for future
innovation.
84
Bibliography
85
BIBLIOGRAPHY BIBLIOGRAPHY
[14] Computer History Museum. Shakey – chm revolution, n.d. URL https://www.
computerhistory.org/revolution/artificial-intelligence-robotics/13/
289. Accessed: June 22, 2025.
[16] Mobile Industrial Robots. Mobile industrial robots. Technical report, 2016. URL
https://www.mobile-industrial-robots.com/. Accessed: June 22, 2025.
[17] Mobile Industrial Robots. Mir100 in action: Flexible logistics automation, 2018. URL
https://www.mobile-industrial-robots.com/case-studies/. Accessed: June
22, 2025.
[18] Boston Dynamics. Spot: Agile mobile robot for industrial applications. https:
//www.bostondynamics.com/products/spot, 2023. Accessed: June 22, 2025.
[19] Boston Dynamics. Atlas: The world’s most dynamic humanoid robot. https://
www.bostondynamics.com/atlas, 2023. Accessed: June 22, 2025.
[20] ROS Wiki. Robot operating system (ros) - ros wiki, 2023. Accessed: June 22, 2025.
[24] arXiv. Robot operating system 2: Design, architecture, and uses in the wild, 2023.
Accessed: June 22, 2025.
[25] Arrow Electronics. Ultrasonic sensor used for obstacle detection, 2023. Accessed:
June 22, 2025.
[26] Aditya Kamath. Comparing different slam methods, 2020. Accessed: June 22, 2025.
[27] SpringerLink. Comparison and implementation of ros-based slam and path planning
methods, 2021. Accessed: June 22, 2025.
[28] Wevolver. Lidar slam: The ultimate guide to simultaneous localization and mapping,
2023. Accessed: June 22, 2025.
[29] NAV2 Documentation. Navigation 2 documentation, 2023. Accessed: June 22, 2025.
[30] GitHub. Ros 2 navigation framework and system, 2023. Accessed: June 22, 2025.
[31] ROSCon. Roscon 2019 navigation 2 overview, 2019. Accessed: June 22, 2025.
[32] The Robotics Back-End. Ros2 nav2 tutorial, 2023. Accessed: June 22, 2025.
86
BIBLIOGRAPHY BIBLIOGRAPHY
[33] Nidec. Motion control | agv solutions | solutions for autonomous guided vehicles and
mobile robots, 2023. Accessed: June 22, 2025.
[34] SpringerLink. Dynamic performance of industrial robot with cnc controller, 2023.
Accessed: June 22, 2025.
[35] Vecna Robotics. Amrs vs agvs: How autonomous warehouse robots navigate indus-
trial facilities, 2023. Accessed: June 22, 2025.
[36] SpringerLink. System identification, stability analysis and pid controller design for
pem electrolyzer, 2020. Accessed: June 22, 2025.
[37] HSMagnets. Universal magnetic rotary encoders, 2023. Accessed: June 22, 2025.
[38] All About Circuits. How to use a rotary encoder in an mcu-based project, 2023.
Accessed: June 22, 2025.
[39] ROS 2 Navigation Team. Nav2 documentation: Navigation algorithms and configu-
rations. https://docs.nav2.org/, 2024. Accessed: June 22, 2025.
[40] Peter E. Hart, Nils J. Nilsson, and Bertram Raphael. A formal basis for the heuristic
determination of minimum cost paths. IEEE Transactions on Systems Science and
Cybernetics, 4(2):100–107, 1968. doi: 10.1109/TSSC.1968.300136. URL https://
doi.org/10.1109/TSSC.1968.300136.
[41] Dieter Fox, Wolfram Burgard, and Sebastian Thrun. The dynamic window approach
to collision avoidance. IEEE Robotics & Automation Magazine, 4(1):23–33, 1997.
doi: 10.1109/100.580977. URL https://doi.org/10.1109/100.580977.
[42] R. Craig Coulter. Implementation of the pure pursuit path tracking algorithm.
Technical Report CMU-RI-TR-92-01, Carnegie Mellon University Robotics Institute,
1992. Accessed: June 22, 2025.
[46] React native · learn once, write anywhere. URL https://reactnative.dev/. Ac-
cessed:June 22, 2025.
87
Design, Development, and
Implementation of an Autonomous
Robot
Ameur Gargouri
Abstract: This graduation project, conducted at ESME Research Lab, focused on the
design and deployment of an autonomous indoor mobile robot prototype. The project in-
tegrated cutting-edge technologies, including real-time communication, control, and navi-
gation systems. We utilized ROS2 for sensor integration, path planning, and autonomous
navigation, with communication between subsystems enabled by UART protocol and
FreeRTOS, ensuring reliable data exchange. This marked the first-time use of ROS2
and advanced object detection with YOLO, providing valuable practical insights into
autonomous robotics for both the intern and the lab.
úÍð @ h. XñÖß Qåð ÕæÒ úΫ Q»Pð ESME Research Lab Q.Jm× Ég@X h. QjJË@ ¨ðQåÓ YJ®JK Õç' :jÊÖÏ @
ú¯ ékCÖ
I ¯ñË@ Ï @ð ,ÕºjJË@ ,ÈAB@ éÒ ¢ @ ÉÒ , èPñ¢JÓ HAJ J® K ¨ðQåÖÏ @ l×. X @ . úÎg@X É® JÓ ¼QjJÓ HñK . ðQË
áK. ÈAB@ àAÖÞ ©Ó , éJ K@ YË@ ékCÖ Ï @ð H@ P AÖÏ @ ¡J¢m' ð PAª B@ èQêk @ ÉÓA¾JË ROS2 AJÓYjJ@ . úΪ®Ë@
.
KñÓ B XAJK Q¯ñK AÜØ , FreeRTOS ÐA¢ ð UART Èñ»ñKðQK Ð@YjJAK éJ «Q®Ë@ éÒ
KAJJ.ÊË A¯ñ ¢ B@
Èð @ @ Yë àA¿ . HA . . .
¯ éJ ÊÔ« ø ðP ÐY¯ AÜØ , YOLO ©Ó éÓY
ÈAm.× ú¯ éÒJ ® JÖÏ @ @Q« B@ á« ºË@ AJk. ñËñJºKð ROS2 Ë Ð@YjJ@
.Q.JjÖÏ @ð H. PYJÖÏ @ áÓ É¾Ë éÊ ® JÖÏ @ HA
KñK. ðQË@