Skip to content

Commit

Permalink
Merge branch 'master' into rm/iron
Browse files Browse the repository at this point in the history
  • Loading branch information
destogl authored Nov 18, 2024
2 parents af3500b + 4f447f4 commit 0536852
Show file tree
Hide file tree
Showing 116 changed files with 3,547 additions and 186 deletions.
3 changes: 3 additions & 0 deletions ackermann_steering_controller/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
Changelog for package ackermann_steering_controller
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

4.16.0 (2024-11-08)
-------------------

4.15.0 (2024-10-07)
-------------------
* Adapt test to new way of exporting reference interfaces (Related to `#1240 <https://github.com/ros-controls/ros2_controllers/issues/1240>`_ in ros2_control) (`#1103 <https://github.com/ros-controls/ros2_controllers/issues/1103>`_)
Expand Down
3 changes: 2 additions & 1 deletion ackermann_steering_controller/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ project(ackermann_steering_controller LANGUAGES CXX)

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

# find dependencies
Expand Down
15 changes: 11 additions & 4 deletions ackermann_steering_controller/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,19 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>ackermann_steering_controller</name>
<version>4.15.0</version>
<version>4.16.0</version>
<description>Steering controller for Ackermann kinematics. Rear fixed wheels are powering the vehicle and front wheels are steering it.</description>
<license>Apache License 2.0</license>

<maintainer email="[email protected]">Bence Magyar</maintainer>
<maintainer email="[email protected]">Dr.-Ing. Denis Štogl</maintainer>
<maintainer email="[email protected]">dr. sc. Tomislav Petkovic</maintainer>
<maintainer email="[email protected]">Denis Štogl</maintainer>
<maintainer email="[email protected]">Christoph Froehlich</maintainer>
<maintainer email="[email protected]">Sai Kishor Kothakota</maintainer>

<license>Apache License 2.0</license>

<url type="website">https://control.ros.org</url>
<url type="bugtracker">https://github.com/ros-controls/ros2_controllers/issues</url>
<url type="repository">https://github.com/ros-controls/ros2_controllers/</url>

<author email="[email protected]">Dr.-Ing. Denis Štogl</author>
<author email="[email protected]">dr. sc. Tomislav Petkovic</author>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -293,9 +293,10 @@ class AckermannSteeringControllerFixture : public ::testing::Test
double front_wheels_radius_ = 0.45;
double rear_wheels_radius_ = 0.45;

std::array<double, 4> joint_state_values_ = {0.5, 0.5, 0.0, 0.0};
std::array<double, 4> joint_command_values_ = {1.1, 3.3, 2.2, 4.4};
std::array<std::string, 2> joint_reference_interfaces_ = {"linear/velocity", "angular/velocity"};
std::array<double, 4> joint_state_values_ = {{0.5, 0.5, 0.0, 0.0}};
std::array<double, 4> joint_command_values_ = {{1.1, 3.3, 2.2, 4.4}};
std::array<std::string, 2> joint_reference_interfaces_ = {
{"linear/velocity", "angular/velocity"}};
std::string steering_interface_name_ = "position";
// defined in setup
std::string traction_interface_name_ = "";
Expand Down
5 changes: 5 additions & 0 deletions admittance_controller/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
Changelog for package admittance_controller
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

4.16.0 (2024-11-08)
-------------------
* Adding use of robot description parameter in the Admittance Controller (`#1247 <https://github.com/ros-controls/ros2_controllers/issues/1247>`_)
* Contributors: Dr. Denis, Kevin DeMarco, Nikola Banovic, Bence Magyar, Christoph Fröhlich

4.15.0 (2024-10-07)
-------------------

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

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

set(THIS_PACKAGE_INCLUDE_DEPENDS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ class AdmittanceRule

/// Configure admittance rule memory using number of joints.
controller_interface::return_type configure(
const std::shared_ptr<rclcpp_lifecycle::LifecycleNode> & node, const size_t num_joint);
const std::shared_ptr<rclcpp_lifecycle::LifecycleNode> & node, const size_t num_joint,
const std::string & robot_description);

/// Reset all values back to default
controller_interface::return_type reset(const size_t num_joints);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include "admittance_controller/admittance_rule.hpp"

#include <memory>
#include <string>
#include <vector>

#include <control_toolbox/filters.hpp>
Expand All @@ -34,7 +35,8 @@ constexpr auto NUM_CARTESIAN_DOF = 6; // (3 translation + 3 rotation)

