欢迎来到三一办公! | 帮助中心 三一办公31ppt.com(应用文档模板下载平台)
三一办公
全部分类
  • 办公文档>
  • PPT模板>
  • 建筑/施工/环境>
  • 毕业设计>
  • 工程图纸>
  • 教育教学>
  • 素材源码>
  • 生活休闲>
  • 临时分类>
  • ImageVerifierCode 换一换
    首页 三一办公 > 资源分类 > DOCX文档下载  

    Gazebo机器人仿真学习探索笔记基本使用说明.docx

    • 资源ID:3157425       资源大小:43.45KB        全文页数:17页
    • 资源格式: DOCX        下载积分:6.99金币
    快捷下载 游客一键下载
    会员登录下载
    三方登录下载: 微信开放平台登录 QQ登录  
    下载资源需要6.99金币
    邮箱/手机:
    温馨提示:
    用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)
    支付方式: 支付宝    微信支付   
    验证码:   换一换

    加入VIP免费专享
     
    账号:
    密码:
    验证码:   换一换
      忘记密码?
        
    友情提示
    2、PDF文件下载后,可能会被浏览器默认打开,此种情况可以点击浏览器菜单,保存网页到桌面,就可以正常下载了。
    3、本站不支持迅雷下载,请使用电脑自带的IE浏览器,或者360浏览器、谷歌浏览器下载即可。
    4、本站资源下载后的文档和图纸-无水印,预览文档经过压缩,下载后原文更清晰。
    5、试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。

    Gazebo机器人仿真学习探索笔记基本使用说明.docx

    Gazebo机器人仿真学习探索笔记基本使用说明Gazebo機器人仿真學習探索筆記基本使用說明 在完成Gazebo7安裝後,需要熟悉Gazebo,方便之後使用。 html view plain copy print?在CODE上查看代码片派生到我的代码片 $ gazebo Gazebo7自帶了很多構建好的環境模型,可以直接使用,這些模型位置和安裝路徑相關: html view plain copy print?在CODE上查看代码片派生到我的代码片 relaybotrelaybot-desktop:$ ls /usr/share/gazebo-7/worlds/ actor.world pioneer2dx.world blank.world plane_demo.world camera.world plugin.world cart_demo.world polyline.world cessna_demo.world population.world contact.world pr2.world depth_camera.world presentation.world elevator.world pressure_sensor.world empty_1_0.world projector.world empty_bullet.world quad_rotor_demo_2.world empty_sky.world quad_rotor_demo.world empty.world random_velocity.world everything.world ray_cpu.world flocking.world ray_noise_plugin.world force_torque_demo.world road_textures.world friction_demo.world road.world gripper.world robocup09_spl_field.world heightmap_dem.world robocup14_spl_field.world heightmap.world robocup_3Dsim.world hydra_demo.world rubble.world imu_demo.world seesaw.world initial_velocity.world shapes_bitmask.world joint_damping_demo.world shapes_layers.world joint_friction_demo.world shapes.world joints.world sim_events.world lift_drag_demo.world simple_arm.world lights.world simple_gripper.world linear_battery_demo.world single_rotor_demo.world logical_camera.world sonar_demo.world magnetometer.world sphere_atlas_demo.world mud_bitmask.world stacks.world mud.world timer_gui.world multilink_shape.world torsional_friction_demo.world nested_model.world transporter.world openal.world trigger.world ortho.world twin_rotor_demo.world osrf_elevator.world underwater.world pioneer2dx_camera.world willowgarage.world pioneer2dx_laser_camera.world wireless_sensors.world pioneer2dx_laser.world 在ubuntu下默認的路徑爲:/usr/share/gazebo-7/worlds/。 啓動一個示例,如下: html view plain copy print?在CODE上查看代码片派生到我的代码片 /usr/share/gazebo-7/worlds$ gazebo lift_drag_demo.world 啓動一個帶有天空的環境: html view plain copy print?在CODE上查看代码片派生到我的代码片 /usr/share/gazebo-7/worlds$ gazebo empty_sky.world html view plain copy print?在CODE上查看代码片派生到我的代码片 <?xml version="1.0" ?> <sdf version="1.5"> <world name="default"> <scene> <sky> <clouds> <speed>12</speed> </clouds> </sky> </scene> <!- A global light source -> <include> <uri>model:/sun</uri> </include> <!- A ground plane -> <include> <uri>model:/ground_plane</uri> </include> </world> </sdf> 注意這個環境中,天空中只有雲彩速度爲12,場景中還有光源和大地。 啓動一個帶有機器人模型的環境: html view plain copy print?在CODE上查看代码片派生到我的代码片 /usr/share/gazebo-7/worlds$ gazebo pioneer2dx_laser_camera.world html view plain copy print?在CODE上查看代码片派生到我的代码片 <?xml version="1.0" ?> <sdf version="1.5"> <world name="default"> <!- Ground -> <include> <uri>model:/ground_plane</uri> </include> <!- A global light source -> <include> <uri>model:/sun</uri> </include> <!- Pioneer2dx model -> <model name="pioneer2dx"> <include> <uri>model:/pioneer2dx</uri> </include> <include> <uri>model:/hokuyo</uri> <pose>0.2 0 .38 0 0 0</pose> </include> <include> <uri>model:/camera</uri> <pose>0.2 0 .3 0 0 0</pose> </include> <joint name="camera_joint" type="revolute"> <parent>pioneer2dx:pioneer2dx:chassis</parent> <child>pioneer2dx:camera:link</child> <axis> <xyz>0 0 1</xyz> <limit> <lower>0</lower> <upper>0</upper> </limit> </axis> </joint> <joint name="laser_joint" type="revolute"> <parent>pioneer2dx:pioneer2dx:chassis</parent> <child>pioneer2dx:hokuyo:link</child> <axis> <xyz>0 0 1</xyz> <limit> <lower>0</lower> <upper>0</upper> </limit> </axis> </joint> </model> </world> </sdf> 參考上述模板,可以學習環境文件,主要由大地,光源,機器人模型,機器人模型包括本體,激光和攝像頭等具體配置。 除此之外,還有gzserver和gzclient。 gazebo命令实际上运行两个不同的可执行文件。 第一个称为gzserver,第二个称为gzclient。 gzserver可执行程序运行物理更新循环和传感器数据生成。 这是Gazebo的核心,可以独立于图形界面使用。 您可能会在论坛中看到“run headless”这个短语。 这个短语相当于只运行gzserver。 一个示例用例将涉及在不需要用户界面的云计算机上运行gzserver。 gzclient可执行文件运行基于QT的用户界面。 此应用程序提供了一个很好的可视化的模拟,并在各种模拟属性方便的控制。 當然,這兩個可以分別啓動。 gazebo使用的快捷鍵: Action OperationInstruction MODE Enter Selection mode (default mode) Esc press Esc for mode to select models and right-click for context menu Enter Rotate mode r press "r" for Rotate (model) mode Enter Translate mode t press "t" for Translate (model) mode Enter Scale mode s press "s" for Scale (model) mode Enter Snap mode n press "n" for Snap (model) mode MODELS Delete model Delete press Delete when a model is selected to delete from scene Copy model Ctrl + c press Ctrl + "c" when model is selected to copy Paste model Ctrl + v press Ctrl + "v" to paste copied model MANIPULATING MODELS Rotate model r press "r" for Rotate mode; click model & rotate using markers Translate model t press "t" for Translate mode; click model & translate using markers Scale model s press "s" for Scale mode; click model & scale using markers Constrain along axis x/y/zhold key while manipulating model to constrain movement along that axis Snap to 45° when rotating Ctrl + drag hold Ctrl while rotating model to rotate in 45° increments Snap to grid when translating Ctrl + drag hold Ctrl while translating model to snap to grid Snap to 1 m when scaling Ctrl + drag hold Ctrl while scaling mode to scale in 1 m increments Snap when inserting Ctrl + drag hold Ctrl while inserting model to enable snap to grid Snap models together n press "n" for Snap mode; click one link, then a second to snap first link to second GUI LAYOUT Hide toolbars Ctrl + h hide/show top toolbar and bottom time panel Enter fullscreen F11 enter/exit fullscreen Action OperationInstruction EDITORS Open Model Editor Ctrl + m open Model Editor to construct or edit models Open Schematic View (Model Editor) Ctrl + e open Schematic View in Model Editor Open Building Editor Ctrl + b open Building Editor to construct buildings Show floor plan (Building Editor) f show/hide floor plan in Building Editor 2D View Show building features (Building Editor) g show/hide building features in Building Editor 2D View New canvas (both Editors) Ctrl + n create new canvas Save model (both Editors) Ctrl + s save model for later use Save as (both Editors) Ctrl + Shift + s save model for later use & give it a name Exit (both Editors) Ctrl + x exit Editor WORLD Save world Ctrl + s press Ctrl + "s" to save world for later use Save as Ctrl + Shift + s press Ctrl + Shift + "s" to save world for later use & give it a name Reset world Ctrl + r press Ctrl + "r" to reset world to its original state Reset model poses Ctrl + Shift + r press Ctrl + Shift + "r" to reset models to their original poses DATA Visualize topics Ctrl + t open dialog with list of topics currently advertized Log data Ctrl + d open dialog to record log files MISCELLANEOUS Quit Gazebo Ctrl + q press Ctrl + "q" to quit Gazebo 注意這裏gazebo並不能與ROS通訊,如果需要可以使用下面命令: html view plain copy print?在CODE上查看代码片派生到我的代码片 rosrun gazebo_ros gazebo rosrun gazebo_ros gzserver rosrun gazebo_ros gzclient rosrun gazebo_ros spawn_model rosrun gazebo_ros perf rosrun gazebo_ros debug 啓動後可以看到: html view plain copy print?在CODE上查看代码片派生到我的代码片 $ rostopic list /clock /gazebo/link_states /gazebo/model_states /gazebo/parameter_descriptions /gazebo/parameter_updates /gazebo/set_link_state /gazebo/set_model_state /rosout /rosout_agg 具體在之後筆記中再補充。 附件:官網教程。 Run Gazebo These three steps will run Gazebo with a default world. Install Gazebo. Open a terminal. On most Ubuntu systems you can press CTRL+ALT+t 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. 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. Thefirst is called gzserver, and the second gzclient. The gzserver executable runs the physics update-loop and sensor datageneration. This is the core of Gazebo, and can be used independently of agraphical interface. You may see the phrase "run headless" thrown about inthe forums. This phrase equates to running only the gzserver. An exampleuse case would involve running gzserver on a cloud computer where a userinterface is not needed. The gzclient executable runs a QT based userinterface. This application provides a nice visualization of simulation, nvenient 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 thegzclient application as often as you want, and even run multipleinterfaces. This page describes each of the items involved in running a Gazebo simulation. World Files The world description file contains all the elements in a simulation, including robots, lights, sensors, and static objects. This file is formatted using SDF (Simulation Description Format), and typically has a .world extension. The Gazebo server (gzserver ) reads this file to generate and populate a world. A number of example worlds are shipped with Gazebo. These worlds are located in <install_path>/share/gazebo-<version>/worlds . Model Files A model file uses the same SDF format as world files, but should only contain a single <model> . </model> . The purpose of these files is to facilitate model reuse, and simplify world files. Once a model file is created, it can be included in a world file using the following SDF syntax: <include> <uri>model:/model_file_name</uri> </include> A number of models are provided in the online model database (in previous versions, some example models were shipped with Gazebo). Assuming that you have an Internet connection when running Gazebo, you can insert any model from the database and the necessary content will be downloaded at runtime. Environment Variables Gazebo uses a number of environment variables to locate files, and set up communications between the server and clients. Starting with Gazebo 1.9.0, default values that work for most cases are compiled in. This means you don't need to set any variables. Here are the variables: GAZEBO_MODEL_PATH : colon-separated set of directories where Gazebo will search for models GAZEBO_RESOURCE_PATH : colon-separated set of directories where Gazebo will search for other resources such as world and media files. GAZEBO_MASTER_URI : URI of the Gazebo master. This specifies the IP and port where the server will be started and tells the clients where to connect to. GAZEBO_PLUGIN_PATH : colon-separated set of directories where Gazebo will search for the plugin shared libraries at runtime. GAZEBO_MODEL_DATABASE_URI : URI of the online model database where Gazebo will download models from. These defaults are also included in a shell script: source <install_path>/share/gazebo/setup.sh If you want to modify Gazebo's behavior, e.g., by extending the path it searches for models, you should first source the shell script listed above, then modify the variables that it sets. Gazebo Server The server is the workhorse of Gazebo. It parses a world description file given on the command line, and then simulates the world using a physics and sensor engine. The server can be started using the following command. Note that the server does not include any graphics; it's meant to run headless. gzserver <world_filename> The <world_filename> can be: relative to the current directory, an absolute path, or relative to a path component in GAZEBO_RESOURCE_PATH . Worlds that are shipped with Gazebo are located in <install_path>/share/gazebo-<version_number>/worlds . For example, to use the empty.world which is shipped with Gazebo, use the following command gzserver worlds/empty.world Graphical Client The graphical client connects to a running gzserver and visualizes the elements. This is also a tool which allows you to modify the running simulation. The graphical client is run using: gzclient Server + Graphical Client in one The gazebo command combines server and client in one executable. Instead of running gzserver worlds/empty.world and then gzclient, you can do this: gazebo worlds/empty.world Plugins Plugins provide a simple and convenient mechanism to interface with Gazebo. Plugins can either be loaded on the command line, or specified in a world/model file (see the SDF format). Plugins specified on the command line are loaded first, then plugins specified in the world/model files are loaded. Most plugins are loaded by the server; however, plugins can also be loaded by the graphical client to facilitate custom GUI generation. Example of loading a plugin on the command line: gzserver -s <plugin_filename> <world_file> The same mechanism is used by the graphical client: gzclient -g <plugin_filename> For more information refer to the plugins overview page. Introduction Gazebo uses a distributed architecturewith separate libraries for physics simulation,rendering, user interface, communication, and sensor generation.Additionally, gazebo provides two executa

    注意事项

    本文(Gazebo机器人仿真学习探索笔记基本使用说明.docx)为本站会员(小飞机)主动上传,三一办公仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知三一办公(点击联系客服),我们立即给予删除!

    温馨提示:如果因为网速或其他原因下载失败请重新下载,重复下载不扣分。




    备案号:宁ICP备20000045号-2

    经营许可证:宁B2-20210002

    宁公网安备 64010402000987号

    三一办公
    收起
    展开