Skip to content

Commit

Permalink
Merge branch 'master' into rename_load_urdf_method
Browse files Browse the repository at this point in the history
  • Loading branch information
destogl authored Mar 4, 2024
2 parents 2b4d9c0 + ff3177b commit c612aa8
Show file tree
Hide file tree
Showing 39 changed files with 135 additions and 43 deletions.
6 changes: 6 additions & 0 deletions controller_interface/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
Changelog for package controller_interface
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

4.6.0 (2024-03-02)
------------------
* Add -Werror=missing-braces to compile options (`#1423 <https://github.com/ros-controls/ros2_control/issues/1423>`_)
* added conditioning to have rolling tags compilable in older versions (`#1422 <https://github.com/ros-controls/ros2_control/issues/1422>`_)
* Contributors: Sai Kishor Kothakota

4.5.0 (2024-02-12)
------------------
* A method to get node options to setup the controller node #api-breaking (`#1169 <https://github.com/ros-controls/ros2_control/issues/1169>`_)
Expand Down
3 changes: 2 additions & 1 deletion controller_interface/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ cmake_minimum_required(VERSION 3.16)
project(controller_interface LANGUAGES CXX)

if(CMAKE_CXX_COMPILER_ID MATCHES "(GNU|Clang)")
add_compile_options(-Wall -Wextra -Werror=conversion -Werror=unused-but-set-variable -Werror=return-type -Werror=shadow)
add_compile_options(-Wall -Wextra -Werror=conversion -Werror=unused-but-set-variable -Werror=return-type -Werror=shadow
-Werror=missing-braces)
endif()

set(THIS_PACKAGE_INCLUDE_DEPENDS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,14 @@ class ControllerInterfaceBase : public rclcpp_lifecycle::node_interfaces::Lifecy
CONTROLLER_INTERFACE_PUBLIC
virtual rclcpp::NodeOptions define_custom_node_options() const
{
// \note The versions conditioning is added here to support the source-compatibility with Humble
#if RCLCPP_VERSION_MAJOR >= 21
return rclcpp::NodeOptions().enable_logger_service(true);
#else
return rclcpp::NodeOptions()
.allow_undeclared_parameters(true)
.automatically_declare_parameters_from_overrides(true);
#endif
}

/// Declare and initialize a parameter with a type.
Expand Down
2 changes: 1 addition & 1 deletion controller_interface/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format2.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="2">
<name>controller_interface</name>
<version>4.5.0</version>
<version>4.6.0</version>
<description>Description of controller_interface</description>
<maintainer email="[email protected]">Bence Magyar</maintainer>
<maintainer email="[email protected]">Denis Štogl</maintainer>
Expand Down
8 changes: 4 additions & 4 deletions controller_interface/test/test_force_torque_sensor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,13 @@ class ForceTorqueSensorTest : public ::testing::Test
protected:
const size_t size_ = 6;
const std::string sensor_name_ = "test_FTS";
std::array<double, 3> force_values_ = {1.1, 2.2, 3.3};
std::array<double, 3> torque_values_ = {4.4, 5.5, 6.6};
std::array<double, 3> force_values_ = {{1.1, 2.2, 3.3}};
std::array<double, 3> torque_values_ = {{4.4, 5.5, 6.6}};
std::unique_ptr<TestableForceTorqueSensor> force_torque_sensor_;

std::vector<std::string> full_interface_names_;
const std::vector<std::string> fts_interface_names_ = {"force.x", "force.y", "force.z",
"torque.x", "torque.y", "torque.z"};
const std::vector<std::string> fts_interface_names_ = {
{"force.x", "force.y", "force.z", "torque.x", "torque.y", "torque.z"}};
};

