Gazebo机器人仿真学习探索笔记四模型编辑.docx

上传人:b****5 文档编号:12303597 上传时间:2023-04-18 格式:DOCX 页数:20 大小:1.06MB
下载 相关 举报
Gazebo机器人仿真学习探索笔记四模型编辑.docx_第1页
第1页 / 共20页
Gazebo机器人仿真学习探索笔记四模型编辑.docx_第2页
第2页 / 共20页
Gazebo机器人仿真学习探索笔记四模型编辑.docx_第3页
第3页 / 共20页
Gazebo机器人仿真学习探索笔记四模型编辑.docx_第4页
第4页 / 共20页
Gazebo机器人仿真学习探索笔记四模型编辑.docx_第5页
第5页 / 共20页
点击查看更多>>
下载资源
资源描述

Gazebo机器人仿真学习探索笔记四模型编辑.docx

《Gazebo机器人仿真学习探索笔记四模型编辑.docx》由会员分享,可在线阅读,更多相关《Gazebo机器人仿真学习探索笔记四模型编辑.docx(20页珍藏版)》请在冰豆网上搜索。

Gazebo机器人仿真学习探索笔记四模型编辑.docx

Gazebo机器人仿真学习探索笔记四模型编辑

Gazebo機器人仿真學習探索筆記(四)模型編輯

模型編輯主要是自定義編輯物體模型構建環境,也可以將多種模型組合爲新模型等,支持外部模型導入,

需要注意的導入模型格式有相應要求,否在無法導入成功,

COLLADA(dae),STereoLithography(stl),ScalableVectorGraphics(svg)。

模型導入界面如下:

以ScalableVectorGraphics(svg)爲例,直接使用下面命令安裝使用:

[html]viewplaincopyprint?

在CODE上查看代码片派生到我的代码片

~$sudoapt-getinstallinkscape

也可以編輯組合模型:

這部分內容都是可視化操作,簡潔易學,可直接參考附錄中的官方文檔。

編輯好的模型可以重命名,然後另存,twotable,會自動生成如下文件。

自動生成的代碼如下所示:

model.config

[html]viewplaincopyprint?

在CODE上查看代码片派生到我的代码片

xmlversion="1.0"?

>

twotable

1.0

model.sdf

model.sdf

[html]viewplaincopyprint?

在CODE上查看代码片派生到我的代码片

xmlversion='1.0'?

>

0

0010-00

1.50.80.03

0.6

0.6

0010-00

1.40.80.04

0.680.380.50-00

0.02

1

0.680.380.50-00

0.02

1

0.68-0.380.50-00

0.02

1

0.68-0.380.50-00

0.02

1

-0.68-0.380.50-00

0.02

1

-0.68-0.380.50-00

0.02

1

-0.680.380.50-00

0.02

1

-0.680.380.50-00

0.02

1

01.23981-0.3240-00

1

0-1.239810.3240-00

model:

///table_marble/meshes/table_lightmap.dae

0.250.250.25

model:

//table_marble/meshes/table_lightmap.dae

0.250.250.25

0

0

1

可知,sdf爲1.6版本了。

附錄:

官方文檔

ModelEditor

Overview

ThistutorialdescribestheprocessofcreatingamodelusingtheModelEditor.

OpentheModelEditor

MakesureGazeboisinstalled.

Startupgazebo.

$gazebo

OntheEditmenu,GotoModelEditor,orhitCtrl+Mtoopentheeditor.

Graphicaluserinterface

Theeditoriscomposedofthefollowing2areas:

ThePaletteonthelefthastwotabs.TheInserttabletsyouinsertparts(linksandothermodels)intothescenetobuildthemodel.TheModeltabdisplaysalistofallthepartsthatmakeupthemodelyouarebuilding.

The3DViewontherightwhereyoucanseeapreviewofyourmodelandinteractwithittoedititspropertiesandcreatejointsbetweenlinks.

TheGUItoolsonthetoptoolbarcanbeusedtomanipulatejointsandlinksinthe3DView.

AddLinks

Addsimpleshapes

Themodeleditorhasthreesimpleprimitivegeometriesthattheusercaninsertintothe3Dviewtomakealinkofthemodel.

OnthePalette,clickonthebox,sphere,orcylindericonunderSimpleShapes.

Moveyourmousecursoroverthe3Dviewtoseethevisualappear,andclick/releaseanywheretoaddittothemodel.

Tip:

YoucanpressEsctocanceladdingthecurrentlinkattachedtothemousecursor.

Addmeshes

