ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

What do you mean you spawned different turtles using ROSSERVICE, did you use something like this?

rosservice call /spawn 2 7 0.2 "another_turtle"

In that case, every time you spawn a new turtle, you will be able to move it independently publishing command velocities under the namespace of the new turtles, in the example above it would be: /another_turtle/cmd_vel

Therefore, you can move it by: rostopic pub /another_turtle/cmd_vel geometry_msgs/Twist "linear: x: 2.0 y: 0.0 z: 0.0 angular: x: 0.0 y: 0.0 z: 0.0"

Then, if you want to move and control all the turtles to different waypoints, you need to write a program which: - Checks where the turtles are. - Compute, for each turtle, a way to get to their goal. - Follow their paths and coordinate their movements if necessary (your planner may be able to do so already)

click to hide/show revision 2
No.2 Revision

What do you mean you spawned different turtles using ROSSERVICE, did you use something like this?

rosservice call /spawn 2 7 0.2 "another_turtle"

"another_turtle"

In that case, every time you spawn a new turtle, you will be able to move it independently publishing command velocities under the namespace of the new turtles, in the example above it would be: /another_turtle/cmd_velbe:

/another_turtle/cmd_vel

Therefore, you can move it by: by:

rostopic pub /another_turtle/cmd_vel geometry_msgs/Twist "linear:
  x: 2.0
  y: 0.0
  z: 0.0
angular:
  x: 0.0
  y: 0.0
  z: 0.0"

0.0"

Then, if you want to move and control all the turtles to different waypoints, you need to write a program which: - which:

  • Checks where the turtles are. - are.
  • Compute, for each turtle, a way to get to their goal.
  • -
  • Follow their paths and coordinate their movements if necessary (your planner may be able to do so already)