#endif // TEST_FORCE_TORQUE_SENSOR_HPP_
6 changes: 3 additions & 3 deletions controller_interface/test/test_imu_sensor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ class IMUSensorTest : public ::testing::Test
protected:
const size_t size_ = 10;
const std::string sensor_name_ = "test_IMU";
std::array<double, 4> orientation_values_ = {1.1, 2.2, 3.3, 4.4};
std::array<double, 3> angular_velocity_values_ = {4.4, 5.5, 6.6};
std::array<double, 3> linear_acceleration_values_ = {4.4, 5.5, 6.6};
std::array<double, 4> orientation_values_ = {{1.1, 2.2, 3.3, 4.4}};
std::array<double, 3> angular_velocity_values_ = {{4.4, 5.5, 6.6}};
std::array<double, 3> linear_acceleration_values_ = {{4.4, 5.5, 6.6}};
std::unique_ptr<TestableIMUSensor> imu_sensor_;

std::vector<std::string> full_interface_names_;
Expand Down
10 changes: 10 additions & 0 deletions controller_manager/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@
Changelog for package controller_manager
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

4.6.0 (2024-03-02)
------------------
* Add -Werror=missing-braces to compile options (`#1423 <https://github.com/ros-controls/ros2_control/issues/1423>`_)
* added conditioning to have rolling tags compilable in older versions (`#1422 <https://github.com/ros-controls/ros2_control/issues/1422>`_)
* [CM] Remove deprecated parameters for initial component states. (`#1357 <https://github.com/ros-controls/ros2_control/issues/1357>`_)
* [BREAKING CHANGE] Use `robot_description` topic instead of `~/robot_description` and update docs regarding this (`#1410 <https://github.com/ros-controls/ros2_control/issues/1410>`_)
* [CI] Code coverage + pre-commit (`#1413 <https://github.com/ros-controls/ros2_control/issues/1413>`_)
* Fix multiple chainable controller activation bug (`#1401 <https://github.com/ros-controls/ros2_control/issues/1401>`_)
* Contributors: Christoph Fröhlich, Dr. Denis, Felix Exner (fexner), Sai Kishor Kothakota

4.5.0 (2024-02-12)
------------------
* check for state of the controller node before cleanup (`#1363 <https://github.com/ros-controls/ros2_control/issues/1363>`_)
Expand Down
3 changes: 2 additions & 1 deletion controller_manager/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ cmake_minimum_required(VERSION 3.16)
project(controller_manager LANGUAGES CXX)

if(CMAKE_CXX_COMPILER_ID MATCHES "(GNU|Clang)")
add_compile_options(-Wall -Wextra -Werror=conversion -Werror=unused-but-set-variable -Werror=return-type -Werror=shadow)
add_compile_options(-Wall -Wextra -Werror=conversion -Werror=unused-but-set-variable -Werror=return-type -Werror=shadow
-Werror=missing-braces)
endif()

