Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Joint Velocity Bug #236

Merged
merged 1 commit into from
Sep 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion robosuite/controllers/config/joint_velocity.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"input_min": -1,
"output_max": 0.5,
"output_min": -0.5,
"kp": 0.03,
"kp": 3.0,
"velocity_limits": [-1,1],
"interpolation": null,
"ramp_ratio": 0.2
Expand Down
5 changes: 1 addition & 4 deletions robosuite/controllers/joint_vel.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,11 +168,8 @@ def run_controller(self):
else:
self.current_vel = np.array(self.goal_vel)

# We clip the current joint velocity to be within a reasonable range for stability
joint_vel = np.clip(self.joint_vel, self.output_min, self.output_max)

# Compute necessary error terms for PID velocity controller
err = self.current_vel - joint_vel
err = self.current_vel - self.joint_vel
derr = err - self.last_err
self.last_err = err
self.derr_buf.push(derr)
Expand Down