Skip to content

Commit

Permalink
Merge branch 'master' into export/state_interfaces/pid_controller
Browse files Browse the repository at this point in the history
  • Loading branch information
saikishor authored Aug 29, 2024
2 parents e5540ee + 3be3fe9 commit 5f582fd
Show file tree
Hide file tree
Showing 52 changed files with 140 additions and 43 deletions.
5 changes: 5 additions & 0 deletions ackermann_steering_controller/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
Changelog for package ackermann_steering_controller
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

4.13.0 (2024-08-22)
-------------------
* Fixes tests to work with use_global_arguments NodeOptions parameter (`#1256 <https://github.com/ros-controls/ros2_controllers/issues/1256>`_)
* Contributors: Sai Kishor Kothakota

4.12.1 (2024-08-14)
-------------------

Expand Down
2 changes: 1 addition & 1 deletion ackermann_steering_controller/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>ackermann_steering_controller</name>
<version>4.12.1</version>
<version>4.13.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>
Expand Down
6 changes: 6 additions & 0 deletions admittance_controller/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
Changelog for package admittance_controller
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

4.13.0 (2024-08-22)
-------------------
* Fix segfault at reconfigure of AdmittanceController (`#1248 <https://github.com/ros-controls/ros2_controllers/issues/1248>`_)
* Fixes tests to work with use_global_arguments NodeOptions parameter (`#1256 <https://github.com/ros-controls/ros2_controllers/issues/1256>`_)
* Contributors: Lennart Nachtigall, Sai Kishor Kothakota

4.12.1 (2024-08-14)
-------------------
* Fix admittance controller interface read/write logic (`#1232 <https://github.com/ros-controls/ros2_controllers/issues/1232>`_)
Expand Down
2 changes: 1 addition & 1 deletion admittance_controller/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>admittance_controller</name>
<version>4.12.1</version>
<version>4.13.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>
Expand Down
5 changes: 5 additions & 0 deletions bicycle_steering_controller/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
Changelog for package bicycle_steering_controller
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

4.13.0 (2024-08-22)
-------------------
* Fixes tests to work with use_global_arguments NodeOptions parameter (`#1256 <https://github.com/ros-controls/ros2_controllers/issues/1256>`_)
* Contributors: Sai Kishor Kothakota

4.12.1 (2024-08-14)
-------------------

Expand Down
2 changes: 1 addition & 1 deletion bicycle_steering_controller/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>bicycle_steering_controller</name>
<version>4.12.1</version>
<version>4.13.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>
Expand Down
5 changes: 5 additions & 0 deletions diff_drive_controller/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
Changelog for package diff_drive_controller
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

4.13.0 (2024-08-22)
-------------------
* Fixes tests to work with use_global_arguments NodeOptions parameter (`#1256 <https://github.com/ros-controls/ros2_controllers/issues/1256>`_)
* Contributors: Sai Kishor Kothakota

4.12.1 (2024-08-14)
-------------------