set(THIS_PACKAGE_INCLUDE_DEPENDS
Expand Down
2 changes: 1 addition & 1 deletion controller_manager/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format2.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="2">
<name>controller_manager</name>
<version>4.5.0</version>
<version>4.6.0</version>
<description>Description of controller_manager</description>
<maintainer email="[email protected]">Bence Magyar</maintainer>
<maintainer email="[email protected]">Denis Štogl</maintainer>
Expand Down
14 changes: 14 additions & 0 deletions controller_manager/src/controller_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,24 @@ static constexpr const char * kChainableControllerInterfaceClassName =
"controller_interface::ChainableControllerInterface";

// Changed services history QoS to keep all so we don't lose any client service calls
// \note The versions conditioning is added here to support the source-compatibility with Humble
#if RCLCPP_VERSION_MAJOR >= 17
rclcpp::QoS qos_services =
rclcpp::QoS(rclcpp::QoSInitialization(RMW_QOS_POLICY_HISTORY_KEEP_ALL, 1))
.reliable()
.durability_volatile();
#else
static const rmw_qos_profile_t qos_services = {
RMW_QOS_POLICY_HISTORY_KEEP_ALL,
1, // message queue depth
RMW_QOS_POLICY_RELIABILITY_RELIABLE,
RMW_QOS_POLICY_DURABILITY_VOLATILE,
RMW_QOS_DEADLINE_DEFAULT,
RMW_QOS_LIFESPAN_DEFAULT,
RMW_QOS_POLICY_LIVELINESS_SYSTEM_DEFAULT,
RMW_QOS_LIVELINESS_LEASE_DURATION_DEFAULT,
false};
#endif

inline bool is_controller_inactive(const controller_interface::ControllerInterfaceBase & controller)
{
Expand Down
3 changes: 3 additions & 0 deletions controller_manager_msgs/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
Changelog for package controller_manager_msgs
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

4.6.0 (2024-03-02)
------------------

4.5.0 (2024-02-12)
------------------

Expand Down
2 changes: 1 addition & 1 deletion controller_manager_msgs/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>controller_manager_msgs</name>
<version>4.5.0</version>
<version>4.6.0</version>
<description>Messages and services for the controller manager.</description>
<maintainer email="[email protected]">Bence Magyar</maintainer>
<maintainer email="[email protected]">Denis Štogl</maintainer>
Expand Down
6 changes: 6 additions & 0 deletions hardware_interface/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
Changelog for package hardware_interface
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

4.6.0 (2024-03-02)
------------------
* Add -Werror=missing-braces to compile options (`#1423 <https://github.com/ros-controls/ros2_control/issues/1423>`_)
* [CI] Code coverage + pre-commit (`#1413 <https://github.com/ros-controls/ros2_control/issues/1413>`_)
* Contributors: Christoph Fröhlich, Sai Kishor Kothakota

4.5.0 (2024-02-12)
------------------
* Add missing export macros in lexical_casts.hpp (`#1382 <https://github.com/ros-controls/ros2_control/issues/1382>`_)
Expand Down
3 changes: 2 additions & 1 deletion hardware_interface/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ cmake_minimum_required(VERSION 3.16)
project(hardware_interface LANGUAGES CXX)

if(CMAKE_CXX_COMPILER_ID MATCHES "(GNU|Clang)")
add_compile_options(-Wall -Wextra -Werror=conversion -Werror=unused-but-set-variable -Werror=return-type -Werror=shadow)
add_compile_options(-Wall -Wextra -Werror=conversion -Werror=unused-but-set-variable -Werror=return-type -Werror=shadow
-Werror=missing-braces)
endif()

set(THIS_PACKAGE_INCLUDE_DEPENDS
Expand Down
2 changes: 1 addition & 1 deletion hardware_interface/package.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<package format="2">
<name>hardware_interface</name>
<version>4.5.0</version>
<version>4.6.0</version>
<description>ros2_control hardware interface</description>
<maintainer email="[email protected]">Bence Magyar</maintainer>
<maintainer email="[email protected]">Denis Štogl</maintainer>
Expand Down
10 changes: 5 additions & 5 deletions hardware_interface/test/test_component_interfaces.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -341,12 +341,12 @@ class DummySystem : public hardware_interface::SystemInterface

private:
std::array<double, 3> position_state_ = {
std::numeric_limits<double>::quiet_NaN(), std::numeric_limits<double>::quiet_NaN(),
std::numeric_limits<double>::quiet_NaN()};
{std::numeric_limits<double>::quiet_NaN(), std::numeric_limits<double>::quiet_NaN(),
std::numeric_limits<double>::quiet_NaN()}};
std::array<double, 3> velocity_state_ = {
std::numeric_limits<double>::quiet_NaN(), std::numeric_limits<double>::quiet_NaN(),
std::numeric_limits<double>::quiet_NaN()};
std::array<double, 3> velocity_command_ = {0.0, 0.0, 0.0};
{std::numeric_limits<double>::quiet_NaN(), std::numeric_limits<double>::quiet_NaN(),
std::numeric_limits<double>::quiet_NaN()}};
std::array<double, 3> velocity_command_ = {{0.0, 0.0, 0.0}};

// Helper variables to initiate error on read
unsigned int read_calls_ = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,11 +184,11 @@ class TestSystemCommandModes : public hardware_interface::SystemInterface
std::vector<std::string> start_modes_ = {"position", "position"};
std::vector<bool> stop_modes_ = {false, false};

std::array<double, 2> position_command_ = {0.0, 0.0};
std::array<double, 2> velocity_command_ = {0.0, 0.0};
std::array<double, 2> position_state_ = {0.0, 0.0};
std::array<double, 2> velocity_state_ = {0.0, 0.0};
std::array<double, 2> acceleration_state_ = {0.0, 0.0};
std::array<double, 2> position_command_ = {{0.0, 0.0}};
std::array<double, 2> velocity_command_ = {{0.0, 0.0}};
std::array<double, 2> position_state_ = {{0.0, 0.0}};
std::array<double, 2> velocity_state_ = {{0.0, 0.0}};
std::array<double, 2> acceleration_state_ = {{0.0, 0.0}};
};

} // namespace test_hardware_components
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ class TestTwoJointSystem : public SystemInterface
}

