Skip to content

Commit 72cc591

Browse files
committed
Merge remote-tracking branch 'origin/main' into trajectory_until
2 parents 3b383ca + f0e167b commit 72cc591

34 files changed

+1535
-568
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ repos:
3939
args: [--py36-plus]
4040

4141
- repo: https://github.com/psf/black
42-
rev: 25.1.0
42+
rev: 25.9.0
4343
hooks:
4444
- id: black
4545
args: ["--line-length=100"]
@@ -87,7 +87,7 @@ repos:
8787
args: ["--linelength=120"]
8888

8989
- repo: https://github.com/pre-commit/mirrors-clang-format
90-
rev: 'v21.1.0'
90+
rev: 'v21.1.2'
9191
hooks:
9292
- id: clang-format
9393

ur/CHANGELOG.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
Changelog for package ur
33
^^^^^^^^^^^^^^^^^^^^^^^^
44

5+
4.2.0 (2025-09-16)
6+
------------------
7+
58
4.1.0 (2025-07-29)
69
------------------
710

ur/package.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
33
<package format="3">
44
<name>ur</name>
5-
<version>4.1.0</version>
5+
<version>4.2.0</version>
66
<description>Metapackage for universal robots</description>
77
<maintainer email="[email protected]">Felix Exner</maintainer>
88
<maintainer email="[email protected]">Rune Søe-Knudsen</maintainer>

ur_calibration/CHANGELOG.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
Changelog for package ur_calibration
33
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
44

5+
4.2.0 (2025-09-16)
6+
------------------
7+
58
4.1.0 (2025-07-29)
69
------------------
710
* Use hpp headers from geometry2 (`#1467 <https://github.com/UniversalRobots/Universal_Robots_ROS2_Driver/issues/1467>`_)

ur_calibration/package.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0"?>
22
<package format="2">
33
<name>ur_calibration</name>
4-
<version>4.1.0</version>
4+
<version>4.2.0</version>
55
<description>Package for extracting the factory calibration from a UR robot and change it such that it can be used by ur_description to gain a correct URDF</description>
66

77
<maintainer email="[email protected]">Felix Exner</maintainer>

ur_controllers/CHANGELOG.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22
Changelog for package ur_controllers
33
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
44

5+
4.2.0 (2025-09-16)
6+
------------------
7+
* Realtime tools migration (`#1474 <https://github.com/UniversalRobots/Universal_Robots_ROS2_Driver/issues/1474>`_)
8+
Use RealtimeThreadSafeBox instead of RealTimeBuffer.
9+
* Replace SJTC implementation with upstream (`#1485 <https://github.com/UniversalRobots/Universal_Robots_ROS2_Driver/issues/1485>`_)
10+
* Contributors: Felix Exner, URJala
11+
512
4.1.0 (2025-07-29)
613
------------------
714
* ur_configuration_controller: use try_set on RTBox (`#1470 <https://github.com/UniversalRobots/Universal_Robots_ROS2_Driver/issues/1470>`_)

ur_controllers/include/ur_controllers/force_mode_controller.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
#include <controller_interface/controller_interface.hpp>
4242
#include <geometry_msgs/msg/pose_stamped.hpp>
4343
#include <rclcpp/rclcpp.hpp>
44-
#include <realtime_tools/realtime_buffer.hpp>
44+
#include <realtime_tools/realtime_thread_safe_box.hpp>
4545
#include <std_srvs/srv/trigger.hpp>
4646
#if __has_include(<tf2_ros/buffer.hpp>)
4747
#include <tf2_ros/buffer.hpp>
@@ -98,7 +98,7 @@ struct ForceModeParameters
9898
std::array<double, 6> task_frame;
9999
std::array<double, 6> selection_vec;
100100
std::array<double, 6> limits;
101-
geometry_msgs::msg::Wrench wrench;
101+
geometry_msgs::msg::Wrench wrench{};
102102
double type;
103103
double damping_factor;
104104
double gain_scaling;
@@ -137,7 +137,7 @@ class ForceModeController : public controller_interface::ControllerInterface
137137
std::shared_ptr<force_mode_controller::ParamListener> param_listener_;
138138
force_mode_controller::Params params_;
139139

140-
realtime_tools::RealtimeBuffer<ForceModeParameters> force_mode_params_buffer_;
140+
realtime_tools::RealtimeThreadSafeBox<ForceModeParameters> force_mode_params_buffer_;
141141
std::atomic<bool> force_mode_active_;
142142
std::atomic<bool> change_requested_;
143143
std::atomic<double> async_state_;

ur_controllers/include/ur_controllers/passthrough_trajectory_controller.hpp

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
#include <vector>
5252

5353
#include <controller_interface/controller_interface.hpp>
54-
#include <realtime_tools/realtime_buffer.hpp>
54+
#include <realtime_tools/realtime_thread_safe_box.hpp>
5555
#include <realtime_tools/realtime_server_goal_handle.hpp>
5656
#include <rclcpp_action/server.hpp>
5757
#include <rclcpp_action/create_server.hpp>
@@ -114,11 +114,11 @@ class PassthroughTrajectoryController : public controller_interface::ControllerI
114114
using FollowJTrajAction = control_msgs::action::FollowJointTrajectory;
115115
using RealtimeGoalHandle = realtime_tools::RealtimeServerGoalHandle<FollowJTrajAction>;
116116
using RealtimeGoalHandlePtr = std::shared_ptr<RealtimeGoalHandle>;
117-
using RealtimeGoalHandleBuffer = realtime_tools::RealtimeBuffer<RealtimeGoalHandlePtr>;
117+
using RealtimeGoalHandleBuffer = realtime_tools::RealtimeThreadSafeBox<RealtimeGoalHandlePtr>;
118118

