Skip to content

Commit

Permalink
Merge pull request #2381 from azeey/6_to_7
Browse files Browse the repository at this point in the history
Merge ign-gazebo6 ➡️  gz-sim7
  • Loading branch information
azeey committed Apr 24, 2024
2 parents 922eea7 + f181a3e commit 8bad6f1
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion examples/worlds/model_photo_shoot.sdf
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
filename="gz-sim-sensors-system"
name="gz::sim::systems::Sensors">
<render_engine>ogre2</render_engine>
<background_color>1, 1, 1</background_color>
<background_color>1.0 1.0 1.0</background_color>
</plugin>
<include>
<uri>https://fuel.gazebosim.org/1.0/OpenRobotics/models/Robonaut</uri>
Expand Down
12 changes: 8 additions & 4 deletions test/integration/ModelPhotoShootTest.hh
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,6 @@ class ModelPhotoShootTest : public InternalFixture<::testing::Test>
// First run of the server generating images through the plugin.
TestFixture fixture(common::joinPaths(std::string(PROJECT_SOURCE_PATH),
_sdfWorld));
fixture.Server()->SetUpdatePeriod(1ns);

common::ConnectionPtr postRenderConn;
fixture.OnConfigure([&](
Expand All @@ -243,7 +242,12 @@ class ModelPhotoShootTest : public InternalFixture<::testing::Test>
std::bind(&ModelPhotoShootTest::OnPostRender, this));
}).Finalize();

fixture.Server()->Run(true, 50, false);
fixture.Server()->SetUpdatePeriod(1ns);

for (int i = 0; i < 50; ++i)
{
fixture.Server()->RunOnce(true);
}
this->LoadPoseValues();

fixture.OnPreUpdate([&](const sim::UpdateInfo &,
Expand Down Expand Up @@ -285,15 +289,15 @@ class ModelPhotoShootTest : public InternalFixture<::testing::Test>
}
this->checkRandomJoints = false;
}
}).Finalize();
});

this->takeTestPics = true;

const auto end_time = std::chrono::steady_clock::now() +
std::chrono::milliseconds(3000);
while (takeTestPics && end_time > std::chrono::steady_clock::now())
{
fixture.Server()->Run(true, 1, false);
fixture.Server()->RunOnce(true);
std::this_thread::sleep_for(std::chrono::milliseconds(1));
}
testImages("1.png", "1_test.png");
Expand Down
2 changes: 1 addition & 1 deletion test/worlds/model_photo_shoot_random_joints.sdf
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
filename="gz-sim-sensors-system"
name="gz::sim::systems::Sensors">
<render_engine>ogre2</render_engine>
<background_color>1, 1, 1</background_color>
<background_color>1.0 1.0 1.0</background_color>
</plugin>
<include>
<uri>https://fuel.gazebosim.org/1.0/OpenRobotics/models/Robonaut</uri>
Expand Down

0 comments on commit 8bad6f1

Please sign in to comment.