private:
std::array<double, 2> position_command_ = {0.0, 0.0};
std::array<double, 2> position_state_ = {0.0, 0.0};
std::array<double, 2> position_command_ = {{0.0, 0.0}};
std::array<double, 2> position_state_ = {{0.0, 0.0}};
};

} // namespace test_hardware_components
Expand Down
5 changes: 5 additions & 0 deletions hardware_interface_testing/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
Changelog for package hardware_interface_testing
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

4.6.0 (2024-03-02)
------------------
* Add -Werror=missing-braces to compile options (`#1423 <https://github.com/ros-controls/ros2_control/issues/1423>`_)
* Contributors: Sai Kishor Kothakota

4.5.0 (2024-02-12)
------------------

Expand Down
3 changes: 2 additions & 1 deletion hardware_interface_testing/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ cmake_minimum_required(VERSION 3.16)
project(hardware_interface_testing LANGUAGES CXX)

if(CMAKE_CXX_COMPILER_ID MATCHES "(GNU|Clang)")
add_compile_options(-Wall -Wextra -Werror=conversion -Werror=unused-but-set-variable -Werror=return-type -Werror=shadow)
add_compile_options(-Wall -Wextra -Werror=conversion -Werror=unused-but-set-variable -Werror=return-type -Werror=shadow
-Werror=missing-braces)
endif()

set(THIS_PACKAGE_INCLUDE_DEPENDS
Expand Down
2 changes: 1 addition & 1 deletion hardware_interface_testing/package.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<package format="2">
<name>hardware_interface_testing</name>
<version>4.5.0</version>
<version>4.6.0</version>
<description>ros2_control hardware interface testing</description>
<maintainer email="[email protected]">Bence Magyar</maintainer>
<maintainer email="[email protected]">Denis Štogl</maintainer>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,10 @@ class TestSystem : public SystemInterface
}

private:
std::array<double, 2> velocity_command_ = {0.0, 0.0};
std::array<double, 2> position_state_ = {0.0, 0.0};
std::array<double, 2> velocity_state_ = {0.0, 0.0};
std::array<double, 2> acceleration_state_ = {0.0, 0.0};
std::array<double, 2> velocity_command_ = {{0.0, 0.0}};
std::array<double, 2> position_state_ = {{0.0, 0.0}};
std::array<double, 2> velocity_state_ = {{0.0, 0.0}};
std::array<double, 2> acceleration_state_ = {{0.0, 0.0}};
double max_acceleration_command_ = 0.0;
double configuration_state_ = 0.0;
double configuration_command_ = 0.0;
Expand Down
5 changes: 5 additions & 0 deletions joint_limits/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
Changelog for package joint_limits
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

4.6.0 (2024-03-02)
------------------
* Add -Werror=missing-braces to compile options (`#1423 <https://github.com/ros-controls/ros2_control/issues/1423>`_)
* Contributors: Sai Kishor Kothakota

