From e181d3e28e107ad7f2c539914469443593f9df23 Mon Sep 17 00:00:00 2001 From: Franco Cipollone <53065142+francocipollone@users.noreply.github.com> Date: Thu, 19 Aug 2021 19:23:06 -0300 Subject: [PATCH 1/5] Publish performance sensor metrics. (#146) Signed-off-by: Franco Cipollone Co-authored-by: Louise Poubel --- include/ignition/sensors/Sensor.hh | 15 ++++ src/Sensor.cc | 107 ++++++++++++++++++++++++++++- src/Sensor_TEST.cc | 88 +++++++++++++++++++++++- 3 files changed, 206 insertions(+), 4 deletions(-) diff --git a/include/ignition/sensors/Sensor.hh b/include/ignition/sensors/Sensor.hh index 3fa15c06..fa8fe4ab 100644 --- a/include/ignition/sensors/Sensor.hh +++ b/include/ignition/sensors/Sensor.hh @@ -27,6 +27,7 @@ #pragma warning(pop) #endif +#include #include #include @@ -146,6 +147,14 @@ namespace ignition /// \return True if a valid topic was set. public: bool SetTopic(const std::string &_topic); + /// \brief Get flag state for enabling performance metrics publication. + /// \return True if performance metrics are enabled, false otherwise. + public: bool EnableMetrics() const; + + /// \brief Set flag to enable publishing performance metrics + /// \param[in] _enableMetrics True to enable. + public: void SetEnableMetrics(bool _enableMetrics); + /// \brief Get parent link of the sensor. /// \return Parent link of sensor. public: std::string Parent() const; @@ -180,6 +189,12 @@ namespace ignition public: void AddSequence(ignition::msgs::Header *_msg, const std::string &_seqKey = "default"); + /// \brief Publishes information about the performance of the sensor. + /// This method is called by Update(). + /// \param[in] _now Current time. + public: void PublishMetrics( + const std::chrono::duration &_now); + IGN_COMMON_WARN_IGNORE__DLL_INTERFACE_MISSING /// \internal /// \brief Data pointer for private data diff --git a/src/Sensor.cc b/src/Sensor.cc index c4486116..14df12fb 100644 --- a/src/Sensor.cc +++ b/src/Sensor.cc @@ -16,17 +16,18 @@ */ #include "ignition/sensors/Sensor.hh" + +#include #include #include + #include #include +#include #include -#include - using namespace ignition::sensors; - class ignition::sensors::SensorPrivate { /// \brief Populates fields from a DOM @@ -37,6 +38,10 @@ class ignition::sensors::SensorPrivate /// \return True if a valid topic was set. public: bool SetTopic(const std::string &_topic); + /// \brief Publishes information about the performance of the sensor. + /// \param[in] _now Current simulation time. + public: void PublishMetrics(const std::chrono::duration &_now); + /// \brief id given to sensor when constructed public: SensorId id; @@ -55,12 +60,27 @@ class ignition::sensors::SensorPrivate /// \brief Pose of the sensor public: ignition::math::Pose3d pose; + /// \brief Flag to enable publishing performance metrics. + public: bool enableMetrics{false}; + /// \brief How many times the sensor will generate data per second public: double updateRate = 0.0; /// \brief What sim time should this sensor update at public: ignition::common::Time nextUpdateTime; + /// \brief Last steady clock time reading from last Update call. + public: std::chrono::time_point lastRealTime; + + /// \brief Last sim time at Update call. + public: std::chrono::duration lastUpdateTime{0}; + + /// \brief Transport node. + public: ignition::transport::Node node; + + /// \brief Publishes the PerformanceSensorMetrics message. + public: ignition::transport::Node::Publisher performanceSensorMetricsPub; + /// \brief SDF element with sensor information. public: sdf::ElementPtr sdf = nullptr; @@ -110,6 +130,8 @@ bool SensorPrivate::PopulateFromSDF(const sdf::Sensor &_sdf) } this->updateRate = _sdf.UpdateRate(); + + this->enableMetrics = _sdf.EnableMetrics(); return true; } @@ -196,6 +218,79 @@ bool SensorPrivate::SetTopic(const std::string &_topic) return true; } +////////////////////////////////////////////////// +bool Sensor::EnableMetrics() const +{ + return this->dataPtr->enableMetrics; +} + + +////////////////////////////////////////////////// +void Sensor::SetEnableMetrics(bool _enableMetrics) +{ + this->dataPtr->enableMetrics = _enableMetrics; +} + +////////////////////////////////////////////////// +void Sensor::PublishMetrics(const std::chrono::duration &_now) +{ + return this->dataPtr->PublishMetrics(_now); +} + +////////////////////////////////////////////////// +void SensorPrivate::PublishMetrics(const std::chrono::duration &_now) +{ + if(!this->performanceSensorMetricsPub) + { + const auto validTopic = transport::TopicUtils::AsValidTopic( + this->topic + "/performance_metrics"); + if (validTopic.empty()) + { + ignerr << "Failed to set metrics sensor topic [" << topic << "]" << + std::endl; + return; + } + this->performanceSensorMetricsPub = + node.Advertise(validTopic); + } + if (!performanceSensorMetricsPub || + !performanceSensorMetricsPub.HasConnections()) + { + return; + } + + // Computes simulation update rate and real update rate. + double simUpdateRate; + double realUpdateRate; + const auto clockNow = std::chrono::steady_clock::now(); + // If lastUpdateTime == 0 means it wasn't initialized yet. + if(this->lastUpdateTime.count() > 0) + { + const double diffSimUpdate = _now.count() - + this->lastUpdateTime.count(); + simUpdateRate = 1.0 / diffSimUpdate; + const double diffRealUpdate = + std::chrono::duration_cast>( + clockNow - this->lastRealTime).count(); + realUpdateRate = diffRealUpdate < std::numeric_limits::epsilon() ? + std::numeric_limits::infinity() : 1.0 / diffRealUpdate; + } + + // Update last time values. + this->lastUpdateTime = _now; + this->lastRealTime = clockNow; + + // Fill performance sensor metrics message. + msgs::PerformanceSensorMetrics performanceSensorMetricsMsg; + performanceSensorMetricsMsg.set_name(this->name); + performanceSensorMetricsMsg.set_real_update_rate(realUpdateRate); + performanceSensorMetricsMsg.set_sim_update_rate(simUpdateRate); + performanceSensorMetricsMsg.set_nominal_update_rate(this->updateRate); + + // Publish data + performanceSensorMetricsPub.Publish(performanceSensorMetricsMsg); +} + ////////////////////////////////////////////////// ignition::math::Pose3d Sensor::Pose() const { @@ -256,6 +351,12 @@ bool Sensor::Update(const ignition::common::Time &_now, // Make the update happen result = this->Update(_now); + // Publish metrics + if (this->EnableMetrics()) + { + this->PublishMetrics(std::chrono::duration(_now.Double())); + } + if (!_force && this->dataPtr->updateRate > 0.0) { // Update the time the plugin should be loaded diff --git a/src/Sensor_TEST.cc b/src/Sensor_TEST.cc index 9b4e7581..d9157ec8 100644 --- a/src/Sensor_TEST.cc +++ b/src/Sensor_TEST.cc @@ -14,11 +14,27 @@ * limitations under the License. * */ +#include + +#include +#include + #include +#ifdef _WIN32 +#pragma warning(push) +#pragma warning(disable: 4005) +#pragma warning(disable: 4251) +#endif +#include +#ifdef _WIN32 +#pragma warning(pop) +#endif + #include +#include #include -#include +#include using namespace ignition; using namespace sensors; @@ -124,6 +140,76 @@ TEST(Sensor_TEST, Topic) EXPECT_FALSE(sensor.SetTopic("")); } +class SensorUpdate : public ::testing::Test +{ + // Documentation inherited + protected: void SetUp() override + { + ignition::common::Console::SetVerbosity(4); + node.Subscribe(kPerformanceMetricTopic, + &SensorUpdate::OnPerformanceMetric, this); + } + + // Callback function for the performance metric topic. + protected: void OnPerformanceMetric( + const ignition::msgs::PerformanceSensorMetrics &_msg) + { + EXPECT_EQ(kSensorName, _msg.name()); + performanceMetricsMsgsCount++; + } + + // Sensor name. + protected: const std::string kSensorName{"sensor_test"}; + // Sensor topic. + protected: const std::string kSensorTopic{"/sensor_test"}; + // Enable metrics flag. + protected: const bool kEnableMetrics{true}; + // Topic where performance metrics are published. + protected: const std::string kPerformanceMetricTopic{ + kSensorTopic + "/performance_metrics"}; + // Number of messages to be published. + protected: const unsigned int kNumberOfMessages{10}; + // Counter for performance metrics messages published. + protected: std::atomic performanceMetricsMsgsCount{0}; + // Transport node. + protected: transport::Node node; +}; + +////////////////////////////////////////////////// +TEST_F(SensorUpdate, Update) +{ + // Create sensor. + sdf::Sensor sdfSensor; + sdfSensor.SetName(kSensorName); + sdfSensor.SetTopic(kSensorTopic); + sdfSensor.SetEnableMetrics(kEnableMetrics); + std::unique_ptr sensor = std::make_unique(); + sensor->Load(sdfSensor); + ASSERT_EQ(kSensorTopic, sensor->Topic()); + ASSERT_EQ(kEnableMetrics, sensor->EnableMetrics()); + + // Call Update() method kNumberOfMessages times. + // For each call there is also a call to Sensor::PublishMetrics() that + // publishes metrics in the correspondant topic. + for (int sec = 0 ; sec < static_cast(kNumberOfMessages) ; ++sec) + { + common::Time now{sec, 0 /*nsec*/}; + sensor->Update(now, true); + } + + int sleep = 0; + const int maxSleep = 30; + while (performanceMetricsMsgsCount < kNumberOfMessages && sleep < maxSleep) + { + std::this_thread::sleep_for(std::chrono::milliseconds(100)); + sleep++; + } + ASSERT_EQ(kNumberOfMessages, performanceMetricsMsgsCount); + + auto testSensor = dynamic_cast(sensor.get()); + EXPECT_EQ(testSensor->updateCount, performanceMetricsMsgsCount); +} + ////////////////////////////////////////////////// int main(int argc, char **argv) { From a9ce6f9e82b7534caa8f67b1e2d987679185e544 Mon Sep 17 00:00:00 2001 From: Louise Poubel Date: Tue, 24 Aug 2021 10:34:30 -0700 Subject: [PATCH 2/5] =?UTF-8?q?=F0=9F=91=A9=E2=80=8D=F0=9F=8C=BE=20Remove?= =?UTF-8?q?=20bitbucket-pipelines.yml=20(#150)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Louise Poubel --- bitbucket-pipelines.yml | 89 ----------------------------------------- 1 file changed, 89 deletions(-) delete mode 100644 bitbucket-pipelines.yml diff --git a/bitbucket-pipelines.yml b/bitbucket-pipelines.yml deleted file mode 100644 index ff825df1..00000000 --- a/bitbucket-pipelines.yml +++ /dev/null @@ -1,89 +0,0 @@ -image: ubuntu:bionic - -pipelines: - default: - - step: - script: # Modify the commands below to build your repository. - - apt update - - apt -y install wget lsb-release gnupg - - sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list' - - wget http://packages.osrfoundation.org/gazebo.key -O - | apt-key add - - - apt-get update - - apt-get -y install - cmake pkg-config cppcheck doxygen ruby-ronn curl git g++-8 - - update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 800 --slave /usr/bin/g++ g++ /usr/bin/g++-8 --slave /usr/bin/gcov gcov /usr/bin/gcov-8 - # lcov - - git clone https://github.com/linux-test-project/lcov.git -b v1.14 - - cd lcov - - make install - - cd .. - # Dependency: Ignition packages and sdformat - - apt-get -y install - libignition-cmake2-dev - libignition-common3-dev - libignition-math6-dev - libignition-tools-dev - libignition-plugin-dev - libignition-msgs5-dev - libignition-transport8-dev - libsdformat9-dev - # libignition-rendering3-dev - # SDFormat (uncomment if a specific branch is needed) - # - apt install -y - # libxml2-utils - # libtinyxml-dev - # - git clone http://github.com/osrf/sdformat - # - cd sdformat - # - mkdir build - # - cd build - # - cmake .. -DBUILD_TESTING=false - # - make -j4 install - # - cd ../.. - # Ignition msgs (uncomment if a specific branch is needed) - # - apt install -y - # libprotobuf-dev protobuf-compiler libprotoc-dev - # - git clone http://github.com/ignitionrobotics/ign-msgs - # - cd ign-msgs - # - mkdir build - # - cd build - # - cmake .. - # - make -j4 install - # - cd ../.. - # Ignition transport (uncomment if a specific branch is needed) - # - apt install -y - # libzmq3-dev uuid-dev libsqlite3-dev - # - git clone http://github.com/ignitionrobotics/ign-transport - # - cd ign-transport - # - mkdir build - # - cd build - # - cmake .. - # - make -j4 install - # - cd ../.. - # Install ign-rendering dependencies - - apt-get -y install - libogre-1.9-dev libogre-2.1-dev libglew-dev libfreeimage-dev freeglut3-dev libxmu-dev libxi-dev uuid-dev - - git clone http://github.com/ignitionrobotics/ign-rendering -b ign-rendering3 - - cd ign-rendering - - mkdir build - - cd build - - cmake .. - - make -j4 install - - cd ../.. - # Ignition sensors - - mkdir build - - cd build - - cmake .. -DCMAKE_BUILD_TYPE=coverage -DDRI_TESTS=FALSE - - make -j4 install - - make test - - make coverage - # Use a special version of codecov for handling gcc8 output. - - bash <(curl -s https://raw.githubusercontent.com/codecov/codecov-bash/4678d212cce2078bbaaf5027af0c0dafaad6a095/codecov) -X gcovout - - make codecheck - # Examples - - apt-get -y install libfreeimage-dev - - cd .. - - cd examples/save_image - - mkdir build - - cd build - - cmake .. - - make From b475f297c5123925f178b1319b4bcf9004bdf4ec Mon Sep 17 00:00:00 2001 From: Louise Poubel Date: Thu, 26 Aug 2021 14:48:08 -0700 Subject: [PATCH 3/5] =?UTF-8?q?=F0=9F=91=A9=E2=80=8D=F0=9F=8C=BE=20Print?= =?UTF-8?q?=20debug=20messages=20when=20sensors=20advertise=20topics=20(#1?= =?UTF-8?q?51)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Louise Poubel --- src/AirPressureSensor.cc | 3 +++ src/AltimeterSensor.cc | 3 +++ src/CameraSensor.cc | 21 ++++++++++----------- src/DepthCameraSensor.cc | 6 ++++++ src/GpuLidarSensor.cc | 3 +++ src/ImuSensor.cc | 3 +++ src/Lidar.cc | 4 +++- src/LogicalCameraSensor.cc | 3 +++ src/MagnetometerSensor.cc | 3 +++ src/RgbdCameraSensor.cc | 9 +++++++++ src/ThermalCameraSensor.cc | 3 +++ 11 files changed, 49 insertions(+), 12 deletions(-) diff --git a/src/AirPressureSensor.cc b/src/AirPressureSensor.cc index 7a0e733a..f56362d3 100644 --- a/src/AirPressureSensor.cc +++ b/src/AirPressureSensor.cc @@ -122,6 +122,9 @@ bool AirPressureSensor::Load(const sdf::Sensor &_sdf) return false; } + igndbg << "Air pressure for [" << this->Name() << "] advertised on [" + << this->Topic() << "]" << std::endl; + // Load the noise parameters if (_sdf.AirPressureSensor()->PressureNoise().Type() != sdf::NoiseType::NONE) { diff --git a/src/AltimeterSensor.cc b/src/AltimeterSensor.cc index c5d75890..0689c83c 100644 --- a/src/AltimeterSensor.cc +++ b/src/AltimeterSensor.cc @@ -100,6 +100,9 @@ bool AltimeterSensor::Load(const sdf::Sensor &_sdf) return false; } + igndbg << "Altimeter data for [" << this->Name() << "] advertised on [" + << this->Topic() << "]" << std::endl; + // Load the noise parameters if (_sdf.AltimeterSensor()->VerticalPositionNoise().Type() != sdf::NoiseType::NONE) diff --git a/src/CameraSensor.cc b/src/CameraSensor.cc index c8f8a3f4..80968b0e 100644 --- a/src/CameraSensor.cc +++ b/src/CameraSensor.cc @@ -267,6 +267,9 @@ bool CameraSensor::Load(const sdf::Sensor &_sdf) return false; } + igndbg << "Camera images for [" << this->Name() << "] advertised on [" + << this->Topic() << "]" << std::endl; + if (!this->AdvertiseInfo()) return false; @@ -500,16 +503,7 @@ bool CameraSensor::AdvertiseInfo() } this->dataPtr->infoTopic += "/camera_info"; - this->dataPtr->infoPub = - this->dataPtr->node.Advertise( - this->dataPtr->infoTopic); - if (!this->dataPtr->infoPub) - { - ignerr << "Unable to create publisher on topic[" - << this->dataPtr->infoTopic << "].\n"; - } - - return this->dataPtr->infoPub; + return this->AdvertiseInfo(this->dataPtr->infoTopic); } ////////////////////////////////////////////////// @@ -522,9 +516,14 @@ bool CameraSensor::AdvertiseInfo(const std::string &_topic) this->dataPtr->infoTopic); if (!this->dataPtr->infoPub) { - ignerr << "Unable to create publisher on topic[" + ignerr << "Unable to create publisher on topic [" << this->dataPtr->infoTopic << "].\n"; } + else + { + igndbg << "Camera info for [" << this->Name() << "] advertised on [" + << this->dataPtr->infoTopic << "]" << std::endl; + } return this->dataPtr->infoPub; } diff --git a/src/DepthCameraSensor.cc b/src/DepthCameraSensor.cc index 2f3a9c5b..06dadb8e 100644 --- a/src/DepthCameraSensor.cc +++ b/src/DepthCameraSensor.cc @@ -284,6 +284,9 @@ bool DepthCameraSensor::Load(const sdf::Sensor &_sdf) return false; } + igndbg << "Depth images for [" << this->Name() << "] advertised on [" + << this->Topic() << "]" << std::endl; + if (!this->AdvertiseInfo()) return false; @@ -298,6 +301,9 @@ bool DepthCameraSensor::Load(const sdf::Sensor &_sdf) return false; } + igndbg << "Points for [" << this->Name() << "] advertised on [" + << this->Topic() << "/points]" << std::endl; + // Initialize the point message. // \todo(anyone) The true value in the following function call forces // the xyz and rgb fields to be aligned to memory boundaries. This is need diff --git a/src/GpuLidarSensor.cc b/src/GpuLidarSensor.cc index dfcceb40..e1c2bedb 100644 --- a/src/GpuLidarSensor.cc +++ b/src/GpuLidarSensor.cc @@ -146,6 +146,9 @@ bool GpuLidarSensor::Load(const sdf::Sensor &_sdf) return false; } + igndbg << "Lidar points for [" << this->Name() << "] advertised on [" + << this->Topic() << "]" << std::endl; + this->initialized = true; return true; diff --git a/src/ImuSensor.cc b/src/ImuSensor.cc index 638ed22d..8427f717 100644 --- a/src/ImuSensor.cc +++ b/src/ImuSensor.cc @@ -124,6 +124,9 @@ bool ImuSensor::Load(const sdf::Sensor &_sdf) return false; } + igndbg << "IMU data for [" << this->Name() << "] advertised on [" + << this->Topic() << "]" << std::endl; + const std::map noises = { {ACCELEROMETER_X_NOISE_M_S_S, _sdf.ImuSensor()->LinearAccelerationXNoise()}, {ACCELEROMETER_Y_NOISE_M_S_S, _sdf.ImuSensor()->LinearAccelerationYNoise()}, diff --git a/src/Lidar.cc b/src/Lidar.cc index 84a49771..b34e649b 100644 --- a/src/Lidar.cc +++ b/src/Lidar.cc @@ -118,7 +118,9 @@ bool Lidar::Load(const sdf::Sensor &_sdf) << this->Topic() << "].\n"; return false; } - ignmsg << "Publishing laser scans on [" << this->Topic() << "]" << std::endl; + + igndbg << "Laser scans for [" << this->Name() << "] advertised on [" + << this->Topic() << "]" << std::endl; // Load ray atributes this->dataPtr->sdfLidar = *_sdf.LidarSensor(); diff --git a/src/LogicalCameraSensor.cc b/src/LogicalCameraSensor.cc index 82579baf..ad647f91 100644 --- a/src/LogicalCameraSensor.cc +++ b/src/LogicalCameraSensor.cc @@ -117,6 +117,9 @@ bool LogicalCameraSensor::Load(sdf::ElementPtr _sdf) return false; } + igndbg << "Logical images for [" << this->Name() << "] advertised on [" + << this->Topic() << "]" << std::endl; + this->dataPtr->initialized = true; return true; } diff --git a/src/MagnetometerSensor.cc b/src/MagnetometerSensor.cc index c227f1ad..5bc375b9 100644 --- a/src/MagnetometerSensor.cc +++ b/src/MagnetometerSensor.cc @@ -114,6 +114,9 @@ bool MagnetometerSensor::Load(const sdf::Sensor &_sdf) return false; } + igndbg << "Magnetometer data for [" << this->Name() << "] advertised on [" + << this->Topic() << "]" << std::endl; + // Load the noise parameters if (_sdf.MagnetometerSensor()->XNoise().Type() != sdf::NoiseType::NONE) { diff --git a/src/RgbdCameraSensor.cc b/src/RgbdCameraSensor.cc index c2a766f9..3a04045f 100644 --- a/src/RgbdCameraSensor.cc +++ b/src/RgbdCameraSensor.cc @@ -211,6 +211,9 @@ bool RgbdCameraSensor::Load(const sdf::Sensor &_sdf) return false; } + igndbg << "RGB images for [" << this->Name() << "] advertised on [" + << this->Topic() << "/image]" << std::endl; + // Create the depth image publisher this->dataPtr->depthPub = this->dataPtr->node.Advertise( @@ -222,6 +225,9 @@ bool RgbdCameraSensor::Load(const sdf::Sensor &_sdf) return false; } + igndbg << "Depth images for [" << this->Name() << "] advertised on [" + << this->Topic() << "/depth_image]" << std::endl; + // Create the point cloud publisher this->dataPtr->pointPub = this->dataPtr->node.Advertise( @@ -233,6 +239,9 @@ bool RgbdCameraSensor::Load(const sdf::Sensor &_sdf) return false; } + igndbg << "Points for [" << this->Name() << "] advertised on [" + << this->Topic() << "/points]" << std::endl; + if (!this->AdvertiseInfo(this->Topic() + "/camera_info")) return false; diff --git a/src/ThermalCameraSensor.cc b/src/ThermalCameraSensor.cc index 744b5d9b..a25da365 100644 --- a/src/ThermalCameraSensor.cc +++ b/src/ThermalCameraSensor.cc @@ -214,6 +214,9 @@ bool ThermalCameraSensor::Load(const sdf::Sensor &_sdf) return false; } + igndbg << "Thermal images for [" << this->Name() << "] advertised on [" + << this->Topic() << "]" << std::endl; + if (!this->AdvertiseInfo()) return false; From 739a10cdfbb20370e1164e549b8742086521bc78 Mon Sep 17 00:00:00 2001 From: Louise Poubel Date: Mon, 30 Aug 2021 14:40:11 -0700 Subject: [PATCH 4/5] =?UTF-8?q?=F0=9F=8E=88=203.3.0=20(#152)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Louise Poubel --- CMakeLists.txt | 2 +- Changelog.md | 26 +++++++++++++++++++++++++- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c5cc4937..0491f008 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) #============================================================================ # Initialize the project #============================================================================ -project(ignition-sensors3 VERSION 3.2.0) +project(ignition-sensors3 VERSION 3.3.0) #============================================================================ # Find ignition-cmake diff --git a/Changelog.md b/Changelog.md index 88184785..5279e2f2 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,5 +1,29 @@ ## Ignition Sensors 3 +### Ignition Sensors 3.X.X (202X-XX-XX) + +### Ignition Sensors 3.3.0 (2021-08-26) + +1. 👩‍🌾 Print debug messages when sensors advertise topics + * [Pull request #151](https://github.com/ignitionrobotics/ign-sensors/pull/151) + +1. Publish performance sensor metrics. + * [Pull request #146](https://github.com/ignitionrobotics/ign-sensors/pull/146) + +1. CI and infrastructure + * [Pull request #130](https://github.com/ignitionrobotics/ign-sensors/pull/130) + * [Pull request #150](https://github.com/ignitionrobotics/ign-sensors/pull/150) + * [Pull request #106](https://github.com/ignitionrobotics/ign-sensors/pull/106) + +1. 👩‍🌾 Disable tests that consistently fail on macOS + * [Pull request #121](https://github.com/ignitionrobotics/ign-sensors/pull/121) + +1. 👩‍🌾 Clear Windows warnings (backport #58) + * [Pull request #58](https://github.com/ignitionrobotics/ign-sensors/pull/58) + +1. Fix macOS/windows tests that failed to load library (backport #60) + * [Pull request #60](https://github.com/ignitionrobotics/ign-sensors/pull/60) + ### Ignition Sensors 3.2.0 (2021-02-08) 1. Apply noise to lidar point cloud. @@ -11,7 +35,7 @@ 1. Added thermal camera tutorial. * [Pull request 61](https://github.com/ignitionrobotics/ign-sensors/pull/61) -1. Prevent segfaults on test failures, make tests verbose. +1. Prevent segfaults on test failures, make tests verbose. * [Pull request 56](https://github.com/ignitionrobotics/ign-sensors/pull/56) 1. Resolve updated codecheck issues. From c0f9ecf20d016c06e3a9c18391421912111561b4 Mon Sep 17 00:00:00 2001 From: Louise Poubel Date: Thu, 9 Sep 2021 13:49:37 -0700 Subject: [PATCH 5/5] Bump required SDF version to 10.6 (#153) Also fix deprecation warning. Signed-off-by: Louise Poubel --- CMakeLists.txt | 2 +- src/Sensor_TEST.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 52398e70..3f0edcf5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -85,7 +85,7 @@ set(IGN_PLUGIN_VER ${ignition-plugin1_VERSION_MAJOR}) #-------------------------------------- # Find SDFormat -ign_find_package(sdformat10 REQUIRED) +ign_find_package(sdformat10 REQUIRED VERSION 10.6) set(SDF_VER ${sdformat10_VERSION_MAJOR}) set(IGN_SENSORS_PLUGIN_PATH ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}) diff --git a/src/Sensor_TEST.cc b/src/Sensor_TEST.cc index fd77d726..6ff81cf3 100644 --- a/src/Sensor_TEST.cc +++ b/src/Sensor_TEST.cc @@ -198,7 +198,7 @@ TEST_F(SensorUpdate, Update) // publishes metrics in the correspondant topic. for (int sec = 0 ; sec < static_cast(kNumberOfMessages) ; ++sec) { - common::Time now{sec, 0 /*nsec*/}; + std::chrono::steady_clock::duration now = std::chrono::seconds(sec); sensor->Update(now, true); }