Expand Down
2 changes: 1 addition & 1 deletion diff_drive_controller/package.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<package format="3">
<name>diff_drive_controller</name>
<version>4.12.1</version>
<version>4.13.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>
Expand Down
2 changes: 1 addition & 1 deletion diff_drive_controller/src/diff_drive_controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ controller_interface::return_type DiffDriveController::update(
const rclcpp::Time & time, const rclcpp::Duration & period)
{
auto logger = get_node()->get_logger();
if (get_state().id() == State::PRIMARY_STATE_INACTIVE)
if (get_lifecycle_state().id() == State::PRIMARY_STATE_INACTIVE)
{
if (!is_halted)
{
Expand Down
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.13.0 (2024-08-22)
-------------------

4.12.1 (2024-08-14)
-------------------

Expand Down
2 changes: 1 addition & 1 deletion effort_controllers/package.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<package format="3">
<name>effort_controllers</name>
<version>4.12.1</version>
<version>4.13.0</version>
<description>Generic controller for forwarding commands.</description>
<maintainer email="[email protected]">Bence Magyar</maintainer>
<maintainer email="[email protected]">Jordan Palacios</maintainer>
Expand Down
5 changes: 5 additions & 0 deletions force_torque_sensor_broadcaster/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
Changelog for package force_torque_sensor_broadcaster
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

4.13.0 (2024-08-22)
-------------------
* Fixes tests to work with use_global_arguments NodeOptions parameter (`#1256 <https://github.com/ros-controls/ros2_controllers/issues/1256>`_)
* Contributors: Sai Kishor Kothakota

4.12.1 (2024-08-14)
-------------------

Expand Down
2 changes: 1 addition & 1 deletion force_torque_sensor_broadcaster/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>force_torque_sensor_broadcaster</name>
<version>4.12.1</version>
<version>4.13.0</version>
<description>Controller to publish state of force-torque sensors.</description>
<maintainer email="[email protected]">Bence Magyar</maintainer>
<maintainer email="[email protected]">Denis Štogl</maintainer>
Expand Down
3 changes: 3 additions & 0 deletions forward_command_controller/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
Changelog for package forward_command_controller
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

4.13.0 (2024-08-22)
-------------------

4.12.1 (2024-08-14)
-------------------

Expand Down
2 changes: 1 addition & 1 deletion forward_command_controller/package.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<package format="3">
<name>forward_command_controller</name>
<version>4.12.1</version>
<version>4.13.0</version>
<description>Generic controller for forwarding commands.</description>
<maintainer email="[email protected]">Bence Magyar</maintainer>
<maintainer email="[email protected]">Jordan Palacios</maintainer>
Expand Down
3 changes: 3 additions & 0 deletions gripper_controllers/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
Changelog for package gripper_controllers
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

4.13.0 (2024-08-22)
-------------------

4.12.1 (2024-08-14)
-------------------

Expand Down
2 changes: 1 addition & 1 deletion gripper_controllers/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>gripper_controllers</name>
<version>4.12.1</version>
<version>4.13.0</version>
<description>The gripper_controllers package</description>
<maintainer email="[email protected]">Bence Magyar</maintainer>

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

4.13.0 (2024-08-22)
-------------------
* Fixes tests to work with use_global_arguments NodeOptions parameter (`#1256 <https://github.com/ros-controls/ros2_controllers/issues/1256>`_)
* Contributors: Sai Kishor Kothakota

4.12.1 (2024-08-14)
-------------------

Expand Down
2 changes: 1 addition & 1 deletion imu_sensor_broadcaster/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>imu_sensor_broadcaster</name>
<version>4.12.1</version>
<version>4.13.0</version>
<description>Controller to publish readings of IMU sensors.</description>
<maintainer email="[email protected]">Bence Magyar</maintainer>
<maintainer email="[email protected]">Denis Štogl</maintainer>
Expand Down
5 changes: 5 additions & 0 deletions joint_state_broadcaster/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
Changelog for package joint_state_broadcaster
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

4.13.0 (2024-08-22)
-------------------
* [Joint State Broadcaster] Publish the joint_states of joints present in the URDF (`#1233 <https://github.com/ros-controls/ros2_controllers/issues/1233>`_)
* Contributors: Sai Kishor Kothakota

4.12.1 (2024-08-14)
-------------------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include "joint_state_broadcaster_parameters.hpp"
#include "realtime_tools/realtime_publisher.h"
#include "sensor_msgs/msg/joint_state.hpp"
#include "urdf/model.h"

namespace joint_state_broadcaster
{
Expand Down Expand Up @@ -111,6 +112,9 @@ class JointStateBroadcaster : public controller_interface::ControllerInterface
dynamic_joint_state_publisher_;
std::shared_ptr<realtime_tools::RealtimePublisher<control_msgs::msg::DynamicJointState>>
realtime_dynamic_joint_state_publisher_;

urdf::Model model_;
bool is_model_loaded_ = false;
};

} // namespace joint_state_broadcaster
Expand Down
2 changes: 1 addition & 1 deletion joint_state_broadcaster/package.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<package format="3">
<name>joint_state_broadcaster</name>
<version>4.12.1</version>
<version>4.13.0</version>
<description>Broadcaster to publish joint state</description>
<maintainer email="[email protected]">Bence Magyar</maintainer>
<maintainer email="[email protected]">Denis Stogl</maintainer>
Expand Down
27 changes: 14 additions & 13 deletions joint_state_broadcaster/src/joint_state_broadcaster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,18 @@ controller_interface::CallbackReturn JointStateBroadcaster::on_configure(
fprintf(stderr, "Exception thrown during init stage with message: %s \n", e.what());
return CallbackReturn::ERROR;
}

const std::string & urdf = get_robot_description();

is_model_loaded_ = !urdf.empty() && model_.initString(urdf);
if (!is_model_loaded_)
{
RCLCPP_ERROR(
get_node()->get_logger(),
"Failed to parse robot description. Will publish all the interfaces with '%s', '%s' and '%s'",
HW_IF_POSITION, HW_IF_VELOCITY, HW_IF_EFFORT);
}

return CallbackReturn::SUCCESS;
}

Expand Down Expand Up @@ -243,17 +255,6 @@ bool JointStateBroadcaster::init_joint_data()
name_if_value_mapping_[si->get_prefix_name()][interface_name] = kUninitializedValue;
}

const std::string & urdf = get_robot_description();

urdf::Model model;
const bool is_model_loaded = !urdf.empty() && model.initString(urdf);
if (!is_model_loaded)
{
RCLCPP_ERROR(
get_node()->get_logger(),
"Failed to parse robot description. Will publish all the interfaces with '%s', '%s' and '%s'",
HW_IF_POSITION, HW_IF_VELOCITY, HW_IF_EFFORT);
}
// filter state interfaces that have at least one of the joint_states fields,
// the rest will be ignored for this message
for (const auto & name_ifv : name_if_value_mapping_)
Expand All @@ -262,8 +263,8 @@ bool JointStateBroadcaster::init_joint_data()
if (has_any_key(interfaces_and_values, {HW_IF_POSITION, HW_IF_VELOCITY, HW_IF_EFFORT}))
{
if (
!params_.use_urdf_to_filter || !params_.joints.empty() || !is_model_loaded ||
model.getJoint(name_ifv.first))
!params_.use_urdf_to_filter || !params_.joints.empty() || !is_model_loaded_ ||
model_.getJoint(name_ifv.first))
{
joint_names_.push_back(name_ifv.first);
}
Expand Down
3 changes: 3 additions & 0 deletions joint_trajectory_controller/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
Changelog for package joint_trajectory_controller
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

