Skip to content

Commit b452fc6

Browse files
committed
Bump to ign-msgs 7.1 / sdformat 11.1, Windows fixes (#758)
Signed-off-by: Louise Poubel <[email protected]>
1 parent 2fc9b6f commit b452fc6

File tree

8 files changed

+15
-13
lines changed

8 files changed

+15
-13
lines changed

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ endif()
3838
# Search for project-specific dependencies
3939
#============================================================================
4040

41-
ign_find_package(sdformat11 REQUIRED)
41+
ign_find_package(sdformat11 REQUIRED VERSION 11.1)
4242
set(SDF_VER ${sdformat11_VERSION_MAJOR})
4343

4444
#--------------------------------------
@@ -53,7 +53,7 @@ set(IGN_TRANSPORT_VER ${ignition-transport10_VERSION_MAJOR})
5353

5454
#--------------------------------------
5555
# Find ignition-msgs
56-
ign_find_package(ignition-msgs7 REQUIRED)
56+
ign_find_package(ignition-msgs7 REQUIRED VERSION 7.1)
5757
set(IGN_MSGS_VER ${ignition-msgs7_VERSION_MAJOR})
5858

5959
#--------------------------------------

include/ignition/gazebo/Util.hh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,8 @@ namespace ignition
170170
/// \return An Ignition Transport topic name based on the scoped name of
171171
/// the provided entity, or empty string if a topic name could not be
172172
/// generated.
173-
std::string topicFromScopedName(const Entity &_entity,
173+
std::string IGNITION_GAZEBO_VISIBLE topicFromScopedName(
174+
const Entity &_entity,
174175
const EntityComponentManager &_ecm,
175176
bool _excludeWorld = true);
176177

src/rendering/SceneManager.cc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1308,8 +1308,6 @@ rendering::ParticleEmitterPtr SceneManager::UpdateParticleEmitter(Entity _id,
13081308
if (data.key() == "particle_scatter_ratio" && data.value_size() > 0)
13091309
{
13101310
emitter->SetParticleScatterRatio(math::parseFloat(data.value(0)));
1311-
// TODO(anyone) Remove deprecated user data on ign-gazebo6
1312-
emitter->SetUserData(key, math::parseFloat(data.value(0)));
13131311
break;
13141312
}
13151313
}

src/systems/odometry_publisher/OdometryPublisher.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#include <vector>
2626

2727
#include <ignition/common/Profiler.hh>
28+
#include <ignition/math/Helpers.hh>
2829
#include <ignition/math/Pose3.hh>
2930
#include <ignition/math/Quaternion.hh>
3031
#include <ignition/math/RollingMean.hh>
@@ -233,8 +234,8 @@ void OdometryPublisherPrivate::UpdateOdometry(
233234

234235
double currentYaw = pose.Rot().Yaw();
235236
const double lastYaw = this->lastUpdatePose.Rot().Yaw();
236-
while (currentYaw < lastYaw - M_PI) currentYaw += 2 * M_PI;
237-
while (currentYaw > lastYaw + M_PI) currentYaw -= 2 * M_PI;
237+
while (currentYaw < lastYaw - IGN_PI) currentYaw += 2 * IGN_PI;
238+
while (currentYaw > lastYaw + IGN_PI) currentYaw -= 2 * IGN_PI;
238239
const float angularDiff = currentYaw - lastYaw;
239240

240241
// Get velocities in robotBaseFrame and add to message.

src/systems/odometry_publisher/OdometryPublisher.hh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ namespace systems
5252
/// `<odom_topic>`: Custom topic on which this system will publish odometry
5353
/// messages. This element is optional, and the default value is
5454
/// `/model/{name_of_model}/odometry`.
55-
class IGNITION_GAZEBO_VISIBLE OdometryPublisher
55+
class OdometryPublisher
5656
: public System,
5757
public ISystemConfigure,
5858
public ISystemPreUpdate,

src/systems/particle_emitter2/ParticleEmitter2.hh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ namespace systems
4545
/// 3. Copy ParticleEmitter2 to ParticleEmitter in Ignition G.
4646
/// 4. Deprecrate ParticleEmitter2 in Ignition G.
4747
/// 5. Remove ParticleEmitter2 in Ignition H.
48-
class IGNITION_GAZEBO_VISIBLE ParticleEmitter2
48+
class ParticleEmitter2
4949
: public System,
5050
public ISystemConfigure,
5151
public ISystemPreUpdate

test/integration/odometry_publisher.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
#include <gtest/gtest.h>
1919
#include <ignition/common/Console.hh>
20+
#include <ignition/common/Util.hh>
2021
#include <ignition/math/Pose3.hh>
2122
#include <ignition/transport/Node.hh>
2223

@@ -46,8 +47,8 @@ class OdometryPublisherTest : public ::testing::TestWithParam<int>
4647
protected: void SetUp() override
4748
{
4849
common::Console::SetVerbosity(4);
49-
setenv("IGN_GAZEBO_SYSTEM_PLUGIN_PATH",
50-
(std::string(PROJECT_BINARY_PATH) + "/lib").c_str(), 1);
50+
common::setenv("IGN_GAZEBO_SYSTEM_PLUGIN_PATH",
51+
(std::string(PROJECT_BINARY_PATH) + "/lib").c_str());
5152
}
5253

5354
/// \param[in] _sdfFile SDF file to load.

test/integration/particle_emitter2.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
#include <string>
2121

22+
#include <ignition/common/Util.hh>
2223
#include <ignition/math/Color.hh>
2324
#include <ignition/msgs/Utility.hh>
2425

@@ -41,8 +42,8 @@ class ParticleEmitter2Test : public ::testing::Test
4142
protected: void SetUp() override
4243
{
4344
ignition::common::Console::SetVerbosity(4);
44-
setenv("IGN_GAZEBO_SYSTEM_PLUGIN_PATH",
45-
(std::string(PROJECT_BINARY_PATH) + "/lib").c_str(), 1);
45+
common::setenv("IGN_GAZEBO_SYSTEM_PLUGIN_PATH",
46+
(std::string(PROJECT_BINARY_PATH) + "/lib").c_str());
4647
}
4748
public: void LoadWorld(const std::string &_path, bool _useLevels = false)
4849
{

0 commit comments

Comments
 (0)