ImageVerifierCode 换一换
格式:DOCX , 页数:12 ,大小:532.97KB ,
资源ID:18713796      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/18713796.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(Gazebo机器人仿真学习探索笔记六工具和实用程序Word格式文档下载.docx)为本站会员(b****6)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

Gazebo机器人仿真学习探索笔记六工具和实用程序Word格式文档下载.docx

1、Current state of each model in the scene, as well as the state of each link and joint in the model. This includes information such as instantaneous pose, velocity, acceleration and forces.Current pose of each light in the world.Tip: You can find the whole spec for the world state here.In this tutori

2、al we will record a few log files and then take a peek inside them at the end.Record a logLogging from the GUIStart your simulation. Here, as an example, we have a simple world with a double pendulum.Click on the logging icon on the top right, or hit Ctrl+D to bring up the Data Logger.You can choose

3、 the directory where your log file will be saved by clicking the Browse button. By default, log files Go to the /.gazebo/log directory. In this example, we will save it in the /logs/double_pendulum/ directory.Click on the red button to start recording. You should see the number of bytes in your log

4、file increasing on the right.Note: For efficiency, only models and lights which move over time are logged. If your scene is static, the number of bytes in your log file will not increase. This also means that the number of samples in your log file may be different from the number of iterations in si

5、mulation.Click on the red button again to stop logging.Expand Recordings to see the path to the state.log file which was generated. It will be inside a time-stamped directory.Logging from the command lineFrom the command line, it is possible to log the whole simulation from the moment Gazebo starts

6、running until it stops, or to trigger logging from an arbitary time.Logging the whole simulationAs an example, you can record the random_velocity.world as follows:gazebo -r -record_path /logs/random_velocity worlds/random_velocity.worldYou can see a list of all of the available logging options by ru

7、nning gazebo -help.-p -play arg: Play a log file.-r -record : Record a log from the moment Gazebo is opened until it is closed.-record_encoding arg: Compression encoding format for log data. The options are zlib (default), bz2 and txt.The log file will only be terminated when Gazebo is closed. You c

8、an check the file was created by looking into the path given:$ ls /logs/random_velocity/state.logLogging part of the simulationGazebo also provides the gz log tool, which can be used to trigger logging at any moment. While Gazebo is running, open another terminal and run the following to start recor

9、ding:gz log -d 1And to stop:gz log -d 0Check out gz log -help for other options.Play back a log fileOnce you have a log file, you can replay it visually or introspect it in several ways.Visualize in GUICurrently, it is not possible to open a log file from the GUI, so playback must be started from th

10、e command line. Simply start Gazebo using the -p option to specify a log file, such as the one we recorded earlier:gazebo -u -p /logs/double_pendulum/2016-01-25T15:09:49.677400/gzserver/state.log The -u option starts the log paused.Gazebo will open in playback mode. You can play, pause, rewind and s

11、tep through the playback.Use Play / Pause to stop the playback.Use Rewind / Forward to skip to the beginning / end of the file.Use Step back / Step forward to skip samples. The number of samples skipped each time you press a step button can be changed in the box below. Samples might be any number of

12、 iterations and seconds apart.Drag the current time marker and drop it to skip through the log.Input a current time on the right to skip to that sample.Command line toolsAs mentioned above, the gz log tool provides several options for introspecting your log file. Check out this tutorial for log filt

13、ering, for example.Here, lets quickly go over how you would take a look at the recorded states.Well use -s to step through a recorded file, like this:gz log -s -f /logs/double_pendulum/2016-01-25T15:Youll see the full initial SDF representation of the world, something like this:gazebo_logheaderlog_v

14、ersion1.0gazebo_version7.0.0pre1rand_seed10622214log_start43 380000000log_end69 651000000/headerchunk encoding=txt!CDATAsdf version =1.6world name=default (.) model name=ground_plane/modeldouble_pendulum_with_base/world/sdf/chunk- Press space to continue, q to quit -As you press space, you will step

15、 through the subsequent states. Youll note that the states are more compact and only contain information about what has changed in the world. Heres an example of a state:sdf version=state world_name=sim_time/sim_timereal_time43 478499228wall_time1453763389 677873530iterations43380pose1.140 -1.074 -0

16、.000 0.000 -0.000 0.000 scale1.000 1.000 1.000link name=base1.13998 -1.07367 -0.00000 0.00000 0.00000 -0.00042 -0.0000 0.0000 -0.0005 0.0004 0.0030 0.0001 /linklower_link1.38969 -1.79815 1.41059 -2.45351 0.00000 -0.00042 0.0042 -0.2557 0.2659 1.9694 0.0048 0.0001 upper_link1.13999 -1.07367 2.10000 2

17、.33144 -0.00000 -0.00042 0.0063 -0.0008 -0.0005 -0.3739 0.0032 0.0001 0.000 0.000 0.000 0.000 -0.000 0.000 link0.00000 0.00000 0.00000 0.00000 -0.00000 0.00000 0.0000 0.0000 0.0000 0.0000 -0.0000 0.0000 Note that theres no information for the sun or the ground_plane, since they are not moving.Log fi

18、lteringIntroductionState logs are recordings of world state information from Gazebo. State includes pose, velocity, acceleration, and forces applied to all links of all models. Gazebo will only record state information for models that change over time. A state log file contains a header, the initial

19、 world description, and a time series of state.Gazebo Log Command line toolGazebo ships with a logging utility that is accessed via the gz log command.View the help information using:gz help logorgz log -hExample Usage Check out the tutorial on logging and playback for an overview of ways to record

20、a log.Step 1: Create a state log fileStart by removing old log filesrm -rf /.gazebo/log/*We will use the PR2 world to create a state log file.Start by running the Gazebo server with the -r command line optiongzserver -r worlds/pr2.worldAfter a few seconds, stop the server using ctrl-c.A new time sta

21、mped directory should exist in /.gazebo/log with one subdirectory and a state.log file. Here is an example/.gazebo/log/2013-07-25T07:29:05.122275/gzserver/state.logYou can verify this log file by replaying it in Gazebo.gazebo -p /.gazebo/log/*/gzserver/state.logStep 2: Filter a state log fileThe gz

22、log command line tool provides mechanisms for stepping through a log file and echoing the contents of a log file to screen. The echo to screen feature can be combined with a filter to produce a log file that contains specific information such as just the pose of models and links.Try echoing the reco

23、rded state log file to screen.gz log -e -f /.gazebo/log/*/gzserver/state.logYou should see a lot of information scroll by.Now lets remove all velocity, acceleration, and force information from the log file. This will leave just pose information.gz log -e -f /.gazebo/log/*/gzserver/state.log -filter

24、*.pose/*.poseThe -filter option is a flexible command line argument to extract information from a log file.It is also possible to filter based on simulation time using a Hz filter. For example, we can output state information at 30 Hz using:gz log -e -f /.gazebo/log/*/gzserver/state.log -z 30These f

25、ilters can be combined and piped to a file for playback. This may take some time depending on the size of the state.log.gz log -e -f /.gazebo/log/*/gzserver/state.log -z 30 -filter *.pose/*.pose /tmp/filtered_state.logThis log file can then be replayed in Gazebogazebo -p /tmp/filtered_state.logApply

26、ing Force/TorqueThis tutorial will explain how to apply force and/or torque to models during simulation using the graphical user interface.Applying force and torque examplesLets go through an example of applying force and torque to simple models. Open Gazebo and from the insert tab, insert a Simple Arm into the scene. Then, from the top toolbar, insert a box. Make sure the simulation is not paused.Apply force to a linkWe want to

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

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