Skip to content

Commit

Permalink
format code
Browse files Browse the repository at this point in the history
  • Loading branch information
alvinsunyixiao committed Feb 14, 2024
1 parent e53c029 commit 22adbf4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ff_control/ff_control/wrench_ctrl.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def set_world_wrench(self, wrench_world: Wrench2D, theta: float) -> None:

def clip_wrench(self, wrench: Wrench2D) -> Wrench2D:
wrench_clipped = Wrench2D()
force = np.sqrt(wrench.fx ** 2 + wrench.fy ** 2)
force = np.sqrt(wrench.fx**2 + wrench.fy**2)
force_scale = max(force / self.p.actuators["F_body_max"], 1.0)
torque_scale = max(abs(wrench.tz) / self.p.actuators["M_body_max"], 1.0)

Expand Down
4 changes: 1 addition & 3 deletions ff_sim/ff_sim/simulator_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -408,9 +408,7 @@ def f_dynamics_continuous_time(self, x, u):
f[0:2] = v
f[2] = thetadot
thetaddot = (M - F[1] * p0[0] + F[0] * p0[1]) / J
f[3:5] = np.matmul(
R, (F / m - (thetaddot * np.array([-p0[1], p0[0]]) - thetadot ** 2 * p0))
)
f[3:5] = np.matmul(R, (F / m - (thetaddot * np.array([-p0[1], p0[0]]) - thetadot**2 * p0)))
f[5] = thetaddot

# add constant force due to table tilt
Expand Down

0 comments on commit 22adbf4

Please sign in to comment.