Skip to content

Commit

Permalink
Add colladaExporter test for submesh case
Browse files Browse the repository at this point in the history
Signed-off-by: Jorge Perez <[email protected]>
  • Loading branch information
Blast545 committed Apr 21, 2021
1 parent df0bf02 commit c4f6718
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 0 deletions.
21 changes: 21 additions & 0 deletions test/integration/collada_world_exporter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,27 @@ TEST_F(ColladaWorldExporterFixture, ExportWorld)
common::removeAll("./collada_world_exporter_box_test");
}

TEST_F(ColladaWorldExporterFixture, ExportWorldFromFuelWithSubmesh)
{
this->LoadWorld(common::joinPaths("test", "worlds",
"collada_world_exporter_submesh.sdf"));

// Cleanup
common::removeAll("./collada_world_exporter_tiles_test");

// The export directory shouldn't exist.
EXPECT_FALSE(common::exists("./collada_world_exporter_tiles_test"));

// Run one iteration which should export the world.
server->Run(true, 1, false);

// The export directory should now exist.
EXPECT_TRUE(common::exists("./collada_world_exporter_tiles_test"));

// Cleanup
common::removeAll("./collada_world_exporter_tiles_test");
}

/////////////////////////////////////////////////
/// Main
int main(int _argc, char **_argv)
Expand Down
46 changes: 46 additions & 0 deletions test/worlds/collada_world_exporter_submesh.sdf
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<?xml version="1.0" ?>
<!--
Test world downloading two tile files
-->
<sdf version="1.6">
<world name="collada_world_exporter_tiles_test">

<physics name="1ms" type="ode">
<max_step_size>0.004</max_step_size>
<real_time_factor>1.0</real_time_factor>
</physics>

<scene>
<ambient>0.1 0.1 0.1 1.0</ambient>
<background>0 0 0 1.0</background>
<grid>false</grid>
<origin_visual>false</origin_visual>
</scene>

<plugin
filename="ignition-gazebo-collada-world-exporter-system"
name="ignition::gazebo::systems::ColladaWorldExporter">
</plugin>

<atmosphere type="adiabatic">
<temperature>288</temperature>
<temperature_gradient>0.2</temperature_gradient>
</atmosphere>

<!-- Tunnel tile-->
<include>
<static>true</static>
<name>tile_1</name>
<pose>22 100 -10 0 -0 -3.14159</pose>
<uri>https://fuel.ignitionrobotics.org/1.0/OpenRobotics/models/Tunnel Tile 6</uri>
</include>

<include>
<static>true</static>
<name>tile_2</name>
<pose>22 111 -10 0 -0 0</pose>
<uri>https://fuel.ignitionrobotics.org/1.0/OpenRobotics/models/Tunnel Tile Blocker</uri>
</include>

</world>
</sdf>

0 comments on commit c4f6718

Please sign in to comment.