Skip to content

Commit

Permalink
add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
KmakD committed Jun 26, 2023
1 parent 9f03784 commit 9831e96
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions panther_driver/src/velocity_smoother.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ def get_smooth_velocity(
def _accel_limiter(
self, cmd_vel: float, robot_vel: float, acc_factor: float, decel_factor
) -> float:
# When changing the sign of the command velocity, the robot should stop
# (approach a velocity of 0.0) by applying a deceleration factor.
# Then, it should use acceleration factor to reach the desired velocity value.
if robot_vel >= 0.0:
return robot_vel + self._clamp(cmd_vel - robot_vel, -decel_factor, acc_factor)
else:
Expand Down

0 comments on commit 9831e96

Please sign in to comment.