Ask Your Question
1

launch scripts for gazebo

asked Sep 01 '11

Arkapravo gravatar image Arkapravo flag of India
462 1 5 24
http://www.mobotica.com/

updated Sep 02 '11

kwc gravatar image kwc
7078 23 67 117
http://kwc.org/

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

delete close flag offensive retag edit

Comments

regarding the second question, please clarify "doesn't work" hsu (Sep 01 '11)edit
@hsu : I have sent you an email with the errors Arkapravo (Sep 01 '11)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 (Sep 02 '11)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 (Sep 03 '11)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 (Sep 03 '11)edit

1 Answer

Sort by ยป oldest newest most voted
2

answered Sep 01 '11

Thomas D gravatar image Thomas D flag of United States
538 2 10 22
http://ibotics.ucsd.edu/t...

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"/>
  <node
    pkg="gazebo" type="gazebo" name="gazebo"
    args="$(find gazebo_worlds)/worlds/empty.world">
  </node>
  <node
    pkg="gazebo" type="spawn_model" name="spawn_your_robot"
    args="-urdf -file $(find your_robot_model)/your_robot.xml -model your_robot">
  </node>

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.

link delete flag offensive edit

Your answer

Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!
[hide preview]

Question tools

Follow

subscribe to rss feed

Stats

Asked: Sep 01 '11

Seen: 205 times

Last updated: Sep 02 '11