Skip to content

Commit

Permalink
Use tf prefix properly (backport #688) (#725)
Browse files Browse the repository at this point in the history
Remove tf_prefix workaround in hw interface

ros2_control can now accept empty parameters, so this isn't needed anymore.

Co-authored-by: Lennart Nachtigall <[email protected]>
  • Loading branch information
mergify[bot] and Lennart Nachtigall authored Jun 23, 2023
1 parent 57b2541 commit 7014d93
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions ur_robot_driver/src/hardware_interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,7 @@ std::vector<hardware_interface::StateInterface> URPositionHardwareInterface::exp
// 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
// state interface in info_ and match them accordingly
std::string tf_prefix = info_.hardware_parameters.at("tf_prefix");
tf_prefix.erase(0, 1);
const std::string tf_prefix = info_.hardware_parameters.at("tf_prefix");
state_interfaces.emplace_back(hardware_interface::StateInterface(tf_prefix + "speed_scaling", "speed_scaling_factor",
&speed_scaling_combined_));

Expand Down Expand Up @@ -248,8 +247,8 @@ std::vector<hardware_interface::CommandInterface> URPositionHardwareInterface::e
// 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
// command interface in info_ and match them accordingly
std::string tf_prefix = info_.hardware_parameters.at("tf_prefix");
tf_prefix.erase(0, 1);
const std::string tf_prefix = info_.hardware_parameters.at("tf_prefix");

command_interfaces.emplace_back(
hardware_interface::CommandInterface(tf_prefix + "gpio", "io_async_success", &io_async_success_));

Expand Down

0 comments on commit 7014d93

Please sign in to comment.