This repository is a remake of the SEMEAR's "Projeto de Bixo" (2nd group of 2025). It was developed with the intention of porting the original project to ROS 2 Kilted, improving Python implementation standards, and deepening knowledge in the ROS2 framework.
The project consists of a hovercraft (simulated in Gazebo) capable of:
- Searching: Rotating in place to find a specific color target (blue).
- Tracking: Once detected, the robot uses a PID controller to center the target in the camera's FOV and moves towards it.
- Autonomous State Management: Managed via a Finite State Machine (FSM).
- Middleware: ROS 2 Kilted
- Language: Python 3
- Vision: OpenCV (HSV Filtering, Contour Detection)
- Simulation: Gazebo
- Key Packages:
cv_bridge,geometry_msgs,sensor_msgs,std_msgs
The project is divided into two main nodes:
-
Vision Node (
camera_node):- Subscribes to
/camera/. - Processes images using HSV masks and morphological operations.
- Publishes object center, area, and estimated distance to
/object_info.
- Subscribes to
-
Control Node (
control_node):- Implements a Finite State Machine (FSM).
- Calculates angular velocity using a PID controller to minimize the centering error.
- Publishes velocity commands to
/cmd_vel.
After installing ROS2 Kilted, OpenCV and Bridge libraries, make sure to grant permission to python archives in the 'src' folder. Run the standard colcon build and source install/setup.bash commands and then:
ros2 launch remake_hover simu_seca.launch.py