4.5.0 (2024-02-12)
------------------

Expand Down
3 changes: 2 additions & 1 deletion joint_limits/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ cmake_minimum_required(VERSION 3.16)
project(joint_limits LANGUAGES CXX)

if(CMAKE_CXX_COMPILER_ID MATCHES "(GNU|Clang)")
add_compile_options(-Wall -Wextra -Werror=conversion -Werror=unused-but-set-variable -Werror=return-type -Werror=shadow)
add_compile_options(-Wall -Wextra -Werror=conversion -Werror=unused-but-set-variable -Werror=return-type -Werror=shadow
-Werror=missing-braces)
endif()

set(THIS_PACKAGE_INCLUDE_DEPENDS
Expand Down
2 changes: 1 addition & 1 deletion joint_limits/package.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<package format="3">
<name>joint_limits</name>
<version>4.5.0</version>
<version>4.6.0</version>
<description>Interfaces for handling of joint limits for controllers or hardware.</description>

<maintainer email="[email protected]">Bence Magyar</maintainer>
Expand Down
3 changes: 3 additions & 0 deletions ros2_control/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
Changelog for package ros2_control
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

4.6.0 (2024-03-02)
------------------

4.5.0 (2024-02-12)
------------------

Expand Down
2 changes: 1 addition & 1 deletion ros2_control/package.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<package format="3">
<name>ros2_control</name>
<version>4.5.0</version>
<version>4.6.0</version>
<description>Metapackage for ROS2 control related packages</description>
<maintainer email="[email protected]">Bence Magyar</maintainer>
<maintainer email="[email protected]">Denis Štogl</maintainer>
Expand Down
3 changes: 3 additions & 0 deletions ros2_control_test_assets/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
Changelog for package ros2_control_test_assets
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

4.6.0 (2024-03-02)
------------------

4.5.0 (2024-02-12)
------------------

Expand Down
2 changes: 1 addition & 1 deletion ros2_control_test_assets/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>ros2_control_test_assets</name>
<version>4.5.0</version>
<version>4.6.0</version>
<description>The package provides shared test resources for ros2_control stack
</description>
<maintainer email="[email protected]">Bence Magyar</maintainer>
Expand Down
5 changes: 5 additions & 0 deletions ros2controlcli/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
Changelog for package ros2controlcli
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

4.6.0 (2024-03-02)
------------------
* Added spawner colours to `list_controllers` depending upon active or inactive (`#1409 <https://github.com/ros-controls/ros2_control/issues/1409>`_)
* Contributors: Soham Patil

4.5.0 (2024-02-12)
------------------

Expand Down
2 changes: 1 addition & 1 deletion ros2controlcli/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format2.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="2">
<name>ros2controlcli</name>
<version>4.5.0</version>
<version>4.6.0</version>
<description>
The ROS 2 command line tools for ROS2 Control.
</description>
Expand Down
11 changes: 10 additions & 1 deletion ros2controlcli/ros2controlcli/verb/list_controllers.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# limitations under the License.

from controller_manager import list_controllers
from controller_manager.spawner import bcolors

from ros2cli.node.direct import add_arguments
from ros2cli.node.strategy import NodeStrategy
Expand All @@ -22,7 +23,15 @@


def print_controller_state(c, args):
print(f"{c.name:20s}[{c.type:20s}] {c.state:10s}")
state_color = ""
if c.state == "active":
state_color = bcolors.OKGREEN
elif c.state == "inactive":
state_color = bcolors.OKCYAN
elif c.state == "unconfigured":
state_color = bcolors.WARNING

print(f"{c.name:20s}[{c.type:20s}] {state_color}{c.state:10s}{bcolors.ENDC}")
if args.claimed_interfaces or args.verbose:
print("\tclaimed interfaces:")
for claimed_interface in c.claimed_interfaces:
Expand Down
Loading

0 comments on commit c612aa8

Please sign in to comment.