This ROS2 project, written in Python, showcases a dynamic simulation environment where one turtle continuously chases and eliminates other turtles within a designated space.
The project demonstrates fundamental ROS2 concepts like node creation, publisher/subscriber communication, and dynamic object manipulation.
Turtle Spawning: The project initializes the simulation with two turtles. One designated as the "catcher" and the other as the "target."
Target Movement: The target turtle spawins randomly within the simulation environment.
Catcher Tracking: The catcher turtle continuously tracks the target's position and adjusts its movement accordingly.
Collision Detection: When the catcher collides with the target, the target is eliminated from the simulation.
New Target Spawning: Immediately after eliminating a target, a new target turtle is spawned within the simulation space.
Continuous Loop: The process of tracking, catching, and spawning new targets continues indefinitely, creating a dynamic and engaging simulation environment.
ROS2 Fundamentals: This project provides hands-on experience with ROS2 concepts like node creation, publisher/subscriber communication, and dynamic object manipulation.
Dynamic Simulation: The continuous spawning and catching of turtles creates a dynamic and engaging simulation environment.
Customization Potential: The project can be easily customized to modify turtle behavior, introduce additional elements, and explore various ROS2 functionalities.
publisher.py: This node controls the movement of the catcher turtle and implements the collision detection logic.
spawner.py: This node is responsible for spawning new target turtles after each successful catch.
Clone the project repository.
Build the project using colcon build.
Source the ROS environment using source install/setup.bash.
Run the project using ros2 run turtlesim_simulator publisher