diff --git a/rm_shooter_controllers/src/standard.cpp b/rm_shooter_controllers/src/standard.cpp index c2e0d541..07089712 100644 --- a/rm_shooter_controllers/src/standard.cpp +++ b/rm_shooter_controllers/src/standard.cpp @@ -297,8 +297,15 @@ void Controller::setSpeed(const rm_msgs::ShootCmd& cmd) { for (size_t j = 0; j < ctrls_friction_[i].size(); j++) { - ctrls_friction_[i][j]->setCommand(wheel_speed_directions_[i][j] * - (cmd_.wheel_speed + config_.extra_wheel_speed + wheel_speed_offsets_[i][j])); + // Used to distinguish the front and rear friction wheels. + if (j == 0) + ctrls_friction_[i][j]->setCommand( + wheel_speed_directions_[i][j] * + (cmd_.wheel_speed + config_.extra_wheel_speed + cmd_.wheels_speed_offset_back)); + if (j == 1) + ctrls_friction_[i][j]->setCommand( + wheel_speed_directions_[i][j] * + (cmd_.wheel_speed + config_.extra_wheel_speed + cmd_.wheels_speed_offset_front)); } } }