/// Configure admittance rule memory for num joints and load kinematics interface
controller_interface::return_type AdmittanceRule::configure(
const std::shared_ptr<rclcpp_lifecycle::LifecycleNode> & node, const size_t num_joints)
const std::shared_ptr<rclcpp_lifecycle::LifecycleNode> & node, const size_t num_joints,
const std::string & robot_description)
{
num_joints_ = num_joints;

Expand All @@ -58,7 +60,7 @@ controller_interface::return_type AdmittanceRule::configure(
kinematics_loader_->createUnmanagedInstance(parameters_.kinematics.plugin_name));

if (!kinematics_->initialize(
node->get_node_parameters_interface(), parameters_.kinematics.tip))
robot_description, node->get_node_parameters_interface(), "kinematics"))
{
return controller_interface::return_type::ERROR;
}
Expand Down
17 changes: 14 additions & 3 deletions admittance_controller/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,24 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>admittance_controller</name>
<version>4.15.0</version>
<version>4.16.0</version>
<description>Implementation of admittance controllers for different input and output interface.</description>
<maintainer email="[email protected]">Denis Štogl</maintainer>

<maintainer email="[email protected]">Bence Magyar</maintainer>
<maintainer email="[email protected]">Andy Zelenak</maintainer>
<maintainer email="[email protected]">Denis Štogl</maintainer>
<maintainer email="[email protected]">Christoph Froehlich</maintainer>
<maintainer email="[email protected]">Sai Kishor Kothakota</maintainer>

<license>Apache License 2.0</license>

<url type="website">https://control.ros.org</url>
<url type="bugtracker">https://github.com/ros-controls/ros2_controllers/issues</url>
<url type="repository">https://github.com/ros-controls/ros2_controllers/</url>

<author email="[email protected]">Denis Štogl</author>
<author email="[email protected]">Andy Zelenak</author>
<author email="[email protected]">Paul Gesel</author>

<buildtool_depend>ament_cmake</buildtool_depend>

<depend>backward_ros</depend>
Expand Down
4 changes: 3 additions & 1 deletion admittance_controller/src/admittance_controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,9 @@ controller_interface::CallbackReturn AdmittanceController::on_configure(
semantic_components::ForceTorqueSensor(admittance_->parameters_.ft_sensor.name));

// configure admittance rule
if (admittance_->configure(get_node(), num_joints_) == controller_interface::return_type::ERROR)
if (
admittance_->configure(get_node(), num_joints_, this->get_robot_description()) ==
controller_interface::return_type::ERROR)
{
return controller_interface::CallbackReturn::ERROR;
}
Expand Down
25 changes: 11 additions & 14 deletions admittance_controller/test/test_admittance_controller.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,18 +102,14 @@ class TestableAdmittanceController : public admittance_controller::AdmittanceCon
}
}

private:
const std::string robot_description_ = ros2_control_test_assets::valid_6d_robot_urdf;
const std::string robot_description_semantic_ = ros2_control_test_assets::valid_6d_robot_srdf;
};

