The Optimization of PID Controller and Color Filter Parameters with a Genetic Algorithm for Pineapple Tracking Using an ROS2 and MicroROS-Based Robotic Head
This work proposes a vision system mounted on the head of an omnidirectional robot to track pineapples and maintain them at the center of its field of view. The robot head is equipped with a pan–tilt unit that facilitates dynamic adjustments. The system architecture, implemented in Robot Operating System 2 (ROS2), performs the following tasks: it captures images from a webcam embedded in the robot head, segments the object of interest based on color, and computes its centroid. If the centroid deviates from the center of the image plane, a proportional–integral–derivative (PID) controller adjusts the pan–tilt unit to reposition the object at the center, enabling continuous tracking. A multivariate Gaussian function is employed to segment objects with complex color patterns, such as the body of a pineapple. The parameters of both the PID controller and the multivariate Gaussian filter are optimized using a genetic algorithm. The PID controller receives as input the (x, y) positions of the pan–tilt unit, obtained via an embedded board and MicroROS, and generates control signals for the servomotors that drive the pan–tilt mechanism. The experimental results demonstrate that the robot successfully tracks a moving pineapple. Additionally, the color segmentation filter can be further optimized to detect other textured fruits, such as soursop and melon. This research contributes to the advancement of smart agriculture, particularly for fruit crops with rough textures and complex color patterns.
Authors
- Sergio Fabián Ruiz Paz (ORCID: https://orcid.org/0000-0001-6960-5460)
- Carolina Maldonado-Méndez (ORCID: https://orcid.org/0000-0002-9441-2633)
- Sergio Hernández-Méndez (ORCID: https://orcid.org/0000-0001-9997-9690)
- Isaac Machorro-Cano (ORCID: https://orcid.org/0000-0002-3822-4478)
- Antonio Marı́n-Hernández (ORCID: https://orcid.org/0000-0002-7697-9118)
Institutions
- Universidad Veracruzana (MX)
- Universidad del Papaloapan (MX)
Publication Details
- Journal
- Computation
- Published
- 2025-03-07
- DOI
- https://doi.org/10.3390/computation13030069
- Primary Topic
- Smart Agriculture and AI
- Type
- article
- Field-Weighted Citation Impact
- 0.00