Skip to content

Commit

Permalink
πŸ› Fix vss wheel speed cliping
Browse files Browse the repository at this point in the history
  • Loading branch information
FelipeMartins96 committed Mar 29, 2021
1 parent 2cd4a0b commit b317028
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/vssrobot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ VSSRobot::Wheel::~Wheel() {
void VSSRobot::Wheel::step()
{
auto sent_speed = std::max(std::min(this->desiredAngularSpeed, this->maxAngularSpeed), -this->maxAngularSpeed);
dJointSetAMotorParam(this->motor, dParamVel, this->desiredAngularSpeed);
dJointSetAMotorParam(this->motor, dParamVel, sent_speed);
dJointSetAMotorParam(this->motor, dParamFMax, VSSConfig::Robot().getWheelMotorMaxTorque());
}

Expand Down

0 comments on commit b317028

Please sign in to comment.