Gazebo | Ignition | Community
Ask Your Question
0

How to add a floor to the world?

asked 2019-09-20 04:43:24 -0500

microbot gravatar image

updated 2019-09-20 06:50:37 -0500

kumpakri gravatar image

I have a small robot which I want to spawn it on a ramp that I have created. Everytime I spawn it there, due to the inertia the robot rolls down the ramp and then falls down into the emptness where ramp is present. So i wanted to firwst launch a ground_plane on which later I want to launch a ramp, so that even if robot rolls down the ramp, it doesnt fall down into emptyness. Can anyone please help me how to do that ?

I have tried using two include statements one for each model and yet only the first include statement is being considered while launching. I am launching it using roslaunch.

edit retag flag offensive close merge delete

Comments

You can add the ground model into your world

<sdf version="1.4"> 
  <world name="world"> 
      <include> 
          <uri>model://ground_plane</uri> 
      </include> 
      <include> 
          <uri>model://sun</uri> 
      </include>
  </world> 
</sdf>
kumpakri gravatar imagekumpakri ( 2019-09-20 04:55:02 -0500 )edit

Thank you, I have did that before although i forgot to add appropriate scale, now I fixed it and its running, thank you.

microbot gravatar imagemicrobot ( 2019-09-20 05:15:56 -0500 )edit

I have edited the question title and added the answer so that other users can find this thread useful.

kumpakri gravatar imagekumpakri ( 2019-09-20 06:57:52 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-09-20 06:55:56 -0500

kumpakri gravatar image

Adding ground to WORLD file:

<sdf version="1.4"> 
  <world name="world"> 
      <include> 
          <uri>model://ground_plane</uri> 
      </include> 
      <include> 
          <uri>model://sun</uri> 
      </include>
      ...
  </world> 
</sdf>
edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2019-09-20 04:43:24 -0500

Seen: 1,476 times

Last updated: Sep 20 '19