Skip to content

Commit

Permalink
refactor: fix variable init
Browse files Browse the repository at this point in the history
  • Loading branch information
JayantiTA committed Oct 16, 2023
1 parent 7247b5b commit eeff0f4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/backlash_tuner_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,16 +79,16 @@ int main(int argc, char *argv[])
tachimawari::TachimawariNode tachimawari_node(node, controller);
joints = joint_manager->get_current_joints();

double max = std::numeric_limits<double>::min();
double min = std::numeric_limits<double>::max();

rclcpp::Rate rcl_rate(8ms);
while (rclcpp::ok()) {
rcl_rate.sleep();
rclcpp::spin_some(node);

if (!read_all) {
for (const auto &joint : joints) {
double max = std::numeric_limits<double>::min();
double min = std::numeric_limits<double>::max();

if (target_joint == joint.get_id()) {
min = std::min(joint.get_position(), min);
max = std::max(joint.get_position(), max);
Expand Down

0 comments on commit eeff0f4

Please sign in to comment.