Ask Your Question

spawn a map in sdf file

asked 2021-06-12 07:07:59 -0500

helloros gravatar image

updated 2021-06-15 17:17:15 -0500

jayess gravatar image

hello everyone,

i have created a map in gazebo building, and safed the .config and .sdf in my workspace/worlds.

In my launch file i put the following:

<arg name= "world_name" value="$(find catkin_ws)/src/worlds/model.sdf" />

everytime i launch it, i get the error that the following package was not found in

<arg name= "world_name" value="$(find catkin_ws)/src/worlds/model.sdf" />: catkin_ws

i also sourced the workspace in my ~/-bashrc, but it doesn't work either way.

can someone please explain me, how i can spawn my self created map in gazebo?


edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2021-06-15 15:15:12 -0500

Youssef_Lah gravatar image

updated 2021-06-15 15:17:13 -0500

I think you mean spawn gazebo world not the map. This is how i do to start my world in gazebo.

      <!-- Arguments -->
      <arg name="paused" default="false"/>
      <arg name="use_sim_time" default="true"/>
      <arg name="gui" default="true"/>
      <arg name="headless" default="false"/>
      <arg name="debug" default="false"/>
      <arg name="world_name" value="$(find your_package)/worlds/your_world"/>

      <!-- Launch Gazebo with the specified world -->
      <include file="$(find gazebo_ros)/launch/empty_world.launch">
        <arg name="debug" value="$(arg debug)" />
        <arg name="gui" value="$(arg gui)" />
        <arg name="paused" value="$(arg paused)"/>
        <arg name="use_sim_time" value="$(arg use_sim_time)"/>
        <arg name="headless" value="$(arg headless)"/>
        <arg name="world_name" value="$(arg world_name)"/>
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2021-06-12 07:07:59 -0500

Seen: 20 times

Last updated: Jun 15