Skip to content

Commit

Permalink
Revert "Add passthrough interfaces for joints (#1121)"
Browse files Browse the repository at this point in the history
This reverts commit 3068607.
  • Loading branch information
fmauch committed Oct 14, 2024
1 parent 980d2f6 commit e1da2d8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -197,11 +197,6 @@ class URPositionHardwareInterface : public hardware_interface::SystemInterface
double get_robot_software_version_bugfix_;
double get_robot_software_version_build_;

// Passthrough trajectory controller interface values
urcl::vector6d_t passthrough_trajectory_positions_;
urcl::vector6d_t passthrough_trajectory_velocities_;
urcl::vector6d_t passthrough_trajectory_accelerations_;

// payload stuff
urcl::vector3d_t payload_center_of_gravity_;
double payload_mass_;
Expand Down
13 changes: 2 additions & 11 deletions ur_robot_driver/src/hardware_interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ URPositionHardwareInterface::on_init(const hardware_interface::HardwareInfo& sys
system_interface_initialized_ = 0.0;

for (const hardware_interface::ComponentInfo& joint : info_.joints) {
if (joint.command_interfaces.size() != 5) {
if (joint.command_interfaces.size() != 2) {
RCLCPP_FATAL(rclcpp::get_logger("URPositionHardwareInterface"),
"Joint '%s' has %zu command interfaces found. 5 expected.", joint.name.c_str(),
"Joint '%s' has %zu command interfaces found. 2 expected.", joint.name.c_str(),
joint.command_interfaces.size());
return hardware_interface::CallbackReturn::ERROR;
}
Expand Down Expand Up @@ -256,15 +256,6 @@ std::vector<hardware_interface::CommandInterface> URPositionHardwareInterface::e

command_interfaces.emplace_back(hardware_interface::CommandInterface(
info_.joints[i].name, hardware_interface::HW_IF_VELOCITY, &urcl_velocity_commands_[i]));

command_interfaces.emplace_back(hardware_interface::CommandInterface(info_.joints[i].name, "passthrough_position",
&passthrough_trajectory_positions_[i]));

command_interfaces.emplace_back(hardware_interface::CommandInterface(info_.joints[i].name, "passthrough_velocity",
&passthrough_trajectory_velocities_[i]));

command_interfaces.emplace_back(hardware_interface::CommandInterface(
info_.joints[i].name, "passthrough_acceleration", &passthrough_trajectory_accelerations_[i]));
}
// Obtain the tf_prefix from the urdf so that we can have the general interface multiple times
// NOTE using the tf_prefix at this point is some kind of workaround. One should actually go through the list of gpio
Expand Down

0 comments on commit e1da2d8

Please sign in to comment.