Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump in edifice: sdformat11 #191

Merged
merged 5 commits into from
Jan 16, 2021
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ci/packages.apt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ libignition-common3-dev
libignition-math6-dev
libignition-math6-eigen3-dev
libignition-plugin-dev
libsdformat10-dev
libsdformat11-dev
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)

#--------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion bitbucket-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions dartsim/src/EntityManagementFeatures.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

#include <memory>
#include <string>
#include <unordered_map>

#include <dart/config.hpp>
#include <dart/collision/ode/OdeCollisionDetector.hpp>
Expand Down
8 changes: 4 additions & 4 deletions dartsim/src/JointFeatures_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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"};
Expand Down
1 change: 0 additions & 1 deletion dartsim/src/SDFFeatures.cc
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ static void CopyStandardJointAxisProperties(
const int _index, Properties &_properties,
const ::sdf::JointAxis *_sdfAxis)
{
_properties.mInitialPositions[_index] = _sdfAxis->InitialPosition();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is deprecated but still functional; so I would keep this line and suppress its deprecation warnings (currently there are test failures because this was removed)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test has been fixed. I followed the approach being taken on #189.

I can suppress the warning instead if that's preferred. I'm not sure if there's a new approach to use or if this feature will just disappear when we use SDF 12. SDFormat's migration guide didn't list any replacements. Are we sure we want to remove the feature?

CC @azeey

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the replacement may be using the <state> element, but until we've articulated that I'd like to keep the feature working, since it is only deprecated at this point, not disabled. I'll add a comment to that effect on #189 as well.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

macro to suppress deprecation warnings in gazebosim/gz-utils#5

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suppressing the warning in a more traditional style while this library doesn't depend on ign-utils yet. I'd like to merge this ASAP to unblock upstream.

35ce927

_properties.mDampingCoefficients[_index] = _sdfAxis->Damping();
_properties.mFrictions[_index] = _sdfAxis->Friction();
_properties.mRestPositions[_index] = _sdfAxis->SpringReference();
Expand Down
1 change: 0 additions & 1 deletion dartsim/src/SDFFeatures_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ TEST(SDFFeatures_TEST, CheckDartsimData)
double upper, double maxForce, double maxVelocity)
{
EXPECT_DOUBLE_EQ(initialPos, dof->getPosition());
EXPECT_DOUBLE_EQ(initialPos, dof->getInitialPosition());
EXPECT_DOUBLE_EQ(damping, dof->getDampingCoefficient());
EXPECT_DOUBLE_EQ(friction, dof->getCoulombFriction());
EXPECT_DOUBLE_EQ(springRest, dof->getRestPosition());
Expand Down
2 changes: 1 addition & 1 deletion tutorials/05_plugin_loading.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
14 changes: 7 additions & 7 deletions tutorials/06-physics-simulation-concepts.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note to self: check that these line numbers are still accurate

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

they aren't, but I'll open an issue for that

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

Expand Down Expand Up @@ -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
Expand All @@ -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:
Expand All @@ -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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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).
2 changes: 1 addition & 1 deletion tutorials/07-implementing-a-physics-plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down