diff --git a/dartsim/src/JointFeatures_TEST.cc b/dartsim/src/JointFeatures_TEST.cc index a834d088a..be293c7f7 100644 --- a/dartsim/src/JointFeatures_TEST.cc +++ b/dartsim/src/JointFeatures_TEST.cc @@ -49,7 +49,7 @@ using namespace ignition; -using TestFeatureList = ignition::physics::FeatureList< +using TestFeatureList = physics::FeatureList< physics::dartsim::RetrieveWorld, physics::AttachFixedJointFeature, physics::DetachJointFeature, @@ -74,14 +74,14 @@ class JointFeaturesFixture : public ::testing::Test { protected: void SetUp() override { - ignition::plugin::Loader loader; + plugin::Loader loader; loader.LoadLib(dartsim_plugin_LIB); - ignition::plugin::PluginPtr dartsim = + plugin::PluginPtr dartsim = loader.Instantiate("ignition::physics::dartsim::Plugin"); this->engine = - ignition::physics::RequestEngine3d::From(dartsim); + physics::RequestEngine3d::From(dartsim); ASSERT_NE(nullptr, this->engine); } protected: TestEnginePtr engine; diff --git a/dartsim/src/KinematicsFeatures_TEST.cc b/dartsim/src/KinematicsFeatures_TEST.cc index 55b2e8f7e..dde7505a0 100644 --- a/dartsim/src/KinematicsFeatures_TEST.cc +++ b/dartsim/src/KinematicsFeatures_TEST.cc @@ -42,7 +42,7 @@ using namespace ignition; -using TestFeatureList = ignition::physics::FeatureList< +using TestFeatureList = physics::FeatureList< physics::ForwardStep, physics::GetEntities, physics::JointFrameSemantics, @@ -57,14 +57,14 @@ class KinematicsFeaturesFixture : public ::testing::Test { protected: void SetUp() override { - ignition::plugin::Loader loader; + plugin::Loader loader; loader.LoadLib(dartsim_plugin_LIB); - ignition::plugin::PluginPtr dartsim = + plugin::PluginPtr dartsim = loader.Instantiate("ignition::physics::dartsim::Plugin"); this->engine = - ignition::physics::RequestEngine3d::From(dartsim); + physics::RequestEngine3d::From(dartsim); ASSERT_NE(nullptr, this->engine); } protected: TestEnginePtr engine; diff --git a/dartsim/src/LinkFeatures_TEST.cc b/dartsim/src/LinkFeatures_TEST.cc index b66e8626f..f1efc8646 100644 --- a/dartsim/src/LinkFeatures_TEST.cc +++ b/dartsim/src/LinkFeatures_TEST.cc @@ -59,14 +59,14 @@ class LinkFeaturesFixture : public ::testing::Test { protected: void SetUp() override { - ignition::plugin::Loader loader; + plugin::Loader loader; loader.LoadLib(dartsim_plugin_LIB); - ignition::plugin::PluginPtr dartsim = + plugin::PluginPtr dartsim = loader.Instantiate("ignition::physics::dartsim::Plugin"); this->engine = - ignition::physics::RequestEngine3d::From(dartsim); + physics::RequestEngine3d::From(dartsim); ASSERT_NE(nullptr, this->engine); } protected: TestEnginePtr engine; @@ -102,7 +102,7 @@ class AssertVectorApprox const char *_mExpr, const char *_nExpr, Eigen::Vector3d _m, Eigen::Vector3d _n) { - if (ignition::physics::test::Equal(_m, _n, this->tol)) + if (physics::test::Equal(_m, _n, this->tol)) return ::testing::AssertionSuccess(); return ::testing::AssertionFailure() @@ -134,9 +134,9 @@ TEST_F(LinkFeaturesFixture, LinkForceTorque) linkSDF.SetInertial({massMatrix, math::Pose3d::Zero}); auto link = model->ConstructLink(linkSDF); - ignition::physics::ForwardStep::Input input; - ignition::physics::ForwardStep::State state; - ignition::physics::ForwardStep::Output output; + physics::ForwardStep::Input input; + physics::ForwardStep::State state; + physics::ForwardStep::Output output; AssertVectorApprox vectorPredicate(1e-4); diff --git a/dartsim/src/ShapeFeatures_TEST.cc b/dartsim/src/ShapeFeatures_TEST.cc index 951bb7d1b..f889b6417 100644 --- a/dartsim/src/ShapeFeatures_TEST.cc +++ b/dartsim/src/ShapeFeatures_TEST.cc @@ -56,7 +56,7 @@ using namespace ignition; -using TestFeatureList = ignition::physics::FeatureList< +using TestFeatureList = physics::FeatureList< physics::dartsim::RetrieveWorld, physics::AttachFixedJointFeature, physics::AddLinkExternalForceTorque, @@ -85,14 +85,14 @@ class ShapeFeaturesFixture : public ::testing::Test { protected: void SetUp() override { - ignition::plugin::Loader loader; + plugin::Loader loader; loader.LoadLib(dartsim_plugin_LIB); - ignition::plugin::PluginPtr dartsim = + plugin::PluginPtr dartsim = loader.Instantiate("ignition::physics::dartsim::Plugin"); this->engine = - ignition::physics::RequestEngine3d::From(dartsim); + physics::RequestEngine3d::From(dartsim); ASSERT_NE(nullptr, this->engine); } protected: TestEnginePtr engine; @@ -128,7 +128,7 @@ class AssertVectorApprox const char *_mExpr, const char *_nExpr, Eigen::Vector3d _m, Eigen::Vector3d _n) { - if (ignition::physics::test::Equal(_m, _n, this->tol)) + if (physics::test::Equal(_m, _n, this->tol)) return ::testing::AssertionSuccess(); return ::testing::AssertionFailure() @@ -160,9 +160,9 @@ TEST_F(ShapeFeaturesFixture, PrimarySlipCompliance) AssertVectorApprox vectorPredicate(1e-4); - ignition::physics::ForwardStep::Input input; - ignition::physics::ForwardStep::State state; - ignition::physics::ForwardStep::Output output; + physics::ForwardStep::Input input; + physics::ForwardStep::State state; + physics::ForwardStep::Output output; // Check that link is at rest { @@ -223,9 +223,9 @@ TEST_F(ShapeFeaturesFixture, SecondarySlipCompliance) AssertVectorApprox vectorPredicate(1e-4); - ignition::physics::ForwardStep::Input input; - ignition::physics::ForwardStep::State state; - ignition::physics::ForwardStep::Output output; + physics::ForwardStep::Input input; + physics::ForwardStep::State state; + physics::ForwardStep::Output output; // Check that link is at rest { diff --git a/src/FeatureList_TEST.cc b/src/FeatureList_TEST.cc index ce3ddc78c..0ba5f9bf3 100644 --- a/src/FeatureList_TEST.cc +++ b/src/FeatureList_TEST.cc @@ -218,7 +218,7 @@ TEST(FeatureList_TEST, ConflictsAndRequirements) // This is a regression test. We need to make sure that this FeatureList // compiles. - ignition::physics::FeatureList(); + FeatureList(); } TEST(FeatureList_TEST, Hierarchy) diff --git a/test/integration/DoublePendulum.cc b/test/integration/DoublePendulum.cc index acc1b5214..d4c092709 100644 --- a/test/integration/DoublePendulum.cc +++ b/test/integration/DoublePendulum.cc @@ -59,17 +59,17 @@ void DoublePendulum_TEST(ignition::plugin::PluginPtr _plugin) auto world = engine->GetWorld(0); - ignition::physics::ForwardStep::State state; - ignition::physics::ForwardStep::Output output; - ignition::physics::ForwardStep::Input input; + ForwardStep::State state; + ForwardStep::Output output; + ForwardStep::Input input; const std::chrono::duration dt(std::chrono::milliseconds(1)); - ignition::physics::TimeStep &timeStep = - input.Get(); + TimeStep &timeStep = + input.Get(); timeStep.dt = dt.count(); - ignition::physics::GeneralizedParameters &efforts = - input.Get(); + GeneralizedParameters &efforts = + input.Get(); efforts.dofs.push_back(0); efforts.dofs.push_back(1); efforts.forces.push_back(0.0); @@ -78,11 +78,11 @@ void DoublePendulum_TEST(ignition::plugin::PluginPtr _plugin) // No input on the first step, let's just see the output world->Step(output, state, input); - ASSERT_TRUE(output.Has()); - const auto positions0 = output.Get(); + ASSERT_TRUE(output.Has()); + const auto positions0 = output.Get(); - ASSERT_TRUE(output.Has()); - const auto poses0 = output.Get(); + ASSERT_TRUE(output.Has()); + const auto poses0 = output.Get(); // the double pendulum is initially fully inverted // and angles are defined as zero in this state @@ -116,7 +116,7 @@ void DoublePendulum_TEST(ignition::plugin::PluginPtr _plugin) unsigned int settleSteps = settleTime / dt; for (unsigned int i = 0; i < settleSteps; ++i) { - auto positions = output.Get(); + auto positions = output.Get(); double error0 = positions.positions[positions.dofs[0]] - target10; double error1 = positions.positions[positions.dofs[1]] - target11; @@ -127,15 +127,15 @@ void DoublePendulum_TEST(ignition::plugin::PluginPtr _plugin) } // expect joints are near target positions - ASSERT_TRUE(output.Has()); - auto positions1 = output.Get(); + ASSERT_TRUE(output.Has()); + auto positions1 = output.Get(); double angle10 = positions1.positions[positions1.dofs[0]]; double angle11 = positions1.positions[positions1.dofs[1]]; EXPECT_NEAR(target10, angle10, 1e-5); EXPECT_NEAR(target11, angle11, 1e-3); - ASSERT_TRUE(output.Has()); - const auto poses1 = output.Get(); + ASSERT_TRUE(output.Has()); + const auto poses1 = output.Get(); ASSERT_EQ(2u, poses1.entries.size()); for (const auto & worldPose : poses1.entries) { @@ -151,7 +151,7 @@ void DoublePendulum_TEST(ignition::plugin::PluginPtr _plugin) } // test recording the state and repeatability - ignition::physics::ForwardStep::State bookmark = state; + ForwardStep::State bookmark = state; std::vector errorHistory0; std::vector errorHistory1; @@ -168,7 +168,7 @@ void DoublePendulum_TEST(ignition::plugin::PluginPtr _plugin) for (unsigned int i = 0; i < settleSteps; ++i) { - auto positions = output.Get(); + auto positions = output.Get(); double error0 = positions.positions[positions.dofs[0]] - target20; double error1 = positions.positions[positions.dofs[1]] - target21; errorHistory0.push_back(error0); @@ -181,16 +181,16 @@ void DoublePendulum_TEST(ignition::plugin::PluginPtr _plugin) } // expect joints are near target positions again - ASSERT_TRUE(output.Has()); - auto positions2 = output.Get(); + ASSERT_TRUE(output.Has()); + auto positions2 = output.Get(); double angle20 = positions2.positions[positions2.dofs[0]]; double angle21 = positions2.positions[positions2.dofs[1]]; EXPECT_NEAR(target20, angle20, 1e-4); EXPECT_NEAR(target21, angle21, 1e-3); // // Go back to the bookmarked state and run through the steps again. - // ignition::physics::SetState *setState = - // _plugin->QueryInterface(); + // SetState *setState = + // _plugin->QueryInterface(); // ASSERT_TRUE(setState); // setState->SetStateTo(bookmark); @@ -205,7 +205,7 @@ void DoublePendulum_TEST(ignition::plugin::PluginPtr _plugin) // for (unsigned int i = 0; i < settleSteps; ++i) // { - // auto positions = output.Get(); + // auto positions = output.Get(); // double error0 = positions.positions[positions.dofs[0]] - target20; // double error1 = positions.positions[positions.dofs[1]] - target21; // EXPECT_DOUBLE_EQ(error0, errorHistory0[i]); @@ -218,8 +218,8 @@ void DoublePendulum_TEST(ignition::plugin::PluginPtr _plugin) // } // // expect joints are near target positions again - // ASSERT_TRUE(output.Has()); - // auto positions3 = output.Get(); + // ASSERT_TRUE(output.Has()); + // auto positions3 = output.Get(); // double angle30 = positions3.positions[positions3.dofs[0]]; // double angle31 = positions3.positions[positions3.dofs[1]]; // EXPECT_DOUBLE_EQ(angle20, angle30); diff --git a/test/integration/FeatureSystem.cc b/test/integration/FeatureSystem.cc index b50e81e95..c9c96bf5e 100644 --- a/test/integration/FeatureSystem.cc +++ b/test/integration/FeatureSystem.cc @@ -43,7 +43,7 @@ TEST(FeatureSystem, MockPluginInvalidFeatures) { // mismatch between 2d and 3d mock::MockEngine3dPtr engine = - ignition::physics::RequestEngine3d::From( + RequestEngine3d::From( LoadMockPlugin("mock::EntitiesPlugin2d")); EXPECT_EQ(nullptr, engine); } @@ -52,7 +52,7 @@ TEST(FeatureSystem, MockPluginInvalidFeatures) TEST(FeatureSystem, MockPlugin) { mock::MockEngine3dPtr engine = - ignition::physics::RequestEngine3d::From( + RequestEngine3d::From( LoadMockPlugin("mock::EntitiesPlugin3d")); EXPECT_EQ("Only one engine", engine->Name()); @@ -116,7 +116,7 @@ TEST(FeatureSystem, MockPlugin) TEST(FeatureSystem, MockCenterOfMass3d) { mock::MockEngine3dPtr engine = - ignition::physics::RequestEngine3d::From( + RequestEngine3d::From( LoadMockPlugin("mock::EntitiesPlugin3d")); mock::MockWorld3dPtr world = engine->GetWorld("Some world"); @@ -166,7 +166,7 @@ TEST(FeatureSystem, MockCenterOfMass3d) TEST(FeatureSystem, MockCenterOfMass2d) { mock::MockEngine2dPtr engine = - ignition::physics::RequestEngine2d::From( + RequestEngine2d::From( LoadMockPlugin("mock::EntitiesPlugin2d")); mock::MockWorld2dPtr world = engine->GetWorld("Some world"); diff --git a/tpe/lib/src/CollisionDetector_TEST.cc b/tpe/lib/src/CollisionDetector_TEST.cc index 895fa6f90..caa00da46 100644 --- a/tpe/lib/src/CollisionDetector_TEST.cc +++ b/tpe/lib/src/CollisionDetector_TEST.cc @@ -89,7 +89,7 @@ TEST(CollisionDetector, CheckCollisions) Entity &collisionAEnt = linkA->AddCollision(); Collision *collisionA = static_cast(&collisionAEnt); BoxShape boxShapeA; - boxShapeA.SetSize(ignition::math::Vector3d(4, 4, 4)); + boxShapeA.SetSize(math::Vector3d(4, 4, 4)); collisionA->SetShape(boxShapeA); // model B @@ -255,7 +255,7 @@ TEST(CollisionDetector, CheckStaticCollisionFiltering) Entity &collisionAEnt = linkA->AddCollision(); Collision *collisionA = static_cast(&collisionAEnt); BoxShape boxShapeA; - boxShapeA.SetSize(ignition::math::Vector3d(4, 4, 4)); + boxShapeA.SetSize(math::Vector3d(4, 4, 4)); collisionA->SetShape(boxShapeA); // model B @@ -266,7 +266,7 @@ TEST(CollisionDetector, CheckStaticCollisionFiltering) Entity &collisionBEnt = linkB->AddCollision(); Collision *collisionB = static_cast(&collisionBEnt); BoxShape boxShapeB; - boxShapeB.SetSize(ignition::math::Vector3d(4, 4, 4)); + boxShapeB.SetSize(math::Vector3d(4, 4, 4)); collisionB->SetShape(boxShapeB); // check collisions diff --git a/tpe/lib/src/Collision_TEST.cc b/tpe/lib/src/Collision_TEST.cc index d1bc6d1fa..8012500f0 100644 --- a/tpe/lib/src/Collision_TEST.cc +++ b/tpe/lib/src/Collision_TEST.cc @@ -60,11 +60,11 @@ TEST(Collision, BoxShape) { Collision collision; BoxShape boxShape; - boxShape.SetSize(ignition::math::Vector3d(0.5, 0.5, 0.5)); + boxShape.SetSize(math::Vector3d(0.5, 0.5, 0.5)); collision.SetShape(boxShape); auto result = collision.GetShape(); ASSERT_NE(nullptr, result); - EXPECT_EQ(ignition::math::Vector3d(0.25, 0.25, 0.25), + EXPECT_EQ(math::Vector3d(0.25, 0.25, 0.25), result->GetBoundingBox().Max()); } @@ -78,7 +78,7 @@ TEST(Collision, CylinderShape) collision.SetShape(cylinderShape); auto result = collision.GetShape(); ASSERT_NE(nullptr, result); - EXPECT_EQ(ignition::math::Vector3d(2.0, 2.0, 1.5), + EXPECT_EQ(math::Vector3d(2.0, 2.0, 1.5), result->GetBoundingBox().Max()); } @@ -91,7 +91,7 @@ TEST(Collision, SphereShape) collision.SetShape(sphereShape); auto result = collision.GetShape(); ASSERT_NE(nullptr, result); - EXPECT_EQ(ignition::math::Vector3d(2.0, 2.0, 2.0), + EXPECT_EQ(math::Vector3d(2.0, 2.0, 2.0), result->GetBoundingBox().Max()); } diff --git a/tpe/plugin/src/ShapeFeatures.cc b/tpe/plugin/src/ShapeFeatures.cc index 2fd585ad1..5f0f47965 100644 --- a/tpe/plugin/src/ShapeFeatures.cc +++ b/tpe/plugin/src/ShapeFeatures.cc @@ -268,7 +268,7 @@ LinearVector3d ShapeFeatures::GetMeshShapeScale( Identity ShapeFeatures::AttachMeshShape( const Identity &_linkID, const std::string &_name, - const ignition::common::Mesh &_mesh, + const common::Mesh &_mesh, const Pose3d &_pose, const LinearVector3d &_scale) {