Skip to content

Commit

Permalink
Use steer_p_gain for UpdateVelocity steer joint speed
Browse files Browse the repository at this point in the history
Signed-off-by: retinfai <[email protected]>
  • Loading branch information
retinfai committed Apr 3, 2024
1 parent b9138fb commit f27f2ad
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
7 changes: 3 additions & 4 deletions src/systems/ackermann_steering/AckermannSteering.cc
Original file line number Diff line number Diff line change
Expand Up @@ -926,11 +926,10 @@ void AckermannSteeringPrivate::UpdateVelocity(
double leftDelta = leftSteeringJointAngle - leftSteeringPos->Data()[0];
double rightDelta = rightSteeringJointAngle - rightSteeringPos->Data()[0];

// Simple proportional control with a gain of 1
// Simple proportional control with settable gain.
// Adding programmable PID values might be a future feature.
// Works as is for tested cases
this->leftSteeringJointSpeed = leftDelta;
this->rightSteeringJointSpeed = rightDelta;
this->leftSteeringJointSpeed = this->gainPAng * leftDelta;
this->rightSteeringJointSpeed = this->gainPAng * rightDelta;
}

//////////////////////////////////////////////////
Expand Down
1 change: 0 additions & 1 deletion src/systems/ackermann_steering/AckermannSteering.hh
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ namespace systems
/// the index of the steering angle position actuator.
///
/// - `<steer_p_gain>`: Float used to control the steering angle P gain.
/// Only used for when in steering_only mode.
///
/// - `<left_joint>`: Name of a joint that controls a left wheel. This
/// element can appear multiple times, and must appear at least once.
Expand Down

0 comments on commit f27f2ad

Please sign in to comment.