How to modify the pose of an item in the xml?

asked 2018-12-06 09:11:10 -0600

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

Hello, I have a simple empty world with a ground, the light and a cafe table.

<?xml version="1.0" ?>
<sdf version="1.4">
  <world name="default">
    <include>
      <uri>model://ground_plane</uri>
    </include>
    <!-- Global light source -->
    <include>
      <uri>model://sun</uri>
    </include>
    <include>
          <uri>model://cafe_table</uri> 
          <pose>-5.67558 3.3625 0 0 0 -2e-06</pose>
    </include>
    <!-- Focus camera on tall pendulum -->
    <gui fullscreen='0'>
      <camera name='user_camera'>
        <pose>4.927360 -4.376610 3.740080 0.000000 0.275643 2.356190</pose>
        <view_controller>orbit</view_controller>
      </camera>
    </gui>

My problem is about the position of the cafe table. When I open gazebo with this world, the table is centered in {x,y,z} = {0, 0, 0} and not in the position specified in this line:

<include>
      <uri>model://cafe_table</uri> 
      <pose>-5.67558 3.3625 0 0 0 -2e-06</pose>
</include>

I tried to add a frame too:

<include>
    <frame name="xxx">
      <uri>model://cafe_table</uri>
    </frame>
        <pose frame="xxx">-5.67558 3.3625 0 0 0 -2e-06</pose>
</include>

But, when I launch the ros with this world, the cafe table is still centered in {x=0,y=0,z=0} Where am I getting wrong? Sorry for the easy question, I am still newbie and from documentation I could not figure out my error

edit retag flag offensive close merge delete