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

Controlling Multiple Jackal Robots

asked 2018-09-18 17:11:49 -0500

hassamsheikh1 gravatar image

Hi,

First, I apologize if my question sound stupid, since I am a total newbie in ROS. I have 2 Jackal Robots that I am trying to control separately. The problem I am facing is that both of them are subscribed to cmd_vel topic, so If I publish on one topic, both of the robots move, is there a turn around it? Thank you

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2018-09-19 01:19:38 -0500

Choco93 gravatar image

You can launch them in different namespaces. this will make it like name_space/topic. Following is a small example.

<launch>
  <group ns="jackal1">
    <node name="velocity_controller" pkg="my_package type="my_node"/>
  </group>
  <group ns="jackal2">
    <node name="velocity_controller" pkg="my_package" type="my_node"/>
  </group>
</launch>

Just bundle your nodes together in namespaces. Or you can use include tag to include launch files within it. Hope this answers your question.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2018-09-18 17:11:49 -0500

Seen: 135 times

Last updated: Sep 19 '18