第一范文网 - 专业文章范例文档资料分享平台

Gazebo机器人仿真学习探索笔记(二)基本使用说明

来源:用户分享 时间:2025/6/4 13:34:59 本文由loading 分享 下载这篇文档手机版
说明:文章内容仅供预览,部分内容可能不全,需要完整文档或者需要复制内容,请下载word后使用。下载word有问题请添加微信号:xxxxxxx或QQ:xxxxxx 处理(尽可能给您提供完整文档),感谢您的支持与谅解。

[html] view plain copy print?在CODE上查看代码片派生到我的代码片

model://ground_plane

model://sun

model://pioneer2dx

model://hokuyo 0.2 0 .38 0 0 0

model://camera 0.2 0 .3 0 0 0

pioneer2dx::pioneer2dx::chassis pioneer2dx::camera::link

0 0 1

0 0

pioneer2dx::pioneer2dx::chassis pioneer2dx::hokuyo::link

0 0 1

0 0

參考上述模板,可以學習環境文件,主要由大地,光源,機器人模型,機器人模型包括本體,激光和攝像頭等具體配置。

除此之外,還有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 \

Enter Translate mode t press \Enter Scale mode s press \Enter Snap mode n press \MODELS

Delete model Delete press Delete when a model is selected to delete from scene Copy model Ctrl + c press Ctrl + \Paste model Ctrl + v press Ctrl + \MANIPULATING MODELS

Rotate model r press \

Translate model t press \Scale model s press \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 \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 + \Save as Ctrl + Shift + s press Ctrl + Shift + \Reset world Ctrl + r press Ctrl + \Reset model poses Ctrl + Shift + r press Ctrl + Shift + \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 + \

注意這裏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机器人仿真学习探索笔记(二)基本使用说明.doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
本文链接:https://www.diyifanwen.net/c5nrue8hye27f2vc1v0ey6gjog0oh070069v_2.html(转载请注明文章来源)
热门推荐
Copyright © 2012-2023 第一范文网 版权所有 免责声明 | 联系我们
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ:xxxxxx 邮箱:xxxxxx@qq.com
渝ICP备2023013149号
Top