Skip to content

Commit

Permalink
merged ign-gazebo6 to gz-sim7
Browse files Browse the repository at this point in the history
Signed-off-by: Nate Koenig <[email protected]>
  • Loading branch information
Nate Koenig committed Nov 11, 2022
2 parents 39520a1 + 216d5a5 commit 878625d
Show file tree
Hide file tree
Showing 137 changed files with 2,472 additions and 2,341 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
See the [Gazebo contributing guide](https://gazebosim.org/docs/all/contributing).
See [Gazebo's contribution guide](https://gazebosim.org/docs/all/contributing).
2,121 changes: 1,092 additions & 1,029 deletions Changelog.md

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions Migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,13 @@ message's header.
+ In the Hydrodynamics plugin, inverted the added mass contribution to make it
act in the correct direction.


## Gazebo Sim 6.11.X to 6.12.X

* **Modified**:
+ In the Hydrodynamics plugin, inverted the added mass contribution to make it
act in the correct direction.

## Gazebo Sim 6.1 to 6.2

* If no `<namespace>` is given to the `Thruster` plugin, the namespace now
Expand Down
5 changes: 0 additions & 5 deletions examples/worlds/tunnel.sdf
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
<?xml version="1.0" ?>
<!--
World containing a long tunnel and a vehicle.
Run with `--levels` for the tunnels to load and unload as the vehicle moves.
Use the WASDX keys to drive the vehicle.
-->
<sdf version="1.6">
<world name="diff_drive">
Expand Down
4 changes: 2 additions & 2 deletions src/Component_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ TEST_F(ComponentTest, OStream)
EXPECT_EQ("Mass: 0", ostr.str());
}

// Component with a gz::msgs type that gets serialized by the default
// Component with a msgs type that gets serialized by the default
// serializer
{
using Custom = components::Component<msgs::Int32, class CustomTag,
Expand Down Expand Up @@ -484,7 +484,7 @@ TEST_F(ComponentTest, IStream)
EXPECT_DOUBLE_EQ(200, comp.Data()->MassMatrix().Mass());
}

// Component with a gz::msgs type that gets deserialized by the message
// Component with a msgs type that gets deserialized by the message
// deserializer
{
using Custom = components::Component<msgs::Int32, class CustomTag,
Expand Down
56 changes: 28 additions & 28 deletions src/Conversions.cc
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,7 @@ msgs::Time gz::sim::convert(
{
msgs::Time out;

auto secNsec = gz::math::durationToSecNsec(_in);
auto secNsec = math::durationToSecNsec(_in);

out.set_sec(secNsec.first);
out.set_nsec(secNsec.second);
Expand Down Expand Up @@ -907,7 +907,7 @@ sdf::Atmosphere gz::sim::convert(const msgs::Atmosphere &_in)
void gz::sim::set(msgs::Time *_msg,
const std::chrono::steady_clock::duration &_in)
{
auto secNsec = gz::math::durationToSecNsec(_in);
auto secNsec = math::durationToSecNsec(_in);
_msg->set_sec(secNsec.first);
_msg->set_nsec(secNsec.second);
}
Expand Down Expand Up @@ -1062,17 +1062,17 @@ msgs::Sensor gz::sim::convert(const sdf::Sensor &_in)
msgs::MagnetometerSensor *sensor = out.mutable_magnetometer();
if (_in.MagnetometerSensor()->XNoise().Type() != sdf::NoiseType::NONE)
{
gz::sim::set(sensor->mutable_x_noise(),
sim::set(sensor->mutable_x_noise(),
_in.MagnetometerSensor()->XNoise());
}
if (_in.MagnetometerSensor()->YNoise().Type() != sdf::NoiseType::NONE)
{
gz::sim::set(sensor->mutable_y_noise(),
sim::set(sensor->mutable_y_noise(),
_in.MagnetometerSensor()->YNoise());
}
if (_in.MagnetometerSensor()->ZNoise().Type() != sdf::NoiseType::NONE)
{
gz::sim::set(sensor->mutable_z_noise(),
sim::set(sensor->mutable_z_noise(),
_in.MagnetometerSensor()->ZNoise());
}
}
Expand Down Expand Up @@ -1160,13 +1160,13 @@ msgs::Sensor gz::sim::convert(const sdf::Sensor &_in)
if (_in.AltimeterSensor()->VerticalPositionNoise().Type()
!= sdf::NoiseType::NONE)
{
gz::sim::set(sensor->mutable_vertical_position_noise(),
sim::set(sensor->mutable_vertical_position_noise(),
_in.AltimeterSensor()->VerticalPositionNoise());
}
if (_in.AltimeterSensor()->VerticalVelocityNoise().Type()
!= sdf::NoiseType::NONE)
{
gz::sim::set(sensor->mutable_vertical_velocity_noise(),
sim::set(sensor->mutable_vertical_velocity_noise(),
_in.AltimeterSensor()->VerticalVelocityNoise());
}
}
Expand All @@ -1185,7 +1185,7 @@ msgs::Sensor gz::sim::convert(const sdf::Sensor &_in)
if (_in.AirPressureSensor()->PressureNoise().Type()
!= sdf::NoiseType::NONE)
{
gz::sim::set(sensor->mutable_pressure_noise(),
sim::set(sensor->mutable_pressure_noise(),
_in.AirPressureSensor()->PressureNoise());
}
sensor->set_reference_altitude(
Expand All @@ -1206,38 +1206,38 @@ msgs::Sensor gz::sim::convert(const sdf::Sensor &_in)

if (sdfImu->LinearAccelerationXNoise().Type() != sdf::NoiseType::NONE)
{
gz::sim::set(
sim::set(
sensor->mutable_linear_acceleration()->mutable_x_noise(),
sdfImu->LinearAccelerationXNoise());
}
if (sdfImu->LinearAccelerationYNoise().Type() != sdf::NoiseType::NONE)
{
gz::sim::set(
sim::set(
sensor->mutable_linear_acceleration()->mutable_y_noise(),
sdfImu->LinearAccelerationYNoise());
}
if (sdfImu->LinearAccelerationZNoise().Type() != sdf::NoiseType::NONE)
{
gz::sim::set(
sim::set(
sensor->mutable_linear_acceleration()->mutable_z_noise(),
sdfImu->LinearAccelerationZNoise());
}

if (sdfImu->AngularVelocityXNoise().Type() != sdf::NoiseType::NONE)
{
gz::sim::set(
sim::set(
sensor->mutable_angular_velocity()->mutable_x_noise(),
sdfImu->AngularVelocityXNoise());
}
if (sdfImu->AngularVelocityYNoise().Type() != sdf::NoiseType::NONE)
{
gz::sim::set(
sim::set(
sensor->mutable_angular_velocity()->mutable_y_noise(),
sdfImu->AngularVelocityYNoise());
}
if (sdfImu->AngularVelocityZNoise().Type() != sdf::NoiseType::NONE)
{
gz::sim::set(
sim::set(
sensor->mutable_angular_velocity()->mutable_z_noise(),
sdfImu->AngularVelocityZNoise());
}
Expand Down Expand Up @@ -1271,7 +1271,7 @@ msgs::Sensor gz::sim::convert(const sdf::Sensor &_in)

if (sdfLidar->LidarNoise().Type() != sdf::NoiseType::NONE)
{
gz::sim::set(sensor->mutable_noise(), sdfLidar->LidarNoise());
sim::set(sensor->mutable_noise(), sdfLidar->LidarNoise());
}
sensor->set_horizontal_samples(sdfLidar->HorizontalScanSamples());
sensor->set_horizontal_resolution(sdfLidar->HorizontalScanResolution());
Expand Down Expand Up @@ -1318,17 +1318,17 @@ sdf::Sensor gz::sim::convert(const msgs::Sensor &_in)
{
if (_in.magnetometer().has_x_noise())
{
sensor.SetXNoise(gz::sim::convert<sdf::Noise>(
sensor.SetXNoise(sim::convert<sdf::Noise>(
_in.magnetometer().x_noise()));
}
if (_in.magnetometer().has_y_noise())
{
sensor.SetYNoise(gz::sim::convert<sdf::Noise>(
sensor.SetYNoise(sim::convert<sdf::Noise>(
_in.magnetometer().y_noise()));
}
if (_in.magnetometer().has_z_noise())
{
sensor.SetZNoise(gz::sim::convert<sdf::Noise>(
sensor.SetZNoise(sim::convert<sdf::Noise>(
_in.magnetometer().z_noise()));
}
}
Expand Down Expand Up @@ -1383,13 +1383,13 @@ sdf::Sensor gz::sim::convert(const msgs::Sensor &_in)
{
if (_in.altimeter().has_vertical_position_noise())
{
sensor.SetVerticalPositionNoise(gz::sim::convert<sdf::Noise>(
sensor.SetVerticalPositionNoise(sim::convert<sdf::Noise>(
_in.altimeter().vertical_position_noise()));
}

if (_in.altimeter().has_vertical_velocity_noise())
{
sensor.SetVerticalVelocityNoise(gz::sim::convert<sdf::Noise>(
sensor.SetVerticalVelocityNoise(sim::convert<sdf::Noise>(
_in.altimeter().vertical_velocity_noise()));
}
}
Expand All @@ -1408,7 +1408,7 @@ sdf::Sensor gz::sim::convert(const msgs::Sensor &_in)
{
if (_in.air_pressure().has_pressure_noise())
{
sensor.SetPressureNoise(gz::sim::convert<sdf::Noise>(
sensor.SetPressureNoise(sim::convert<sdf::Noise>(
_in.air_pressure().pressure_noise()));
}

Expand All @@ -1432,19 +1432,19 @@ sdf::Sensor gz::sim::convert(const msgs::Sensor &_in)
if (_in.imu().linear_acceleration().has_x_noise())
{
sensor.SetLinearAccelerationXNoise(
gz::sim::convert<sdf::Noise>(
sim::convert<sdf::Noise>(
_in.imu().linear_acceleration().x_noise()));
}
if (_in.imu().linear_acceleration().has_y_noise())
{
sensor.SetLinearAccelerationYNoise(
gz::sim::convert<sdf::Noise>(
sim::convert<sdf::Noise>(
_in.imu().linear_acceleration().y_noise()));
}
if (_in.imu().linear_acceleration().has_z_noise())
{
sensor.SetLinearAccelerationZNoise(
gz::sim::convert<sdf::Noise>(
sim::convert<sdf::Noise>(
_in.imu().linear_acceleration().z_noise()));
}
}
Expand All @@ -1454,19 +1454,19 @@ sdf::Sensor gz::sim::convert(const msgs::Sensor &_in)
if (_in.imu().angular_velocity().has_x_noise())
{
sensor.SetAngularVelocityXNoise(
gz::sim::convert<sdf::Noise>(
sim::convert<sdf::Noise>(
_in.imu().angular_velocity().x_noise()));
}
if (_in.imu().angular_velocity().has_y_noise())
{
sensor.SetAngularVelocityYNoise(
gz::sim::convert<sdf::Noise>(
sim::convert<sdf::Noise>(
_in.imu().angular_velocity().y_noise()));
}
if (_in.imu().angular_velocity().has_z_noise())
{
sensor.SetAngularVelocityZNoise(
gz::sim::convert<sdf::Noise>(
sim::convert<sdf::Noise>(
_in.imu().angular_velocity().z_noise()));
}
}
Expand Down Expand Up @@ -1523,7 +1523,7 @@ sdf::Sensor gz::sim::convert(const msgs::Sensor &_in)

if (_in.lidar().has_noise())
{
sensor.SetLidarNoise(gz::sim::convert<sdf::Noise>(
sensor.SetLidarNoise(sim::convert<sdf::Noise>(
_in.lidar().noise()));
}
}
Expand Down
28 changes: 14 additions & 14 deletions src/Conversions_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ TEST(Conversions, Light)
light.SetPoseRelativeTo("world");
light.SetCastShadows(true);
light.SetVisualize(true);
light.SetDiffuse(gz::math::Color(0.4f, 0.5f, 0.6f, 1.0));
light.SetSpecular(gz::math::Color(0.8f, 0.9f, 0.1f, 1.0));
light.SetDiffuse(math::Color(0.4f, 0.5f, 0.6f, 1.0));
light.SetSpecular(math::Color(0.8f, 0.9f, 0.1f, 1.0));
light.SetAttenuationRange(3.2);
light.SetConstantAttenuationFactor(0.5);
light.SetLinearAttenuationFactor(0.1);
Expand Down Expand Up @@ -246,11 +246,11 @@ TEST(Conversions, Time)
TEST(Conversions, Material)
{
sdf::Material material;
material.SetDiffuse(gz::math::Color(0.1f, 0.2f, 0.3f, 0.4f));
material.SetSpecular(gz::math::Color(0.5f, 0.6f, 0.7f, 0.8f));
material.SetAmbient(gz::math::Color(0.9f, 1.0f, 1.1f, 1.2f));
material.SetDiffuse(math::Color(0.1f, 0.2f, 0.3f, 0.4f));
material.SetSpecular(math::Color(0.5f, 0.6f, 0.7f, 0.8f));
material.SetAmbient(math::Color(0.9f, 1.0f, 1.1f, 1.2f));
material.SetShininess(0.5);
material.SetEmissive(gz::math::Color(1.3f, 1.4f, 1.5f, 1.6f));
material.SetEmissive(math::Color(1.3f, 1.4f, 1.5f, 1.6f));
material.SetLighting(true);
material.SetRenderOrder(2.5);
material.SetDoubleSided(true);
Expand Down Expand Up @@ -344,7 +344,7 @@ TEST(Conversions, GeometryBox)
geometry.SetType(sdf::GeometryType::BOX);

sdf::Box boxShape;
boxShape.SetSize(gz::math::Vector3d(1, 2, 3));
boxShape.SetSize(math::Vector3d(1, 2, 3));
geometry.SetBoxShape(boxShape);

auto geometryMsg = convert<msgs::Geometry>(geometry);
Expand Down Expand Up @@ -458,7 +458,7 @@ TEST(Conversions, GeometryMesh)
geometry.SetType(sdf::GeometryType::MESH);

sdf::Mesh meshShape;
meshShape.SetScale(gz::math::Vector3d(1, 2, 3));
meshShape.SetScale(math::Vector3d(1, 2, 3));
meshShape.SetUri("file://watermelon");
meshShape.SetSubmesh("grape");
meshShape.SetCenterSubmesh(true);
Expand Down Expand Up @@ -489,8 +489,8 @@ TEST(Conversions, GeometryPlane)
geometry.SetType(sdf::GeometryType::PLANE);

sdf::Plane planeShape;
planeShape.SetSize(gz::math::Vector2d(1, 2));
planeShape.SetNormal(gz::math::Vector3d::UnitY);
planeShape.SetSize(math::Vector2d(1, 2));
planeShape.SetNormal(math::Vector3d::UnitY);
geometry.SetPlaneShape(planeShape);

auto geometryMsg = convert<msgs::Geometry>(geometry);
Expand Down Expand Up @@ -684,8 +684,8 @@ TEST(Conversions, JointAxis)
TEST(Conversions, Scene)
{
sdf::Scene scene;
scene.SetAmbient(gz::math::Color(0.1f, 0.2f, 0.3f, 0.4f));
scene.SetBackground(gz::math::Color(0.5f, 0.6f, 0.7f, 0.8f));
scene.SetAmbient(math::Color(0.1f, 0.2f, 0.3f, 0.4f));
scene.SetBackground(math::Color(0.5f, 0.6f, 0.7f, 0.8f));
scene.SetShadows(true);
scene.SetGrid(true);
scene.SetOriginVisual(true);
Expand Down Expand Up @@ -777,7 +777,7 @@ TEST(Conversions, MagnetometerSensor)
sensor.SetType(sdf::SensorType::MAGNETOMETER);
sensor.SetUpdateRate(12.4);
sensor.SetTopic("my_topic");
sensor.SetRawPose(gz::math::Pose3d(1, 2, 3, 0, 0, 0));
sensor.SetRawPose(math::Pose3d(1, 2, 3, 0, 0, 0));

sdf::Noise noise;
noise.SetType(sdf::NoiseType::GAUSSIAN);
Expand Down Expand Up @@ -817,7 +817,7 @@ TEST(Conversions, AltimeterSensor)
sensor.SetType(sdf::SensorType::ALTIMETER);
sensor.SetUpdateRate(12.4);
sensor.SetTopic("my_topic");
sensor.SetRawPose(gz::math::Pose3d(1, 2, 3, 0, 0, 0));
sensor.SetRawPose(math::Pose3d(1, 2, 3, 0, 0, 0));

sdf::Noise noise;
noise.SetType(sdf::NoiseType::GAUSSIAN);
Expand Down
Loading

0 comments on commit 878625d

Please sign in to comment.