-
Notifications
You must be signed in to change notification settings - Fork 14
Logging and playback
이 지침서는 GUI 또는 명렁어 라인을 이용하여 당신의 시물레이션을 기록하고, 이후에 다시 제공하는 가제보의 로깅능력을 사용하는 방벙을 설명합니다.
가제보 로그화일은 압축된 .log화일 입니다. 그화일은 "world states"시리즈에 의해 follow되고있는 "whole world"의 초기화된 전체 설명을 포함합니다.
초기설명은 scene 에서부터 entities present 까지 world안의 모든것들에 대한 정보를 포함하고 있습니다
그이후 , 매번 시물레이션에서 바꾸고,새로운world 상태는 기록이 됩니다. 바뀐부분에 대한 정보만을 포함하기 때문에 아래아 같이 world states는 좀더 간단해 집니다.
"the current simulation time and the number of physics iterations"과 같은 시물레이션 통계 수치 scene에서 각모델의 현상태,모델에서 joint ,link 상태.이것은 즉각적인 pose와 같은 정보를 포함합니다. world에서 각 loght 의 현재pose
Tip: 당신은 여기서 world의 전체 spec을 발견할수 있습니다.
이 지짐서는 몇가지 log화일을 기록할겁니다, 그리고 끄ㅌ에 그들안의 peek를 취할것입니다.
-
당신의 시물레이션을 시작하세요 . 여기 예제와 같이, 우리는 복진자를 가진 단순한 world 를 갖고있습니다
-
우측상단의 logging icon 을 클릭하세요, 또는 데이터 로거를 불러오기 위해 Ctrl+D를 치세요
-
당신은 브로우져 버튼을 눌러서, 당신의 로그화일이 저장될 디렉토리를 선택할수 있습니다. 디폴트로 로그화일은 "~/.gazebo/log directory"에 저장이 됩니다. 이 예제에서, 우리는 그것을 ~/logs/double_pendulum/ 디렉토리에 저장을 할것입니다.
-
시작을 위해 빨간 버튼을 누릅니다. 당신은 오른쪽에 증가하고 있는 로그화일의 바이트수를 보아야만 합니다. 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 simulation.
-
중단을 하기위해서 다시 적색버튼을 클릭합니다.
-
생성된 로그화일을 패를 보기위해 기록을 expend 하세요, 그것은 타임스탬프 디렉토리에 있을겁니다.
커멘드 라인으로부터, 가제보실행부터 끝날때까지 모든 시물레이션을 로그하는것이 가능합니다. or to trigger logging from an arbitary time.
예제와 같이 , 당신은 random_velocity.world을 기록할수 있습니다.
$ gazebo -r --record_path ~/logs/random_velocity worlds/random_velocity.world
당신은 가제보 실행 --help 실행함으로써, 가능한 모든 로깅옵션 리스트를 볼수있습니다.
-p [--play] arg: Play a log file.
-r [ --record ]: 가제보가 시작되는 순간부터 끝날때 까지 기록하기
--record_encoding arg: 데이터 로그를 위한 압축 인코딩 포맷은 디폴트는 zlib이며, bz2,txt가 있습니다 로그화일은 가제보가 종료될때 끝납니다. 당신은 주어진 패스를 보면 화일이 생성되어있음을 확인할수 있습니다. given:
$ ls ~/logs/random_velocity/
state.log
가가제보는 또한 gz 로그 툴을 제공합니다. 그것은 가제보가 실행중인 상태에서 어떤 순간에 로깅시작을 할때 사용될수 있습니다. 다른 터미널을 실행하고, 기록을 시작하기 위해 아래 내용을 따라 하세요 :
$ gz log -d 1
And to stop:
$ gz log -d 0
Check out gz log --help for other options.
당신이 로그화일을 가지게 되면, 당싱은 그ㄱ서을 비주얼하게 재생할수 있습니다. 또는 다양한 방법으로 그것을 introspect할수도 있습니다.
현재,GUI로 부터 로그화일을 여는것은 가능하지 않습니다, 그래서 playback 은 커맨드라인으로 부터 시작을 해야합니다. 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
Tip: The -u option starts the log paused.
가제보는 playback mode에서 열겁니다. 당신 play, 멈춤등을 할수있습니다
. 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 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.
위에 언급한바와 같이 ,gz툴툴은 당신의 로그화일을 introspecting 를 위해 여러가지 옵션을 제공합니다. 로그 필터링을 위해서 이 지침서를 확인하세요, 예를 들면
여기, 당신이 어떻게 저장된 상태를 볼수있는지 한번 보세요 We'll use -s to step through a recorded file, like this:
$ gz log -s -f ~/logs/double_pendulum/2016-01-25T15\:09\:49.677400/gzserver/state.log
당신은 worldf를 대표하는 전체초기 sdf를 볼수있습니다, 아래와 같이 You'll see the full initial SDF representation of the world, something like this:
<?xml version='1.0'?>
<gazebo_log>
<header>
<log_version>1.0</log_version>
<gazebo_version>7.0.0~pre1</gazebo_version>
<rand_seed>10622214</rand_seed>
<log_start>43 380000000</log_start>
<log_end>69 651000000</log_end>
</header>
<chunk encoding='txt'><![CDATA[
<sdf version ='1.6'>
<world name='default'>
(...)
<light name='sun' type='directional'>
(...)
</light>
<model name='ground_plane'>
(...)
</model>
<model name='double_pendulum_with_base'>
(...)
</model>
</world>
</sdf>]]></chunk>
--- 빠져나가기 위해서는 'q' , 계속하기 위해선 스페이스바를 누르세요
당신은 스페이스를 눌렀을때, 당신은 스텝별로 볼수있고, 당신은 좀더 컴팩트하게 확인을 할수있습니다 단지 world에서 바뀐부분에 대한 정보만을 포함합니다. 아래는 샘플입니다.
<chunk encoding='txt'><![CDATA[
<sdf version='1.6'>
<state world_name='default'>
<sim_time>43 380000000</sim_time>
<real_time>43 478499228</real_time>
<wall_time>1453763389 677873530</wall_time>
<iterations>43380</iterations>
<model name='double_pendulum_with_base'><pose>1.140 -1.074 -0.000 0.000 -0.000 0.000 </pose><scale>1.000 1.000 1.000</scale><link name='base'><pose>1.13998 -1.07367 -0.00000 0.00000 0.00000 -0.00042 </pose><velocity>-0.0000 0.0000 -0.0005 0.0004 0.0030 0.0001 </velocity></link><link name='lower_link'><pose>1.38969 -1.79815 1.41059 -2.45351 0.00000 -0.00042 </pose><velocity>0.0042 -0.2557 0.2659 1.9694 0.0048 0.0001 </velocity></link><link name='upper_link'><pose>1.13999 -1.07367 2.10000 2.33144 -0.00000 -0.00042 </pose><velocity>0.0063 -0.0008 -0.0005 -0.3739 0.0032 0.0001 </velocity></link></model><model name='ground_plane'><pose>0.000 0.000 0.000 0.000 -0.000 0.000 </pose><scale>1.000 1.000 1.000</scale><link name='link'><pose>0.00000 0.00000 0.00000 0.00000 -0.00000 0.00000 </pose><velocity>0.0000 0.0000 0.0000 0.0000 -0.0000 0.0000 </velocity></link></model></state></sdf>
]]></chunk>
--- Press space to continue, 'q' to quit ---
sun,ground는 움직임이 없기때문에 어떠한 정보도 없음을 확인하세요
-
Robot Simulators
-
Build a Robot
- Model structure and requirements
- How to contribute a model
- Make a model
- Make a Mobile Robot
- The relationship among Link, Joint and Axis
- Import Meshes
- Attach Meshes
- Add a Sensor to a Robot
- Make a Simple Gripper
- Attach Gripper to Robot
- Nested model
- Model Editor
- Animated Box
- Make an animated model(actor)
- Inertial parameters of triangle meshes
- Visibility layers
-
Model Editor
-
Build a World
-
Tools and utilities
-
Write a plugin
-
Plugins
-
Sensors
-
User input
-
Transport Library
-
Rendering Library
-
Connect to ROS
-
Ros Control - Advanced
-
DRCSIM for ROS Kinetic (Ubuntu16.04)
-
DRCSIM
- DRC Simulator installation
- Launchfile options
- Spawn Atlas into a custom world
- Animate joints
- Atlas Keyboard Teleoperation over ROS
- Teleoperate atlas with a music mixer
- Visualization and logging
- Atlas MultiSense SL head
- How to use the Atlas Sim Interface
- Atlas fake walking
- Grasp with Sandia hands
- DRC vehicle tele-operation
- DRC vehicle tele operation with Atlas
- Sending joint commands with ROS
- Atlas control over ROS with python
- Modify environment
- Atlas switching control modes
- Atlas Controller Synchronization over ROS Topics
- Changing Viscous Damping Coefficients Over ROS Service
- Running BDI controller demo
- Using the RobotiQ 3 Finger Adaptive Robot Gripper
- BDI Atlas Robot Interface 3.0.0 Stand In Example
-
HAPTIX
- HAPTIX software install and update
- HAPTIX C API
- HAPTIX Matlab and Octave API
- HAPTIX Simulation World API
- HAPTIX Teleoperation
- HAPTIX environment setup
- HAPTIX Optitrack Control
- HAPTIX Tactor Glove
- HAPTIX Simulation World API with Custom World Example
- HAPTIX logging
- HAPTIX DEKA Luke hand installation
- HAPTIX Simulation Scoring Plugin Example
-
MoveIt!
-
Rviz & rqt & ROSBAG
- Control Theory
- TroubleShooting
- Solidworks model to URDF
- ROS-Gazebo with MATLab
- MATLab installation in Linux
- [Gazebo simulation with MATLab]


