Skip to content

Commit

Permalink
Bump to ign-msgs 7.1 / sdformat 11.1, Windows fixes (#758)
Browse files Browse the repository at this point in the history
Signed-off-by: Louise Poubel <[email protected]>
  • Loading branch information
chapulina committed May 4, 2021
1 parent 2fc9b6f commit f9ab069
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 9 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ endif()
# Search for project-specific dependencies
#============================================================================

ign_find_package(sdformat11 REQUIRED)
ign_find_package(sdformat11 REQUIRED VERSION 11.1)
set(SDF_VER ${sdformat11_VERSION_MAJOR})

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

#--------------------------------------
# Find ignition-msgs
ign_find_package(ignition-msgs7 REQUIRED)
ign_find_package(ignition-msgs7 REQUIRED VERSION 7.1)
set(IGN_MSGS_VER ${ignition-msgs7_VERSION_MAJOR})

#--------------------------------------
Expand Down
3 changes: 2 additions & 1 deletion include/ignition/gazebo/Util.hh
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,8 @@ namespace ignition
/// \return An Ignition Transport topic name based on the scoped name of
/// the provided entity, or empty string if a topic name could not be
/// generated.
std::string topicFromScopedName(const Entity &_entity,
std::string IGNITION_GAZEBO_VISIBLE topicFromScopedName(
const Entity &_entity,
const EntityComponentManager &_ecm,
bool _excludeWorld = true);

Expand Down
5 changes: 3 additions & 2 deletions src/systems/odometry_publisher/OdometryPublisher.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include <vector>

#include <ignition/common/Profiler.hh>
#include <ignition/math/Helpers.hh>
#include <ignition/math/Pose3.hh>
#include <ignition/math/Quaternion.hh>
#include <ignition/math/RollingMean.hh>
Expand Down Expand Up @@ -233,8 +234,8 @@ void OdometryPublisherPrivate::UpdateOdometry(

double currentYaw = pose.Rot().Yaw();
const double lastYaw = this->lastUpdatePose.Rot().Yaw();
while (currentYaw < lastYaw - M_PI) currentYaw += 2 * M_PI;
while (currentYaw > lastYaw + M_PI) currentYaw -= 2 * M_PI;
while (currentYaw < lastYaw - IGN_PI) currentYaw += 2 * IGN_PI;
while (currentYaw > lastYaw + IGN_PI) currentYaw -= 2 * IGN_PI;
const float angularDiff = currentYaw - lastYaw;

// Get velocities in robotBaseFrame and add to message.
Expand Down
5 changes: 3 additions & 2 deletions test/integration/odometry_publisher.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

#include <gtest/gtest.h>
#include <ignition/common/Console.hh>
#include <ignition/common/Util.hh>
#include <ignition/math/Pose3.hh>
#include <ignition/transport/Node.hh>

Expand Down Expand Up @@ -46,8 +47,8 @@ class OdometryPublisherTest : public ::testing::TestWithParam<int>
protected: void SetUp() override
{
common::Console::SetVerbosity(4);
setenv("IGN_GAZEBO_SYSTEM_PLUGIN_PATH",
(std::string(PROJECT_BINARY_PATH) + "/lib").c_str(), 1);
common::setenv("IGN_GAZEBO_SYSTEM_PLUGIN_PATH",
(std::string(PROJECT_BINARY_PATH) + "/lib").c_str());
}

/// \param[in] _sdfFile SDF file to load.
Expand Down
5 changes: 3 additions & 2 deletions test/integration/particle_emitter2.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

#include <string>

#include <ignition/common/Util.hh>
#include <ignition/math/Color.hh>
#include <ignition/msgs/Utility.hh>

Expand All @@ -41,8 +42,8 @@ class ParticleEmitter2Test : public ::testing::Test
protected: void SetUp() override
{
ignition::common::Console::SetVerbosity(4);
setenv("IGN_GAZEBO_SYSTEM_PLUGIN_PATH",
(std::string(PROJECT_BINARY_PATH) + "/lib").c_str(), 1);
common::setenv("IGN_GAZEBO_SYSTEM_PLUGIN_PATH",
(std::string(PROJECT_BINARY_PATH) + "/lib").c_str());
}
public: void LoadWorld(const std::string &_path, bool _useLevels = false)
{
Expand Down

0 comments on commit f9ab069

Please sign in to comment.