zoukankan      html  css  js  c++  java
  • [Tutorial] Getting started with Gazebo in ROS

    Run Gazebo

    These three steps will run Gazebo with a default world.

    1. Install Gazebo.

    2. Open a terminal. On most Ubuntu systems you can press CTRL+ALT+t

    3. Start Gazebo by entering the following at the command prompt.

      gazebo

    Run Gazebo with a robot

    Let's simulate something a bit more interesting by loading a world with a pioneer2dx.

    1. Open a terminal and enter the following command.

      gazebo worlds/pioneer2dx.world

    Where are the worlds located?

    You may have noticed the mysterious worlds/pioneer2dx.world argument in the above command. This instructs gazebo to find the pioneer2dx.world file, and load it on start.

    World files are located in a versioned system directory, for example /usr/share/gazebo-7 on Ubuntu. If you have Gazebo 7.0 installed on Ubuntu, in a terminal type the following to see a complete list of worlds.

    ls /usr/share/gazebo-7/worlds

    For a Gazebo 7.0 installation on OS X using Homebrew, type the following to see a complete list of worlds.

    ls /usr/local/share/gazebo-7/worlds

    Client and server separation

    The gazebo command actually runs two different executables for you. The first is called gzserver, and the second gzclient.

    The gzserver executable runs the physics update-loop and sensor data generation. This is the core of Gazebo, and can be used independently of a graphical interface. You may see the phrase "run headless" thrown about in the forums. This phrase equates to running only the gzserver. An example use case would involve running gzserver on a cloud computer where a user interface is not needed.

    The gzclient executable runs a QT based user interface. This application provides a nice visualization of simulation, and convenient controls over various simulation properties.

    Try running each of these executables. Open a terminal and run the server:

    gzserver

    Open another terminal and run the graphical client:

    gzclient

    At this point you should see the Gazebo user interface. You restart the gzclient application as often as you want, and even run multiple interfaces.

    Reference:

    Gazebo Tutorial: Quick Start

     

  • 相关阅读:
    java匿名内部类
    【绝对给力】Android开发免豆资料(教程+工具+源码)地址汇总
    【绝对给力】Android开发免豆资料(教程+工具+源码)地址汇总
    【分享】Java学习之路:不走弯路,就是捷径
    【分享】熟练的Java程序员应该掌握哪些技术?
    【分享】熟练的Java程序员应该掌握哪些技术?
    android 小知识点
    android 小知识点
    Eclipse快捷键大全
    Eclipse快捷键大全
  • 原文地址:https://www.cnblogs.com/casperwin/p/6045506.html
Copyright © 2011-2022 走看看