Skip to content

Commit

Permalink
Move video recording logic to existing plugin and add legacy mode
Browse files Browse the repository at this point in the history
Signed-off-by: Louise Poubel <louise@openrobotics.org>
  • Loading branch information
chapulina committed Aug 13, 2021
1 parent 3671b7e commit 7650dda
Show file tree
Hide file tree
Showing 11 changed files with 419 additions and 578 deletions.
33 changes: 26 additions & 7 deletions examples/worlds/minimal_scene.sdf
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Features:
* Markers
* Tape measure
* Grid config
* Video recording
Missing for parity with GzScene3D:
Expand Down Expand Up @@ -118,8 +119,6 @@ Missing for parity with GzScene3D:
<play_pause>true</play_pause>
<step>true</step>
<start_paused>true</start_paused>
<service>/world/buoyancy/control</service>
<stats_topic>/world/buoyancy/stats</stats_topic>

</plugin>

Expand All @@ -144,7 +143,6 @@ Missing for parity with GzScene3D:
<real_time>true</real_time>
<real_time_factor>true</real_time_factor>
<iterations>true</iterations>
<topic>/world/buoyancy/stats</topic>
</plugin>

<!-- Insert simple shapes -->
Expand Down Expand Up @@ -203,19 +201,40 @@ Missing for parity with GzScene3D:
</ignition-gui>
</plugin>

<!-- Video recorder -->
<plugin filename="VideoRecorder" name="VideoRecorder">
<ignition-gui>
<property key="resizable" type="bool">false</property>
<property key="x" type="double">300</property>
<property key="y" type="double">50</property>
<property key="width" type="double">50</property>
<property key="height" type="double">50</property>
<property key="state" type="string">floating</property>
<property key="showTitleBar" type="bool">false</property>
<property key="cardBackground" type="string">#777777</property>
</ignition-gui>

<record_video>
<use_sim_time>true</use_sim_time>
<lockstep>true</lockstep>
<bitrate>4000000</bitrate>
</record_video>

<!-- disable legacy features used to connect this plugin to GzScene3D -->
<legacy>false</legacy>
</plugin>

<!-- Inspector -->
<plugin filename="ComponentInspector" name="Component inspector">
<ignition-gui>
<property type="bool" key="showTitleBar">false</property>
<property type="string" key="state">docked</property>
<property type="string" key="state">docked_collapsed</property>
</ignition-gui>
</plugin>

<!-- Entity tree -->
<plugin filename="EntityTree" name="Entity tree">
<ignition-gui>
<property type="bool" key="showTitleBar">false</property>
<property type="string" key="state">docked</property>
<property type="string" key="state">docked_collapsed</property>
</ignition-gui>
</plugin>

Expand Down
36 changes: 1 addition & 35 deletions src/gui/gui.config
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<!-- GUI plugins -->

<!-- 3D scene -->
<plugin filename="MinimalScene" name="3D View">
<plugin filename="GzScene3D" name="3D View">
<ignition-gui>
<title>3D View</title>
<property type="bool" key="showTitleBar">false</property>
Expand All @@ -41,40 +41,6 @@
<camera_pose>6 0 6 0 0.5 3.14</camera_pose>
</plugin>

<plugin filename="GzSceneManager" name="Scene Manager">
<ignition-gui>
<anchors target="3D View">
<line own="right" target="right"/>
<line own="top" target="top"/>
</anchors>
<property key="resizable" type="bool">false</property>
<property key="width" type="double">5</property>
<property key="height" type="double">5</property>
<property key="state" type="string">floating</property>
<property key="showTitleBar" type="bool">false</property>
</ignition-gui>
</plugin>

<plugin filename="VideoRecorderLogic" name="VideoRecorderLogic">
<ignition-gui>
<anchors target="VideoRecorderLogic">
<line own="right" target="right"/>
<line own="top" target="top"/>
</anchors>
<property key="resizable" type="bool">false</property>
<property key="width" type="double">5</property>
<property key="height" type="double">5</property>
<property key="state" type="string">floating</property>
<property key="showTitleBar" type="bool">false</property>
</ignition-gui>

<record_video>
<use_sim_time>true</use_sim_time>
<lockstep>true</lockstep>
<bitrate>4000000</bitrate>
</record_video>
</plugin>

<!-- Play / pause / step -->
<plugin filename="WorldControl" name="World control">
<ignition-gui>
Expand Down
1 change: 0 additions & 1 deletion src/gui/plugins/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ add_subdirectory(scene_manager)
add_subdirectory(shapes)
add_subdirectory(transform_control)
add_subdirectory(video_recorder)
add_subdirectory(video_recorder_logic)
add_subdirectory(view_angle)
add_subdirectory(visualize_contacts)
add_subdirectory(visualize_lidar)
8 changes: 6 additions & 2 deletions src/gui/plugins/video_recorder/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
gz_add_gui_plugin(VideoRecorder
SOURCES VideoRecorder.cc
QT_HEADERS VideoRecorder.hh
SOURCES
VideoRecorder.cc
QT_HEADERS
VideoRecorder.hh
PUBLIC_LINK_LIBS
ignition-rendering${IGN_RENDERING_VER}::ignition-rendering${IGN_RENDERING_VER}
)
Loading

0 comments on commit 7650dda

Please sign in to comment.