diff --git a/.github/ci/packages.apt b/.github/ci/packages.apt index 0a88551c7..c5fc1b3b0 100644 --- a/.github/ci/packages.apt +++ b/.github/ci/packages.apt @@ -5,4 +5,4 @@ libignition-common3-dev libignition-math6-dev libignition-math6-eigen3-dev libignition-plugin-dev -libsdformat10-dev +libsdformat11-dev diff --git a/CMakeLists.txt b/CMakeLists.txt index f5f763ef3..7296ec94b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -56,7 +56,7 @@ ign_find_package(EIGEN3 REQUIRED) #-------------------------------------- # Find SDFormat for the SDF features -ign_find_package(sdformat10 +ign_find_package(sdformat11 REQUIRED_BY sdf dartsim tpe) #-------------------------------------- diff --git a/bitbucket-pipelines.yml b/bitbucket-pipelines.yml index 7d3439b03..f0cdc180e 100644 --- a/bitbucket-pipelines.yml +++ b/bitbucket-pipelines.yml @@ -35,7 +35,7 @@ pipelines: libdart6-dev libdart6-utils-urdf-dev libbenchmark-dev - libsdformat10-dev + libsdformat11-dev # libsdformat (uncomment if a specific branch is needed) #- apt install -y # libtinyxml-dev diff --git a/dartsim/src/EntityManagementFeatures.cc b/dartsim/src/EntityManagementFeatures.cc index 2ca9d27d0..69cc1ff77 100644 --- a/dartsim/src/EntityManagementFeatures.cc +++ b/dartsim/src/EntityManagementFeatures.cc @@ -19,6 +19,7 @@ #include #include +#include #include #include diff --git a/dartsim/src/JointFeatures_TEST.cc b/dartsim/src/JointFeatures_TEST.cc index 3d30b2429..ef77cecb3 100644 --- a/dartsim/src/JointFeatures_TEST.cc +++ b/dartsim/src/JointFeatures_TEST.cc @@ -512,8 +512,8 @@ TEST_F(JointFeaturesFixture, JointAttachDetachSpawnedModel) sdf::Root root; sdf::Errors errors = root.LoadSdfString(model1Str); ASSERT_TRUE(errors.empty()) << errors.front(); - ASSERT_NE(nullptr, root.ModelByIndex(0)); - world->ConstructModel(*root.ModelByIndex(0)); + ASSERT_NE(nullptr, root.Model()); + world->ConstructModel(*root.Model()); } world->Step(output, state, input); @@ -522,8 +522,8 @@ TEST_F(JointFeaturesFixture, JointAttachDetachSpawnedModel) sdf::Root root; sdf::Errors errors = root.LoadSdfString(model2Str); ASSERT_TRUE(errors.empty()) << errors.front(); - ASSERT_NE(nullptr, root.ModelByIndex(0)); - world->ConstructModel(*root.ModelByIndex(0)); + ASSERT_NE(nullptr, root.Model()); + world->ConstructModel(*root.Model()); } const std::string modelName1{"M1"}; diff --git a/dartsim/src/SDFFeatures.cc b/dartsim/src/SDFFeatures.cc index 401fe9a5d..c08471541 100644 --- a/dartsim/src/SDFFeatures.cc +++ b/dartsim/src/SDFFeatures.cc @@ -117,7 +117,20 @@ static void CopyStandardJointAxisProperties( const int _index, Properties &_properties, const ::sdf::JointAxis *_sdfAxis) { +#ifndef _WIN32 +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#else +# pragma warning(push) +# pragma warning(disable: 4996) +#endif + // TODO(anyone): stop using this deprecated function _properties.mInitialPositions[_index] = _sdfAxis->InitialPosition(); +#ifndef _WIN32 +# pragma GCC diagnostic pop +#else +# pragma warning(pop) +#endif _properties.mDampingCoefficients[_index] = _sdfAxis->Damping(); _properties.mFrictions[_index] = _sdfAxis->Friction(); _properties.mRestPositions[_index] = _sdfAxis->SpringReference(); diff --git a/dartsim/worlds/test.world b/dartsim/worlds/test.world index 7f5282ed6..8d53332af 100644 --- a/dartsim/worlds/test.world +++ b/dartsim/worlds/test.world @@ -221,6 +221,7 @@ base upper_link + 1.5706796 1.0 0 0 @@ -233,6 +234,7 @@ upper_link lower_link + -0.429462 1.0 0 0 diff --git a/tpe/plugin/worlds/test.world b/tpe/plugin/worlds/test.world index 7f5282ed6..edbbe74cf 100644 --- a/tpe/plugin/worlds/test.world +++ b/tpe/plugin/worlds/test.world @@ -221,7 +221,6 @@ base upper_link - 1.5706796 1.0 0 0 3.0 @@ -233,7 +232,6 @@ upper_link lower_link - -0.429462 1.0 0 0 3.0 diff --git a/tutorials/05_plugin_loading.md b/tutorials/05_plugin_loading.md index e3ddd75f2..e75818c5f 100644 --- a/tutorials/05_plugin_loading.md +++ b/tutorials/05_plugin_loading.md @@ -95,7 +95,7 @@ for (const std::string &name : pluginNames) } ``` -### Setup CMakeLists.txt for building (Version: Dome, ign-physics3) +### Setup CMakeLists.txt for building (Version: Dome, ign-physics4) Now create a file named `CMakeLists.txt` with your favorite editor and add these lines for finding `ign-plugin` and `ign-physics` dependencies in Dome release: diff --git a/tutorials/06-physics-simulation-concepts.md b/tutorials/06-physics-simulation-concepts.md index f6db933e5..cc2c2b450 100644 --- a/tutorials/06-physics-simulation-concepts.md +++ b/tutorials/06-physics-simulation-concepts.md @@ -70,9 +70,9 @@ second in Z-axis. Note that the mechanism to move the car is different depending on the used physics engine. Using [dartsim](https://github.com/ignitionrobotics/ign-physics/tree/master/dartsim), -the car is moved by applying force on the joints, please see [DiffDrive.cc](https://github.com/ignitionrobotics/ign-gazebo/blob/ign-gazebo4/src/systems/diff_drive/DiffDrive.cc#L333) code. +the car is moved by applying force on the joints, please see [DiffDrive.cc](https://github.com/ignitionrobotics/ign-gazebo/blob/ign-gazebo5/src/systems/diff_drive/DiffDrive.cc#L333) code. Using [TPE](https://github.com/ignitionrobotics/ign-physics/tree/main/tpe), -TPE directly sets model velocity in [VelocityControl.cc](https://github.com/ignitionrobotics/ign-gazebo/blob/ign-gazebo4/src/systems/velocity_control/VelocityControl.cc#L117) code. +TPE directly sets model velocity in [VelocityControl.cc](https://github.com/ignitionrobotics/ign-gazebo/blob/ign-gazebo5/src/systems/velocity_control/VelocityControl.cc#L117) code. #### Monitoring the model and its links pose @@ -137,7 +137,7 @@ and the blades will stop after some time due to friction. The command applies a constant torque to the rotor rod, together with the mechanism to compute the upward/downward lift and drag force due to the wind pressure simulation supported by Ignition Physics, the cube is lifted. -For more detail, please see the [LiftDrag.cc](https://github.com/ignitionrobotics/ign-gazebo/blob/ign-gazebo4/src/systems/lift_drag/LiftDrag.cc) +For more detail, please see the [LiftDrag.cc](https://github.com/ignitionrobotics/ign-gazebo/blob/ign-gazebo5/src/systems/lift_drag/LiftDrag.cc) code. ### Buoyancy @@ -152,7 +152,7 @@ contains the following three models: Please download the Buoyancy demo to your home folder by: ```bash -wget https://raw.githubusercontent.com/ignitionrobotics/ign-gazebo/ign-gazebo4/examples/worlds/buoyancy.sdf -P ~ +wget https://raw.githubusercontent.com/ignitionrobotics/ign-gazebo/ign-gazebo5/examples/worlds/buoyancy.sdf -P ~ ``` Like above, please start the Buoyancy demo on Ignition Gazebo by: @@ -171,7 +171,7 @@ simulating fluid density and applying the force on the object in the fluid proportional to its volume. Hence, you can change the model buoyancy by modifying its inertia, please see [link specification](http://sdformat.org/spec?ver=1.7&elem=link). For more detail on simulating buoyancy, please see the -[Buoyancy.cc](https://github.com/ignitionrobotics/ign-gazebo/blob/ign-gazebo4/src/systems/buoyancy/Buoyancy.cc) +[Buoyancy.cc](https://github.com/ignitionrobotics/ign-gazebo/blob/ign-gazebo5/src/systems/buoyancy/Buoyancy.cc) code. ### Pendulum @@ -209,7 +209,7 @@ inertia to control object velocity. Please download the Multicopter demo to your home folder by: ```bash -wget https://raw.githubusercontent.com/ignitionrobotics/ign-gazebo/ign-gazebo4/examples/worlds/multicopter_velocity_control.sdf -P ~ +wget https://raw.githubusercontent.com/ignitionrobotics/ign-gazebo/ign-gazebo5/examples/worlds/multicopter_velocity_control.sdf -P ~ ``` and start the Multicopter demo on Ignition Gazebo by: @@ -238,4 +238,4 @@ Do the same for the `X4` multicopter. After pressing the Play button, you will s both of the multicopters will ascend, this demonstrates how the physics engine utilizes model kinematics and dynamics to support simulating complex model and its controller. For more detail about the multicopter controller, please see -[MulticopterVelocityControl.cc](https://github.com/ignitionrobotics/ign-gazebo/blob/ign-gazebo4/src/systems/multicopter_control/MulticopterVelocityControl.cc). +[MulticopterVelocityControl.cc](https://github.com/ignitionrobotics/ign-gazebo/blob/ign-gazebo5/src/systems/multicopter_control/MulticopterVelocityControl.cc). diff --git a/tutorials/07-implementing-a-physics-plugin.md b/tutorials/07-implementing-a-physics-plugin.md index d861a15bf..9fbc91fe4 100644 --- a/tutorials/07-implementing-a-physics-plugin.md +++ b/tutorials/07-implementing-a-physics-plugin.md @@ -120,7 +120,7 @@ a plugin. - The third argument is the `FeatureList`, specifying all the features that this plugin provides, i.e. `HelloWorldFeatureList` -### Setup CMakeLists.txt for building (Version: Dome, ign-physics3) +### Setup CMakeLists.txt for building (Version: Dome, ign-physics4) Now create a file named `CMakeLists.txt` with your favorite editor and add these lines for finding `ign-plugin` and `ign-physics` dependencies for Dome release: