ROS Resources: Documentation | Support | Discussion Forum | Service Status | Q&A
Ask Your Question

launch scripts for gazebo

asked 2011-08-31 23:24:34 -0500

Arkapravo gravatar image

updated 2011-09-02 17:18:27 -0500

kwc gravatar image

I am moving from Player/Stage/Gazebo to ROS. Working with Gazebo, in Player/Stage/Gazebo used to be with world files (viz. gazebo however in ROS it is with launch files. So, my first question - how to make launch file for the corresponding world file ?

edit retag flag offensive close merge delete


regarding the second question, please clarify "doesn't work"
hsu gravatar imagehsu ( 2011-09-01 07:34:02 -0500 )edit
@hsu : I have sent you an email with the errors
Arkapravo gravatar imageArkapravo ( 2011-09-01 14:02:15 -0500 )edit
Please do not send personal e-mails, and please do not ask separate questions in the same post. All information must be posted here if you wish for your questions to be answered. I am removing your second question -- please repost with all relevant info if you wish for it to be answered.
kwc gravatar imagekwc ( 2011-09-02 17:17:07 -0500 )edit
@kwc@hsu : Hi Ken, Hi John - the second question has been sorted out. But for the community - I probably should post it as a separate question. Okay with both of you ?
Arkapravo gravatar imageArkapravo ( 2011-09-03 15:10:57 -0500 )edit
@Arkapravo: If your issue has been sorted out, I would rather you didn't post -- it will distract from questions that still need answering.
kwc gravatar imagekwc ( 2011-09-03 15:20:05 -0500 )edit
@kwc : That is all right !
Arkapravo gravatar imageArkapravo ( 2011-09-03 15:33:14 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2011-09-01 03:30:08 -0500

Thomas D gravatar image

If you want to launch Gazebo using an empty world and then put your_robot (URDF) model into that world you can use:

  <!-- Start Gazebo. -->
  <param name="/use_sim_time" value="false"/>
    pkg="gazebo" type="gazebo" name="gazebo"
    args="$(find gazebo_worlds)/worlds/">
    pkg="gazebo" type="spawn_model" name="spawn_your_robot"
    args="-urdf -file $(find your_robot_model)/your_robot.xml -model your_robot">

Further, you can create a node called your_robot that broadcasts a transform for your robot. If you want to see your robot move in Gazebo, then the your_robot node also needs to publish the state of your robot on the topic gazebo/set_model_state. See this page for more details about what ROS Gazebo publishes and subscribes to.

Alternatively, you can use the Gazebo services to make your_robot URDF model move in Gazebo.

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: 2011-08-31 23:24:34 -0500

Seen: 801 times

Last updated: Sep 02 '11