Skip to content

Commit

Permalink
ur_controllers: Update RealTimeBox (#1189)
Browse files Browse the repository at this point in the history
The realtime_box API has been changed. This PR updates the controllers to that update.

(cherry picked from commit 4ad0056)
  • Loading branch information
christophfroehlich authored and mergify[bot] committed Nov 25, 2024
1 parent d2876cb commit b1e3549
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,10 @@
#ifndef UR_CONTROLLERS__UR_CONFIGURATION_CONTROLLER_HPP_
#define UR_CONTROLLERS__UR_CONFIGURATION_CONTROLLER_HPP_

// TODO(fmauch): Currently, the realtime_box_best_effort doesn't include this
#include <functional>
#include <realtime_tools/realtime_box_best_effort.h> // NOLINT

#include <memory>

#include <controller_interface/controller_interface.hpp>
#include <realtime_tools/realtime_box.h>

#include "ur_msgs/srv/get_robot_software_version.hpp"
#include "ur_configuration_controller_parameters.hpp"
Expand Down Expand Up @@ -88,7 +85,7 @@ class URConfigurationController : public controller_interface::ControllerInterfa
CallbackReturn on_init() override;

private:
realtime_tools::RealtimeBoxBestEffort<std::shared_ptr<VersionInformation>> robot_software_version_{
realtime_tools::RealtimeBox<std::shared_ptr<VersionInformation>> robot_software_version_{
std::make_shared<VersionInformation>()
};

Expand Down
2 changes: 1 addition & 1 deletion ur_controllers/src/ur_configuration_controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ bool URConfigurationController::getRobotSoftwareVersion(
ur_msgs::srv::GetRobotSoftwareVersion::Response::SharedPtr resp)
{
std::shared_ptr<VersionInformation> temp;
return robot_software_version_.tryGet([resp](const std::shared_ptr<VersionInformation> ptr) {
return robot_software_version_.try_get([resp](const std::shared_ptr<VersionInformation> ptr) {
resp->major = ptr->major;
resp->minor = ptr->minor;
resp->build = ptr->build;
Expand Down

0 comments on commit b1e3549

Please sign in to comment.