Skip to content

Commit

Permalink
複数for文をまとめた
Browse files Browse the repository at this point in the history
  • Loading branch information
Kuwamai committed Nov 2, 2023
1 parent 6b02791 commit 47c0adb
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions sciurus17_control/src/sciurus17_hardware.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,13 @@ CallbackReturn Sciurus17Hardware::on_init(
return CallbackReturn::ERROR;
}

for (const auto & joint : info_.joints) {
for (auto & joint : info_.joints) {
hw_position_commands_[joint.name] = std::numeric_limits<double>::quiet_NaN();
hw_position_states_[joint.name] = std::numeric_limits<double>::quiet_NaN();
hw_velocity_states_[joint.name] = std::numeric_limits<double>::quiet_NaN();
hw_effort_states_[joint.name] = std::numeric_limits<double>::quiet_NaN();
}

// Load joint parameters
for (auto joint : info_.joints) {
// Load joint parameters
if (joint.parameters["current_to_effort"] != "") {
current_to_effort_[joint.name] = std::stod(joint.parameters["current_to_effort"]);
} else {
Expand Down

0 comments on commit 47c0adb

Please sign in to comment.