class AdmittanceControllerTest : public ::testing::Test
{
public:
static void SetUpTestCase()
{
// rclcpp::init(0, nullptr);
}
static void SetUpTestCase() {}

void SetUp()
{
Expand Down Expand Up @@ -163,7 +159,8 @@ class AdmittanceControllerTest : public ::testing::Test
controller_interface::return_type SetUpControllerCommon(
const std::string & controller_name, const rclcpp::NodeOptions & options)
{
auto result = controller_->init(controller_name, "", 0, "", options);
auto result =
controller_->init(controller_name, controller_->robot_description_, 0, "", options);

controller_->export_reference_interfaces();
assign_interfaces();
Expand Down Expand Up @@ -374,15 +371,15 @@ class AdmittanceControllerTest : public ::testing::Test
const std::string fixed_world_frame_ = "fixed_world_frame";
const std::string sensor_frame_ = "link_6";

std::array<bool, 6> admittance_selected_axes_ = {true, true, true, true, true, true};
std::array<double, 6> admittance_mass_ = {5.5, 6.6, 7.7, 8.8, 9.9, 10.10};
std::array<double, 6> admittance_damping_ratio_ = {2.828427, 2.828427, 2.828427,
2.828427, 2.828427, 2.828427};
std::array<double, 6> admittance_stiffness_ = {214.1, 214.2, 214.3, 214.4, 214.5, 214.6};
std::array<bool, 6> admittance_selected_axes_ = {{true, true, true, true, true, true}};
std::array<double, 6> admittance_mass_ = {{5.5, 6.6, 7.7, 8.8, 9.9, 10.10}};
std::array<double, 6> admittance_damping_ratio_ = {
{2.828427, 2.828427, 2.828427, 2.828427, 2.828427, 2.828427}};
std::array<double, 6> admittance_stiffness_ = {{214.1, 214.2, 214.3, 214.4, 214.5, 214.6}};

std::array<double, 6> joint_command_values_ = {0.0, 0.0, 0.0, 0.0, 0.0, 0.0};
std::array<double, 6> joint_state_values_ = {1.1, 2.2, 3.3, 4.4, 5.5, 6.6};
std::array<double, 6> fts_state_values_ = {0.0, 0.0, 0.0, 0.0, 0.0, 0.0};
std::array<double, 6> joint_command_values_ = {{0.0, 0.0, 0.0, 0.0, 0.0, 0.0}};
std::array<double, 6> joint_state_values_ = {{1.1, 2.2, 3.3, 4.4, 5.5, 6.6}};
std::array<double, 6> fts_state_values_ = {{0.0, 0.0, 0.0, 0.0, 0.0, 0.0}};
std::vector<std::string> fts_state_names_;

std::vector<hardware_interface::StateInterface> state_itfs_;
Expand Down
3 changes: 3 additions & 0 deletions bicycle_steering_controller/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
Changelog for package bicycle_steering_controller
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

4.16.0 (2024-11-08)
-------------------

4.15.0 (2024-10-07)
-------------------
* Adapt test to new way of exporting reference interfaces (Related to `#1240 <https://github.com/ros-controls/ros2_controllers/issues/1240>`_ in ros2_control) (`#1103 <https://github.com/ros-controls/ros2_controllers/issues/1103>`_)
Expand Down
3 changes: 2 additions & 1 deletion bicycle_steering_controller/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ project(bicycle_steering_controller LANGUAGES CXX)

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

# find dependencies
Expand Down
15 changes: 11 additions & 4 deletions bicycle_steering_controller/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,19 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>bicycle_steering_controller</name>
<version>4.15.0</version>
<version>4.16.0</version>
<description>Steering controller with bicycle kinematics. Rear fixed wheel is powering the vehicle and front wheel is steering.</description>
<license>Apache License 2.0</license>

<maintainer email="[email protected]">Bence Magyar</maintainer>
<maintainer email="[email protected]">Dr.-Ing. Denis Štogl</maintainer>
<maintainer email="[email protected]">dr. sc. Tomislav Petkovic</maintainer>
<maintainer email="[email protected]">Denis Štogl</maintainer>
<maintainer email="[email protected]">Christoph Froehlich</maintainer>
<maintainer email="[email protected]">Sai Kishor Kothakota</maintainer>

<license>Apache License 2.0</license>

<url type="website">https://control.ros.org</url>
<url type="bugtracker">https://github.com/ros-controls/ros2_controllers/issues</url>
<url type="repository">https://github.com/ros-controls/ros2_controllers/</url>

<author email="[email protected]">Dr.-Ing. Denis Štogl</author>
<author email="[email protected]">dr. sc. Tomislav Petkovic</author>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,22 +247,24 @@ class BicycleSteeringControllerFixture : public ::testing::Test
bool open_loop_ = false;
unsigned int velocity_rolling_window_size_ = 10;
bool position_feedback_ = false;
std::vector<std::string> rear_wheels_names_ = {"rear_wheel_joint"};
std::vector<std::string> front_wheels_names_ = {"steering_axis_joint"};
std::vector<std::string> joint_names_ = {rear_wheels_names_[0], front_wheels_names_[0]};
std::vector<std::string> rear_wheels_names_ = {{"rear_wheel_joint"}};
std::vector<std::string> front_wheels_names_ = {{"steering_axis_joint"}};
std::vector<std::string> joint_names_ = {{rear_wheels_names_[0], front_wheels_names_[0]}};

std::vector<std::string> rear_wheels_preceeding_names_ = {"pid_controller/rear_wheel_joint"};
std::vector<std::string> front_wheels_preceeding_names_ = {"pid_controller/steering_axis_joint"};
std::vector<std::string> rear_wheels_preceeding_names_ = {{"pid_controller/rear_wheel_joint"}};
std::vector<std::string> front_wheels_preceeding_names_ = {
{"pid_controller/steering_axis_joint"}};
std::vector<std::string> preceeding_joint_names_ = {
rear_wheels_preceeding_names_[0], front_wheels_preceeding_names_[0]};

double wheelbase_ = 3.24644;
double front_wheels_radius_ = 0.45;
double rear_wheels_radius_ = 0.45;

std::array<double, 2> joint_state_values_ = {3.3, 0.5};
std::array<double, 2> joint_command_values_ = {1.1, 2.2};
std::array<std::string, 2> joint_reference_interfaces_ = {"linear/velocity", "angular/velocity"};
std::array<double, 2> joint_state_values_ = {{3.3, 0.5}};
std::array<double, 2> joint_command_values_ = {{1.1, 2.2}};
std::array<std::string, 2> joint_reference_interfaces_ = {
{"linear/velocity", "angular/velocity"}};
std::string steering_interface_name_ = "position";

// defined in setup
Expand Down
3 changes: 3 additions & 0 deletions diff_drive_controller/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
Changelog for package diff_drive_controller
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

4.16.0 (2024-11-08)
-------------------

4.15.0 (2024-10-07)
-------------------

Expand Down
4 changes: 3 additions & 1 deletion diff_drive_controller/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ cmake_minimum_required(VERSION 3.16)
project(diff_drive_controller 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 -Werror=format)
add_compile_options(-Wall -Wextra -Werror=conversion -Werror=unused-but-set-variable
-Werror=return-type -Werror=shadow -Werror=format -Werror=range-loop-construct
-Werror=missing-braces)
endif()

set(THIS_PACKAGE_INCLUDE_DEPENDS
Expand Down
18 changes: 15 additions & 3 deletions diff_drive_controller/package.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,25 @@
<?xml version="1.0"?>
<package format="3">
<name>diff_drive_controller</name>
<version>4.15.0</version>
<description>Controller for a differential drive mobile base.</description>
<version>4.16.0</version>
<description>Controller for a differential-drive mobile base.</description>

<maintainer email="[email protected]">Bence Magyar</maintainer>
<maintainer email="[email protected]">Jordan Palacios</maintainer>
<maintainer email="[email protected]">Denis Štogl</maintainer>
<maintainer email="[email protected]">Christoph Froehlich</maintainer>
<maintainer email="[email protected]">Sai Kishor Kothakota</maintainer>

<license>Apache License 2.0</license>

<url type="website">https://control.ros.org</url>
<url type="bugtracker">https://github.com/ros-controls/ros2_controllers/issues</url>
<url type="repository">https://github.com/ros-controls/ros2_controllers/</url>

<author email="[email protected]">Bence Magyar</author>
<author>Enrique Fernández</author>
<author>Manuel Meraz</author>
<author email="[email protected]">Jordan Palacios</author>

<buildtool_depend>ament_cmake</buildtool_depend>
<build_depend>generate_parameter_library</build_depend>

Expand Down
1 change: 1 addition & 0 deletions doc/controllers_index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ The controllers are using `common hardware interface definitions`_, and may use
PID Controller <../pid_controller/doc/userdoc.rst>
Position Controllers <../position_controllers/doc/userdoc.rst>
Velocity Controllers <../velocity_controllers/doc/userdoc.rst>
Gpio Command Controller <../gpio_controllers/doc/userdoc.rst>


Broadcasters
Expand Down
4 changes: 4 additions & 0 deletions doc/release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,7 @@ steering_controllers_library
tricycle_controller
************************
* tricycle_controller now uses generate_parameter_library (`#957 <https://github.com/ros-controls/ros2_controllers/pull/957>`_).

gpio_controllers
************************
* The GPIO command controller was added 🎉 (`#1251 <https://github.com/ros-controls/ros2_controllers/pull/1251>`_).
3 changes: 3 additions & 0 deletions effort_controllers/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
Changelog for package effort_controllers
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

4.16.0 (2024-11-08)
-------------------

4.15.0 (2024-10-07)
-------------------

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

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

set(THIS_PACKAGE_INCLUDE_DEPENDS
Expand Down
13 changes: 11 additions & 2 deletions effort_controllers/package.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,22 @@
<?xml version="1.0"?>
<package format="3">
<name>effort_controllers</name>
<version>4.15.0</version>
<version>4.16.0</version>
<description>Generic controller for forwarding commands.</description>

<maintainer email="[email protected]">Bence Magyar</maintainer>
<maintainer email="[email protected]">Jordan Palacios</maintainer>
<maintainer email="[email protected]">Denis Štogl</maintainer>
<maintainer email="[email protected]">Christoph Froehlich</maintainer>
<maintainer email="[email protected]">Sai Kishor Kothakota</maintainer>

<license>Apache License 2.0</license>

<url type="website">https://control.ros.org</url>
<url type="bugtracker">https://github.com/ros-controls/ros2_controllers/issues</url>
<url type="repository">https://github.com/ros-controls/ros2_controllers/</url>

<author email="[email protected]">Jordan Palacios</author>

<buildtool_depend>ament_cmake</buildtool_depend>

<depend>backward_ros</depend>
Expand Down
Loading

0 comments on commit 0536852

Please sign in to comment.