From 94745e6f5f051214ac9862051f9a918685f2c6b9 Mon Sep 17 00:00:00 2001 From: Graziato Davide <85335579+Fixit-Davide@users.noreply.github.com> Date: Fri, 15 Mar 2024 15:38:50 +0100 Subject: [PATCH 1/7] Fix #247 (#248) --- gz_ros2_control/src/gz_system.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/gz_ros2_control/src/gz_system.cpp b/gz_ros2_control/src/gz_system.cpp index a60a4eb3..87b085ff 100644 --- a/gz_ros2_control/src/gz_system.cpp +++ b/gz_ros2_control/src/gz_system.cpp @@ -234,15 +234,14 @@ bool GazeboSimSystem::initSim( this->dataPtr->joints_.resize(this->dataPtr->n_dof_); constexpr double default_gain = 0.1; - if (!this->nh_->get_parameter_or( - "position_proportional_gain", - this->dataPtr->position_proportional_gain_, default_gain)) - { - RCLCPP_WARN_STREAM( - this->nh_->get_logger(), - "The position_proportional_gain parameter was not defined, defaulting to: " << - default_gain); - } + + this->dataPtr->position_proportional_gain_ = this->nh_->declare_parameter( + "position_proportional_gain", default_gain); + + RCLCPP_INFO_STREAM( + this->nh_->get_logger(), + "The position_proportional_gain has been set to: " << + this->dataPtr->position_proportional_gain_); if (this->dataPtr->n_dof_ == 0) { RCLCPP_ERROR_STREAM(this->nh_->get_logger(), "There is no joint available"); From a98cb2a8b72827b7c1669987d6a12d3f0b30a41e Mon Sep 17 00:00:00 2001 From: Stephanie Eng Date: Tue, 19 Mar 2024 17:58:21 -0400 Subject: [PATCH 2/7] Fix typo (#253) --- gz_ros2_control/src/gz_ros2_control_plugin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gz_ros2_control/src/gz_ros2_control_plugin.cpp b/gz_ros2_control/src/gz_ros2_control_plugin.cpp index 48d1896b..b4769175 100644 --- a/gz_ros2_control/src/gz_ros2_control_plugin.cpp +++ b/gz_ros2_control/src/gz_ros2_control_plugin.cpp @@ -504,7 +504,7 @@ void GazeboSimROS2ControlPlugin::Configure( std::chrono::duration_cast( std::chrono::duration(1.0 / static_cast(this->dataPtr->update_rate)))); - // Force setting of use_sime_time parameter + // Force setting of use_sim_time parameter this->dataPtr->controller_manager_->set_parameter( rclcpp::Parameter("use_sim_time", rclcpp::ParameterValue(true))); From b35100db16e80ffb574c0266321800e2197136c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20Fr=C3=B6hlich?= Date: Thu, 21 Mar 2024 09:33:05 +0100 Subject: [PATCH 3/7] Add dep (#256) --- gz_ros2_control_demos/package.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/gz_ros2_control_demos/package.xml b/gz_ros2_control_demos/package.xml index b5ff5714..eaae0a30 100644 --- a/gz_ros2_control_demos/package.xml +++ b/gz_ros2_control_demos/package.xml @@ -28,6 +28,7 @@ geometry_msgs hardware_interface gz_ros2_control + ros_gz_bridge imu_sensor_broadcaster joint_state_broadcaster joint_trajectory_controller From dea331d1fbc1305f6a551134f992addc839aeae4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Hern=C3=A1ndez=20Cordero?= Date: Thu, 21 Mar 2024 10:11:37 +0100 Subject: [PATCH 4/7] Changelog MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Alejandro Hernández Cordero --- gz_ros2_control/CHANGELOG.rst | 9 +++++++++ gz_ros2_control_demos/CHANGELOG.rst | 5 +++++ gz_ros2_control_tests/CHANGELOG.rst | 3 +++ 3 files changed, 17 insertions(+) diff --git a/gz_ros2_control/CHANGELOG.rst b/gz_ros2_control/CHANGELOG.rst index cd346156..1574e2c8 100644 --- a/gz_ros2_control/CHANGELOG.rst +++ b/gz_ros2_control/CHANGELOG.rst @@ -2,6 +2,15 @@ Changelog for package ign_ros2_control ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1.2.2 (2024-03-21) +------------------ +* Fix typo (`#253 `_) +* Fix `#247 `_ (`#248 `_) +* Reset Gazebo with initial joint positions and velocities (`#241 `_) +* Use portable versio for usleep (`#237 `_) +* Fix crashing due to an invalid parameter in the initial value (`#233 `_) +* Contributors: Alejandro Hernández Cordero, Graziato Davide, Ruddick Lawrence, Stephanie Eng + 1.2.1 (2024-01-24) ------------------ * Load the URDF to the resource_manager before parsing it to CM (`#222 `_) diff --git a/gz_ros2_control_demos/CHANGELOG.rst b/gz_ros2_control_demos/CHANGELOG.rst index f97417d6..a8897bd1 100644 --- a/gz_ros2_control_demos/CHANGELOG.rst +++ b/gz_ros2_control_demos/CHANGELOG.rst @@ -2,6 +2,11 @@ Changelog for package ign_ros2_control_demos ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1.2.2 (2024-03-21) +------------------ +* Add dep (`#256 `_) +* Contributors: Christoph Fröhlich + 1.2.1 (2024-01-24) ------------------ * Use parameters with ros_gz_sim::Create (`#211 `_) diff --git a/gz_ros2_control_tests/CHANGELOG.rst b/gz_ros2_control_tests/CHANGELOG.rst index da1a3eb7..5b4fb1ee 100644 --- a/gz_ros2_control_tests/CHANGELOG.rst +++ b/gz_ros2_control_tests/CHANGELOG.rst @@ -2,6 +2,9 @@ Changelog for package gz_ros2_control_tests ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1.2.2 (2024-03-21) +------------------ + 1.2.1 (2024-01-24) ------------------ * Include testing packages on CI (`#223 `_) From a1056075e00ab1f6c6b0614b8be029af8c684ecc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Hern=C3=A1ndez=20Cordero?= Date: Thu, 21 Mar 2024 10:11:42 +0100 Subject: [PATCH 5/7] 1.2.2 --- gz_ros2_control/package.xml | 2 +- gz_ros2_control_demos/package.xml | 2 +- gz_ros2_control_tests/package.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gz_ros2_control/package.xml b/gz_ros2_control/package.xml index 52be054c..ac82b023 100644 --- a/gz_ros2_control/package.xml +++ b/gz_ros2_control/package.xml @@ -1,7 +1,7 @@ gz_ros2_control - 1.2.1 + 1.2.2 Gazebo ros2_control package allows to control simulated robots using ros2_control framework. Alejandro Hernández Bence Magyar diff --git a/gz_ros2_control_demos/package.xml b/gz_ros2_control_demos/package.xml index eaae0a30..4d78438d 100644 --- a/gz_ros2_control_demos/package.xml +++ b/gz_ros2_control_demos/package.xml @@ -1,7 +1,7 @@ gz_ros2_control_demos - 1.2.1 + 1.2.2 gz_ros2_control_demos Alejandro Hernandez diff --git a/gz_ros2_control_tests/package.xml b/gz_ros2_control_tests/package.xml index 8894cfc0..100459c7 100644 --- a/gz_ros2_control_tests/package.xml +++ b/gz_ros2_control_tests/package.xml @@ -2,7 +2,7 @@ gz_ros2_control_tests - 1.2.1 + 1.2.2 Gazebo ros2 control tests Alejandro Hernández Apache License 2.0 From 2526653e29d6e35b87a2a0409fd9a881ba944cf0 Mon Sep 17 00:00:00 2001 From: Patrick Roncagliolo Date: Thu, 28 Mar 2024 17:05:58 +0100 Subject: [PATCH 6/7] Fix #259 - `ParameterAlreadyDeclaredException` for parameter `position_proportional_gain` (#261) --- gz_ros2_control/src/gz_system.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/gz_ros2_control/src/gz_system.cpp b/gz_ros2_control/src/gz_system.cpp index 87b085ff..231d1424 100644 --- a/gz_ros2_control/src/gz_system.cpp +++ b/gz_ros2_control/src/gz_system.cpp @@ -235,8 +235,13 @@ bool GazeboSimSystem::initSim( constexpr double default_gain = 0.1; - this->dataPtr->position_proportional_gain_ = this->nh_->declare_parameter( - "position_proportional_gain", default_gain); + try { + this->dataPtr->position_proportional_gain_ = this->nh_->declare_parameter( + "position_proportional_gain", default_gain); + } catch (rclcpp::exceptions::ParameterAlreadyDeclaredException & ex) { + this->nh_->get_parameter( + "position_proportional_gain", this->dataPtr->position_proportional_gain_); + } RCLCPP_INFO_STREAM( this->nh_->get_logger(), From c382a53da4b9053367d0e458c7293f6457002931 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Hern=C3=A1ndez=20Cordero?= Date: Thu, 28 Mar 2024 23:23:51 +0100 Subject: [PATCH 7/7] Fixed linter (#264) Signed-off-by: Alejandro Hernandez Cordero --- gz_ros2_control/src/gz_system.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gz_ros2_control/src/gz_system.cpp b/gz_ros2_control/src/gz_system.cpp index 231d1424..519dfefa 100644 --- a/gz_ros2_control/src/gz_system.cpp +++ b/gz_ros2_control/src/gz_system.cpp @@ -238,7 +238,7 @@ bool GazeboSimSystem::initSim( try { this->dataPtr->position_proportional_gain_ = this->nh_->declare_parameter( "position_proportional_gain", default_gain); - } catch (rclcpp::exceptions::ParameterAlreadyDeclaredException & ex) { + } catch (rclcpp::exceptions::ParameterAlreadyDeclaredException & ex) { this->nh_->get_parameter( "position_proportional_gain", this->dataPtr->position_proportional_gain_); }