File tree Expand file tree Collapse file tree
rm_shooter_controllers/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -297,8 +297,15 @@ void Controller::setSpeed(const rm_msgs::ShootCmd& cmd)
297297 {
298298 for (size_t j = 0 ; j < ctrls_friction_[i].size (); j++)
299299 {
300- ctrls_friction_[i][j]->setCommand (wheel_speed_directions_[i][j] *
301- (cmd_.wheel_speed + config_.extra_wheel_speed + wheel_speed_offsets_[i][j]));
300+ // Used to distinguish the front and rear friction wheels.
301+ if (j == 0 )
302+ ctrls_friction_[i][j]->setCommand (
303+ wheel_speed_directions_[i][j] *
304+ (cmd_.wheel_speed + config_.extra_wheel_speed + cmd_.wheels_speed_offset_back ));
305+ if (j == 1 )
306+ ctrls_friction_[i][j]->setCommand (
307+ wheel_speed_directions_[i][j] *
308+ (cmd_.wheel_speed + config_.extra_wheel_speed + cmd_.wheels_speed_offset_front ));
302309 }
303310 }
304311 }
You can’t perform that action at this time.
0 commit comments