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

multi robots in uwsim

asked 2014-11-06 11:06:12 -0500

VahidD gravatar image

updated 2014-11-06 11:32:59 -0500

Hello,

I tried to load two robots in environment, in order i put two <vehicle> tag with different position for them and also different topic for their navigation, but when i send data to topic of second robot, it is disappeared! is it possible at all to handle multi robots in uwsim ( i need to have many robots) and if it is possible how?! and also it is possible spawn robots inside of code or all thing must be handeled in XML file?

Thanks in advance.

it's my scenes:

blah blah blah ...
<vehicle>
    <name>visual</name>
    <file>data/scenes/r2d2_mm.urdf</file>
       <jointValues>
      <joint>0 </joint>
    </jointValues>
<position>
      <x> 0.2</x>
      <y> 0 </y>
      <z> 0.0 </z>
    </position>
    <orientation>
      <r>0</r>
      <p>0</p>
      <y>0</y>
    </orientation>

  </vehicle>

<vehicle>
    <name>visual1</name>
    <file>data/scenes/r2d2_mm.urdf</file>
       <jointValues>
      <joint>0 </joint>
    </jointValues>
<position>
      <x> 3</x>
      <y> 0 </y>
      <z> 0.0 </z>
    </position>
    <orientation>
      <r>0</r>
      <p>0</p>
      <y>0</y>
    </orientation>
  </vehicle>
.
.
.
    <rosInterfaces>
        <ROSOdomToPAT>
          <topic> /dataNavigator </topic>
          <vehicleName> visual </vehicleName>
        </ROSOdomToPAT>

        <ROSOdomToPAT>
          <topic> /dataNavigator1 </topic>
          <vehicleName> visual1 </vehicleName>
        </ROSOdomToPAT>
  </rosInterfaces>
edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2014-11-06 11:53:50 -0500

Javier Perez gravatar image

Hi,

It is possible to handle multiple vehicles, please have a look at shipwreck.xml scene, where two vehicles are placed in the scene and can be controlled through "/dataNavigator_G500TRIDENT" and "/dataNavigator_G500RAUVI". Not sure where is the error is in your case, your config file looks OK.

By now it is not possible to spawn vehicles, we are working on it.

edit flag offensive delete link more
0

answered 2017-07-18 03:07:45 -0500

mr123 gravatar image

Hi!

I was having the same problem as VahidD, namely my vehicle would disappear as soon as I published a (non-zero) Odometry message.

What I did to fix the situation (to whoever else might be reading this):

  • I added the Odometry.header.frame_id - this alone did not fix it but is probably still needed
  • Published a nonzero orientation along with the position (quaternion orientation cannot be a zero-vector)

I hope some of this information can be of help to someone in the future as I spent a day trying to figure out why the vehicle would disappear.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2014-11-06 11:06:12 -0500

Seen: 287 times

Last updated: Nov 06 '14