4.13.0 (2024-08-22)
-------------------

4.12.1 (2024-08-14)
-------------------

Expand Down
2 changes: 1 addition & 1 deletion joint_trajectory_controller/package.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<package format="3">
<name>joint_trajectory_controller</name>
<version>4.12.1</version>
<version>4.13.0</version>
<description>Controller for executing joint-space trajectories on a group of joints</description>
<maintainer email="[email protected]">Bence Magyar</maintainer>
<maintainer email="[email protected]">Dr. Denis Štogl</maintainer>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ JointTrajectoryController::state_interface_configuration() const
controller_interface::return_type JointTrajectoryController::update(
const rclcpp::Time & time, const rclcpp::Duration & period)
{
if (get_state().id() == lifecycle_msgs::msg::State::PRIMARY_STATE_INACTIVE)
if (get_lifecycle_state().id() == lifecycle_msgs::msg::State::PRIMARY_STATE_INACTIVE)
{
return controller_interface::return_type::OK;
}
Expand Down Expand Up @@ -593,7 +593,7 @@ void JointTrajectoryController::query_state_service(
{
const auto logger = get_node()->get_logger();
// Preconditions
if (get_state().id() != lifecycle_msgs::msg::State::PRIMARY_STATE_ACTIVE)
if (get_lifecycle_state().id() != lifecycle_msgs::msg::State::PRIMARY_STATE_ACTIVE)
{
RCLCPP_ERROR(logger, "Can't sample trajectory. Controller is not active.");
response->success = false;
Expand Down Expand Up @@ -1112,7 +1112,7 @@ rclcpp_action::GoalResponse JointTrajectoryController::goal_received_callback(
RCLCPP_INFO(get_node()->get_logger(), "Received new action goal");

// Precondition: Running controller
if (get_state().id() == lifecycle_msgs::msg::State::PRIMARY_STATE_INACTIVE)
if (get_lifecycle_state().id() == lifecycle_msgs::msg::State::PRIMARY_STATE_INACTIVE)
{
RCLCPP_ERROR(
get_node()->get_logger(), "Can't accept new action goals. Controller is not running.");
Expand Down
5 changes: 5 additions & 0 deletions parallel_gripper_controller/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
Changelog for package parallel_gripper_controller
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

4.13.0 (2024-08-22)
-------------------
* Fixes tests to work with use_global_arguments NodeOptions parameter (`#1256 <https://github.com/ros-controls/ros2_controllers/issues/1256>`_)
* Contributors: Sai Kishor Kothakota

4.12.1 (2024-08-14)
-------------------

Expand Down
2 changes: 1 addition & 1 deletion parallel_gripper_controller/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>parallel_gripper_controller</name>
<version>4.12.1</version>
<version>4.13.0</version>
<description>The parallel_gripper_controller package</description>
<maintainer email="[email protected]">Bence Magyar</maintainer>

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

4.13.0 (2024-08-22)
-------------------

4.12.1 (2024-08-14)
-------------------

Expand Down
2 changes: 1 addition & 1 deletion pid_controller/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>pid_controller</name>
<version>4.12.1</version>
<version>4.13.0</version>
<description>Controller based on PID implememenation from control_toolbox package.</description>
<maintainer email="[email protected]">Bence Magyar</maintainer>
<maintainer email="[email protected]">Denis Štogl</maintainer>
Expand Down
3 changes: 3 additions & 0 deletions position_controllers/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
Changelog for package position_controllers
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

4.13.0 (2024-08-22)
-------------------

4.12.1 (2024-08-14)
-------------------

Expand Down
2 changes: 1 addition & 1 deletion position_controllers/package.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<package format="3">
<name>position_controllers</name>
<version>4.12.1</version>
<version>4.13.0</version>
<description>Generic controller for forwarding commands.</description>
<maintainer email="[email protected]">Bence Magyar</maintainer>
<maintainer email="[email protected]">Jordan Palacios</maintainer>
Expand Down
5 changes: 5 additions & 0 deletions range_sensor_broadcaster/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
Changelog for package range_sensor_broadcaster
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

4.13.0 (2024-08-22)
-------------------
* Fixes tests to work with use_global_arguments NodeOptions parameter (`#1256 <https://github.com/ros-controls/ros2_controllers/issues/1256>`_)
* Contributors: Sai Kishor Kothakota

4.12.1 (2024-08-14)
-------------------

Expand Down
Loading

0 comments on commit 5f582fd

Please sign in to comment.