Skip to content

Commit 2e27d77

Browse files
committed
remove actuator_slowdown
1 parent 687b2a3 commit 2e27d77

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

mock_hardware/include/mock_components/generic_system.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,6 @@ class HARDWARE_INTERFACE_PUBLIC GenericSystem : public hardware_interface::Syste
9999
std::vector<std::vector<double>> gpio_commands_;
100100
std::vector<std::vector<double>> gpio_states_;
101101

102-
double actuator_slowdown_;
103-
104102
// used for the Transmission pass through.
105103
// read: actuator_interface.state_->Transmission->joint_interface.state_
106104
// write: joint_interface.command_->Transmission->actuator_interface.command_

mock_hardware/src/generic_system.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -243,8 +243,6 @@ CallbackReturn GenericSystem::on_init(const hardware_interface::HardwareInfo & i
243243
initialize_storage_vectors(gpio_commands_, gpio_states_, gpio_interfaces_, info_.gpios);
244244
}
245245

246-
actuator_slowdown_ = std::stod(info_.hardware_parameters["actuator_slowdown"]);
247-
248246
const auto num_joints = std::accumulate(
249247
info_.transmissions.begin(), info_.transmissions.end(), 0ul,
250248
[](const auto & acc, const auto & trans_info) { return acc + trans_info.joints.size(); });
@@ -792,14 +790,12 @@ return_type GenericSystem::write(const rclcpp::Time & /*time*/, const rclcpp::Du
792790
[](auto & actuator_interface)
793791
{ actuator_interface.command_ = actuator_interface.transmission_passthrough_; });
794792

795-
// simulate motor motion
796793
std::for_each(
797794
actuator_interfaces_.begin(), actuator_interfaces_.end(),
798795
[&](auto & actuator_interface)
799796
{
800797
actuator_interface.state_ =
801-
actuator_interface.state_ +
802-
(actuator_interface.command_ - actuator_interface.state_) / actuator_slowdown_;
798+
actuator_interface.state_ + (actuator_interface.command_ - actuator_interface.state_);
803799
});
804800

805801
return hardware_interface::return_type::OK;

0 commit comments

Comments
 (0)