Skip to content

Commit d225111

Browse files
committed
Delete implementation of SJTC to use upstream implementation
Since speed scaling is merged in the upstream JTC, we dont't need to keep our SJTC implementation around any longer. For backwards comaptibility we might want to keep it a little longer as the parameters aren't exactly the same.
1 parent e860145 commit d225111

File tree

2 files changed

+4
-360
lines changed

2 files changed

+4
-360
lines changed

ur_controllers/include/ur_controllers/scaled_joint_trajectory_controller.hpp

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,8 @@
3737
#ifndef UR_CONTROLLERS__SCALED_JOINT_TRAJECTORY_CONTROLLER_HPP_
3838
#define UR_CONTROLLERS__SCALED_JOINT_TRAJECTORY_CONTROLLER_HPP_
3939

40-
#include <optional>
4140
#include <memory>
42-
#include <vector>
4341
#include "joint_trajectory_controller/joint_trajectory_controller.hpp"
44-
#include "rclcpp_lifecycle/node_interfaces/lifecycle_node_interface.hpp"
45-
#include "rclcpp/time.hpp"
46-
#include "rclcpp/duration.hpp"
4742
#include "ur_controllers/scaled_joint_trajectory_controller_parameters.hpp"
4843

4944
namespace ur_controllers
@@ -54,43 +49,11 @@ class ScaledJointTrajectoryController : public joint_trajectory_controller::Join
5449
ScaledJointTrajectoryController() = default;
5550
~ScaledJointTrajectoryController() override = default;
5651

57-
controller_interface::InterfaceConfiguration state_interface_configuration() const override;
58-
59-
controller_interface::CallbackReturn on_activate(const rclcpp_lifecycle::State& state) override;
60-
61-
controller_interface::return_type update(const rclcpp::Time& time, const rclcpp::Duration& period) override;
62-
6352
CallbackReturn on_init() override;
6453

6554
private:
66-
std::atomic<double> scaling_factor_{ 1.0 };
67-
68-
std::optional<std::reference_wrapper<hardware_interface::LoanedStateInterface>> scaling_state_interface_ =
69-
std::nullopt;
70-
7155
std::shared_ptr<scaled_joint_trajectory_controller::ParamListener> scaled_param_listener_;
7256
scaled_joint_trajectory_controller::Params scaled_params_;
73-
74-
// Private methods copied from Upstream JTC
75-
void update_pids();
76-
77-
/**
78-
* @brief Assigns the values from a trajectory point interface to a joint interface.
79-
*
80-
* @tparam T The type of the joint interface.
81-
* @param[out] joint_interface The reference_wrapper to assign the values to
82-
* @param[in] trajectory_point_interface Containing the values to assign.
83-
* @todo: Use auto in parameter declaration with c++20
84-
*/
85-
template <typename T>
86-
bool assign_interface_from_point(const T& joint_interface, const std::vector<double>& trajectory_point_interface)
87-
{
88-
bool success = true;
89-
for (size_t index = 0; index < num_cmd_joints_; ++index) {
90-
success &= joint_interface[index].get().set_value(trajectory_point_interface[map_cmd_to_joints_[index]]);
91-
}
92-
return success;
93-
}
9457
};
9558
} // namespace ur_controllers
9659

0 commit comments

Comments
 (0)