119119
RealtimeGoalHandleBuffer rt_active_goal_; ///< Currently active action goal, if any.
120120
rclcpp::TimerBase::SharedPtr goal_handle_timer_; ///< Timer to frequently check on the running goal
121-
realtime_tools::RealtimeBuffer<std::unordered_map<std::string, size_t>> joint_trajectory_mapping_;
121+
realtime_tools::RealtimeThreadSafeBox<std::unordered_map<std::string, size_t>> joint_trajectory_mapping_;
122122

123123
rclcpp::Duration action_monitor_period_ = rclcpp::Duration(50ms);
124124

@@ -147,7 +147,7 @@ class PassthroughTrajectoryController : public controller_interface::ControllerI
147147
void goal_accepted_callback(
148148
std::shared_ptr<rclcpp_action::ServerGoalHandle<control_msgs::action::FollowJointTrajectory>> goal_handle);
149149

150-
realtime_tools::RealtimeBuffer<std::vector<std::string>> joint_names_;
150+
realtime_tools::RealtimeThreadSafeBox<std::vector<std::string>> joint_names_;
151151
std::vector<std::string> state_interface_types_;
152152

153153
std::vector<std::string> joint_state_interface_names_;
@@ -159,11 +159,13 @@ class PassthroughTrajectoryController : public controller_interface::ControllerI
159159
bool check_goal_positions(std::shared_ptr<const control_msgs::action::FollowJointTrajectory::Goal> goal);
160160
bool check_goal_velocities(std::shared_ptr<const control_msgs::action::FollowJointTrajectory::Goal> goal);
161161
bool check_goal_accelerations(std::shared_ptr<const control_msgs::action::FollowJointTrajectory::Goal> goal);
162+
std::optional<RealtimeGoalHandlePtr> get_rt_goal_from_non_rt();
163+
bool set_rt_goal_from_non_rt(RealtimeGoalHandlePtr& rt_goal);
162164

163165
trajectory_msgs::msg::JointTrajectory active_joint_traj_;
164166
// std::vector<control_msgs::msg::JointTolerance> path_tolerance_;
165-
realtime_tools::RealtimeBuffer<std::vector<control_msgs::msg::JointTolerance>> goal_tolerance_;
166-
realtime_tools::RealtimeBuffer<rclcpp::Duration> goal_time_tolerance_{ rclcpp::Duration(0, 0) };
167+
realtime_tools::RealtimeThreadSafeBox<std::vector<control_msgs::msg::JointTolerance>> goal_tolerance_;
168+
realtime_tools::RealtimeThreadSafeBox<rclcpp::Duration> goal_time_tolerance_{ rclcpp::Duration(0, 0) };
167169

168170
std::atomic<size_t> current_index_;
169171
std::atomic<bool> trajectory_active_;

ur_controllers/include/ur_controllers/tool_contact_controller.hpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,9 @@
5353
#include <rclcpp_action/server_goal_handle.hpp>
5454
#include <rclcpp/duration.hpp>
5555

56-
#include <realtime_tools/realtime_buffer.hpp>
56+
#include <realtime_tools/realtime_thread_safe_box.hpp>
5757
#include <realtime_tools/realtime_server_goal_handle.hpp>
58+
#include <realtime_tools/lock_free_queue.hpp>
5859

5960
#include <ur_msgs/action/tool_contact.hpp>
6061
#include "ur_controllers/tool_contact_controller_parameters.hpp"
@@ -86,11 +87,13 @@ class ToolContactController : public controller_interface::ControllerInterface
8687
private:
8788
using RealtimeGoalHandle = realtime_tools::RealtimeServerGoalHandle<ur_msgs::action::ToolContact>;
8889
using RealtimeGoalHandlePtr = std::shared_ptr<RealtimeGoalHandle>;
89-
using RealtimeGoalHandleBuffer = realtime_tools::RealtimeBuffer<RealtimeGoalHandlePtr>;
90+
using RealtimeGoalHandleBuffer = realtime_tools::RealtimeThreadSafeBox<RealtimeGoalHandlePtr>;
9091

9192
RealtimeGoalHandleBuffer rt_active_goal_; ///< Currently active action goal, if any.
9293
ur_msgs::action::ToolContact::Feedback::SharedPtr feedback_; ///< preallocated feedback
9394
rclcpp::TimerBase::SharedPtr goal_handle_timer_; ///< Timer to frequently check on the running goal
95+
std::optional<RealtimeGoalHandlePtr> get_rt_goal_from_non_rt();
96+
bool set_rt_goal_from_non_rt(const RealtimeGoalHandlePtr& goal_handle);
9497

9598
// non-rt function that will be called with action_monitor_period to monitor the rt action
9699
rclcpp::Duration action_monitor_period_ = rclcpp::Duration::from_seconds(0.05);

ur_controllers/include/ur_controllers/ur_configuration_controller.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
#include <memory>
4545

4646
#include <controller_interface/controller_interface.hpp>
47-
#include <realtime_tools/realtime_box.hpp>
47+
#include <realtime_tools/realtime_thread_safe_box.hpp>
4848

4949
#include "ur_msgs/srv/get_robot_software_version.hpp"
5050
#include "ur_controllers/ur_configuration_controller_parameters.hpp"
@@ -85,7 +85,7 @@ class URConfigurationController : public controller_interface::ControllerInterfa
8585
CallbackReturn on_init() override;
8686

8787
private:
88-
realtime_tools::RealtimeBox<std::shared_ptr<VersionInformation>> robot_software_version_{
88+
realtime_tools::RealtimeThreadSafeBox<std::shared_ptr<VersionInformation>> robot_software_version_{
8989
std::make_shared<VersionInformation>()
9090
};
9191
std::atomic<bool> robot_software_version_set_{ false };

0 commit comments

Comments
 (0)