How to change the topic name?

asked 2020-12-04 06:20:38 -0500

hairy gravatar image

I am trying to spawn multiple robots in gazebo simulation. It almost works because there spawn two robots and they have thier own topics (in their namespaces), except one... The topic that uses sensor is only one and the plugin for that sensor for robot description looks like this:

<gazebo reference="sensor_laser">
<sensor type="gpu_ray" name="head_hokuyo_sensor">
  <pose>0 0 0 0 0 0</pose>
  <visualize>false</visualize>
  <update_rate>20</update_rate>
  <ray>
    <scan>
      <horizontal>
        <samples>720</samples>
        <resolution>1</resolution>
        <min_angle>-1.570796</min_angle>
        <max_angle>1.570796</max_angle>
      </horizontal>
    </scan>
    <range>
      <min>0.10</min>
      <max>10.0</max>
      <resolution>0.01</resolution>
    </range>
    <noise>
      <type>gaussian</type>
      <mean>0.0</mean>
      <stddev>0.01</stddev>
    </noise>
  </ray>
  <plugin name="gazebo_ros_head_hokuyo_controller" filename="libgazebo_ros_gpu_laser.so">
    <topicName>/m2wr/laser/scan</topicName>
    <frameName>sensor_laser</frameName>
  </plugin>
</sensor>

</gazebo>

I've tried to spawn those robots usning this tutorial

https://answers.ros.org/question/4143...

and there is always one /m2wr/laser/scan topic instead of two in different namespaces.

edit retag flag offensive close merge delete