Toaddacustommesh,

ClickontheAddbuttonunderCustomShapes,whichpopsupadialogthatletsyoufindthemeshyouwanttoadd.

ClickonBrowsebuttonandusethefilebrowsertofindthemeshfileonyourlocalmachine.Ifyouknowthepathofthemeshfile,youcanenteritdirectlyinthetextfieldboxnexttotheBrowsebutton.NoteGazebocurrentlyonlysupportsimportingCOLLADA(dae),STereoLithography(stl),andScalableVectorGraphics(svg)files.

ClickImporttoloadthemeshfile.Then,addittothe3Dview.

CreateJoints

Themodeleditorsupportscreatingseveraltypesofjointsbetweenlinksinthemodelbeingedited.Tocreateajoint:

Clickonthejointicononthetoolbar.ThisbringsuptheJointCreationDialogwhichallowsyoutospecifydifferentpropertiesofthejointyouwanttocreate.Asyoucanseeinthedialog,thedefaultjointtypeisaRevolutejoint.

Beginbymovingyourmouseoverthelinkyouwishtocreateajointfortoseeitbeinghighlightedandclickonit.Thislinkwillbetheparentlinkofthejoint.

Next,moveyourmousetothelinkwhichyouwouldliketobethechildlinkofthejoint.Clickonittoseeacoloredlineconnectingthetwolinksandajointvisualattachedtothechildlink.

Thelinerepresentingthejointiscolor-coded.Playaroundwithdifferentjointtypestoseethecolors.

ThejointvisualconsistsofRGBaxeswhichhelptogiveanideaofthecoordinateframeofthejoint.Theyellowarrowindicatestheprimaryaxisofthejoint.Forexample,inthecaseofarevolutejoint,thisistheaxisofrotation.

OnceyouhavespecifiedallthedesiredpropertiesofthejointintheJointCreationDialog,clickontheCreatebuttonatthebottomtofinalizejointcreation.

Tip:

YoucanpressEscanytimetocancelthejointcreationprocess.

Edityourmodel

Note:

Becarefulwheneditingyourmodel;theeditorcurrentlyhasnooptiontoundoyouractions.

Tip:

Allmeasurementsareinmeters.

Editlinks

ThemodeleditorsupportseditingpropertiesofalinkwhichyouwouldalsofindinitsSDF.

Note:

Gazebo6+supportseditinglinks,visuals,andcollisions.Theabilitytoeditsensorsandpluginsaretobeimplementedinlaterversions.

Toeditalink'sproperties:

Double-clickonthelinkorrightclickandselectOpenLinkInspector.AdialogwindowwillappearwhichcontainsLink,Visual,andCollisionpropertytabs.

Asanexample,trychangingthelinkposeandvisualcolors.Onceyouaredone,clickonOKtoclosetheinspector.

Editjoints

Asmentionedearlier,jointpropertiescanalsobeedited.ThesearepropertiesthatyouwouldfindinthejointSDF.

Toeditajoint:

Double-clickonthelineconnectingthelinksorrightclickonitandselectOpenJointInspector.Thejointinspectorwillappear.

Asanexample,trychangingthejointposeandjointtype.Onceyouaredone,clickonOKtoclosetheinspector.

Savingyourmodel

Savingwillcreateadirectory,SDFandconfigfilesforyourmodel.

Asanexercise,let'sbuildasimplecarandsaveit.Thecarwillhaveaboxchassisandfourcylinderwheels.Eachwheelwillbeconnectedtothechassiswitharevolutejoint:

Onceyou'rehappywiththemodelyoucreated,gototheModeltabintheleftpanelandgiveitaname.

Exit

Whenyou'redonecreatingthemodelandyou'vesavedit,gotoFileandthenExitModelEditor.

Yourmodelwillshowupinthemainwindow.

Editexistingmodels

Ratherthancreatingamodelfromthegroundup;youcanalsoeditexistingmodelsthatarealreadyinthesimulation.

Toeditanexistingmodel:

Makesureyouhavesavedthemodelyoucreated,andyouhaveexitedthemodeleditor.Alternatively,startfromafreshGazeboinstance.

InsertamodelfromtheInserttabontheleft.Forexample,let'sinsertaSimpleArm.

RightclickonthemodelyoujustinsertedandselectEditModel.

Nowyouareinthemodeleditorandyouarefreetoaddnewlinkstothemodeloreditexistingones.

ExtrudeSVGfiles

Overview

Thistutorialdescribestheprocessofextrudi

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 法律文书 > 判决书

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1