"turtlesim_plus_controller" is a ROS2 custom package that launches a turtlesim_plus node with 4 turtles, 4 controller and scheduler nodes for each turtle. Each turtle has a role to draw one of the letters of the word "FIBO" using 20 pizzas each.
- Clone the repository and move
turtlesim_plus_controller
andturtlesim_plus_controller_interface
to thesrc
folder of your ROS2 workspace. - Build
turtlesim_plus_controller
andturtlesim_plus_controller_interface
colcon build --packages-select turtlesim_plus_controller turtlesim_plus_controller_interface
- Source the workspace
source install/setup.bash
Launch the turtlesim_plus_controller
package
ros2 launch turtlesim_plus_controller turtlesimplus.launch.py
You can select between controller_config_1.yaml
and controller_config_2.yaml
to change the speed of the turtles. You can also specify the amount of pizza per character by adjusting pizza_amt
ros2 launch turtlesim_plus_controller turtlesimplus.launch.py config_path:="controller_config_2.yaml" pizza_amt:=20
If the launch complains about missing folder on the first run, please try running again.
- turtlesim_plus_node.py: A modified version of the turtlesim node by AJ.Pi.
- A package that provides a custom service for turtlesim_plus_node.
- path_generator.py: A node that generates YAML files for each turtle to follow.
- turtle_controller.py: A node that controls the turtlesim_plus node to reach target and drop a pizza.
- turtle_scheduler.py: The node that controls the turtlesim_plus node by sending targets to draw the word "FIBO".
- status_checker.py: A python script that checks the status of the turtlesim_plus node and move all turtle to top right on completion. It also trigger the launch file to spawn Melodic, the destructor turtle.
- The node that provides a custom service so the controller and scheduler can communicate.
- turtlesim_plus_node.py
- Subscribes to
/<namespace>/cmd_vel
to move the turtle. - Publishes to
/<namespace>/pose
to get the turtle's position. - Svc server to
/spawn_pizza
to drop a pizza. - Svc server to
/<namespace>/eat
to let Melodic eat pizza.
- Subscribes to
- path_generator.py do not interact with any other node. Is called by the launch file.
- Receive parameters
pizza_amt
from the launch file for pizza per character (Defaults to 20).
- Receive parameters
- turtle_controller.py
- Publishes to
/<namespace>/cmd_vel
to move the turtle. - Subscribes to
/<namespace>/pose
to get the turtle's position. - Svc client to
/<namespace>/spawn_pizza
to drop a pizza. - Svc client to
/<namespace>/eat
to let Melodic eat pizza. - Svc server to
/<namespace>/go
to get target location. - Svc server to
/<namespace>/go_and_place
to get target location to drop a pizza.
- Publishes to
- turtle_scheduler.py
- Receive parameters
config_path
from the launch file to get the YAML file path. - Svc client to
/<namespace>/go_and_place
to set target location to drop a pizza. - Parameter
-f
to get viapoints from the YAML file path.
- Receive parameters
- status_checker.py
- Svc client to
/<namespace>/go
to set target location. get_node_names()
to scan for running scheduler nodes.
- Svc client to