Skip to content

Commit d4f03a5

Browse files
committed
Remove useless part
1 parent 1e54534 commit d4f03a5

1 file changed

Lines changed: 0 additions & 29 deletions

File tree

biped_walking_controller/preview_control.py

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -375,32 +375,3 @@ def get_current_state(self) -> State:
375375
def update_steps(self, steps_pose):
376376
self.steps = steps_pose
377377
self.step_idx = 0
378-
379-
380-
class CentroidalPlanner:
381-
def __init__(
382-
self,
383-
dt: float,
384-
com_initial_target: np.ndarray,
385-
state_machine: WalkingStateMachine,
386-
params: PreviewControllerParams,
387-
):
388-
self.state_machine = state_machine
389-
self.params = params
390-
self.ctrler_mat = compute_preview_control_matrices(params, dt)
391-
self.x = np.array([0.0, com_initial_target[0], 0.0, 0.0], dtype=float)
392-
self.y = np.array([0.0, com_initial_target[1], 0.0, 0.0], dtype=float)
393-
394-
def update(self, t: float, rf_contact_force: float, lf_contact_force: float):
395-
# Update buffers based on state machine transition
396-
# if self.state_machine.get_current_state() == State.DS:
397-
398-
# Update control
399-
zmp_ref_horizon = build_zmp_horizon()
400-
401-
_, self.x, self.y = update_control(
402-
self.ctrler_mat, zmp_ref_horizon[0], zmp_ref_horizon, self.x.copy(), self.y.copy()
403-
)
404-
405-
def get_com_pos(self) -> typing.Tuple[float, float]:
406-
return self.x[1], self.y[1]

0 commit comments

Comments
 (0)