Multi-turtlebot3 simulation
I'm implementing multi-agent trajectory tracking with one leader and two other followers. Each robot has is controlled from a separate script and robots communicate via rostopics. I'm launching the three robots using this link from github for turtlebot3 simulations. Everything works fine if I launch my all scripts from a single launch file as below:
<launch>
<node pkg = "trajectory_tracking" name = "multi_plotter" type = "multi_robots_plotter.py" output="screen">
</node>
<node pkg = "trajectory_tracking" name = "trajectories" type = "reference_trajectory.py" output="screen">
</node>
<node pkg = "trajectory_tracking" name = "robot_0" type = "robot_0.py" output="screen">
</node>
<node pkg = "trajectory_tracking" name = "robot_1" type = "robot_1.py" output="screen">
</node>
<node pkg = "trajectory_tracking" name = "robot_2" type = "robot_2.py" output="screen">
</node>
</launch>
Now I want to launch the controller&plotter for each robot separately as in the launch file below:
<launch>
<node pkg = "trajectory_tracking" name = "robot0_plotter" type = "robot0_plotter.py" output="screen">
</node>
<node pkg = "trajectory_tracking" name = "robot_0" type = "robot_0.py" output="screen">
</node>
</launch>
Doing so, robot_0 moves and track the trajectory as required, but robots 1 and 2 don't. I tried launching just robot_1 or robot_2 but none of them moved. I tried using rosrun for the scripts, but robots 1&2 only move if robot_0's scripts is running. Does anyone know if I'm missing something from the setup? or why is robot_0 moving and others not?
Thank you