资源描述:
《Gazebo机器人仿真学习探索笔记(六)工具和实用程序》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、Gazebo機器人仿真學習探索筆記(六)工具和实用程序Gazebo附带了许多工具和实用程序。这些教程说明了这些可用的工具,以及如何使用它们。主要有:1记录和播放2日志过滤3应用力/扭矩4HDF5数据集官网介绍通俗具体,非常容易,请参考附件。附件--官方教程LoggingandplaybackOverviewThistutorialexplainshowtousetheGazebologgingcapabilitiestorecordyoursimulationandthenreproduceitafte
2、rwards,usingeithertheGUIorthecommandline.GazebologfilesGazebologfilesarecompressed.logfileswhichcontainaninitialfulldescriptionofthewholeworld,followedbyaseriesof"worldstates".Theinitialdescriptioncontainscompleteinformationabouteverythingintheworld,from
3、thescenetotheentitiespresent.Afterthat,everytimesomethingchangesinsimulation,anewworldstateisrecorded.Worldstatesaremuchsimpler,astheyonlycontaininformationaboutwhatchanged,suchas:Simulationstatisticssuchasthecurrentsimulationtimeandthenumberofphysicsite
4、rations.Currentstateofeachmodelinthescene,aswellasthestateofeachlinkandjointinthemodel.Thisincludesinformationsuchasinstantaneouspose,velocity,accelerationandforces.Currentposeofeachlightintheworld.Tip:Youcanfindthewholespecfortheworldstatehere.Inthistut
5、orialwewillrecordafewlogfilesandthentakeapeekinsidethemattheend.RecordalogLoggingfromtheGUIStartyoursimulation.Here,asanexample,wehaveasimpleworldwithadoublependulum.Clickontheloggingicononthetopright,orhitCtrl+DtobringuptheDataLogger.Youcanchoosethedire
6、ctorywhereyourlogfilewillbesavedbyclickingtheBrowsebutton.Bydefault,logfilesGotothe~/.gazebo/logdirectory.Inthisexample,wewillsaveitinthe~/logs/double_pendulum/directory.Clickontheredbuttontostartrecording.Youshouldseethenumberofbytesinyourlogfileincreas
7、ingontheright.Note:Forefficiency,onlymodelsandlightswhichmoveovertimearelogged.Ifyoursceneisstatic,thenumberofbytesinyourlogfilewillnotincrease.Thisalsomeansthatthenumberofsamplesinyourlogfilemaybedifferentfromthenumberofiterationsinsimulation.Clickonthe
8、redbuttonagaintostoplogging.ExpandRecordingstoseethepathtothestate.logfilewhichwasgenerated.Itwillbeinsideatime-stampeddirectory.LoggingfromthecommandlineFromthecommandline,itispossibletologthewholesimulationfromthemomentG