Skip to content

Commit

Permalink
fix: remove error response in write
Browse files Browse the repository at this point in the history
  • Loading branch information
BarisYazici committed Aug 24, 2023
1 parent d52354c commit 8b186d5
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 19 deletions.
4 changes: 0 additions & 4 deletions franka_hardware/src/franka_hardware_interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,6 @@ hardware_interface::return_type FrankaHardwareInterface::write(const rclcpp::Tim
}
if (effort_interface_running_) {
robot_->writeOnce(hw_commands_);
} else {
RCLCPP_FATAL(getLogger(),
"Effort interface is not running. Did you claim the command interface?");
return hardware_interface::return_type::ERROR;
}
return hardware_interface::return_type::OK;
}
Expand Down
15 changes: 0 additions & 15 deletions franka_hardware/test/franka_hardware_interface_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -439,21 +439,6 @@ TEST(FrankaHardwareInterfaceTest,
hardware_interface::return_type::OK);
}

TEST(FrankaHardwareInterfaceTest,
given_effort_interface_not_claimed_when_write_called_expect_error_response) {
auto mock_robot = std::make_shared<MockRobot>();

franka_hardware::FrankaHardwareInterface franka_hardware_interface(mock_robot);

const auto time = rclcpp::Time(0, 0);
const auto duration = rclcpp::Duration(0, 0);

const auto hardware_info = createHardwareInfo();
franka_hardware_interface.on_init(hardware_info);
EXPECT_EQ(franka_hardware_interface.write(time, duration),
hardware_interface::return_type::ERROR);
}

TEST(FrankaHardwareInterfaceTest,
given_that_effort_control_started_perform_command_mode_switch_stop_expect_ok) {
auto mock_robot = std::make_shared<MockRobot>();
Expand Down

0 comments on commit 8b186d5

Please sign in to comment.