From eaa2fb8de72ad15bdc24939c577b1158869b84bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Passault?= Date: Tue, 27 May 2025 11:16:59 +0200 Subject: [PATCH 1/4] Updating placo walk engine to match new API (0.8.8) --- .../placo_walk_engine.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/open_duck_reference_motion_generator/placo_walk_engine.py b/open_duck_reference_motion_generator/placo_walk_engine.py index 9f16b9db..7cbef49e 100644 --- a/open_duck_reference_motion_generator/placo_walk_engine.py +++ b/open_duck_reference_motion_generator/placo_walk_engine.py @@ -9,6 +9,7 @@ warnings.filterwarnings("ignore") DT = 0.01 +REPLAN_DT = 0.1 REFINE = 10 @@ -105,7 +106,7 @@ def __init__( ) self.supports = placo.FootstepsPlanner.make_supports( - self.footsteps, True, self.parameters.has_double_support(), True + self.footsteps, 0.0, True, self.parameters.has_double_support(), True ) # Creating the pattern generator and making an initial plan @@ -138,7 +139,7 @@ def load_parameters(self, data): params.double_support_ratio = data.get('double_support_ratio', params.double_support_ratio) params.startend_double_support_ratio = data.get('startend_double_support_ratio', params.startend_double_support_ratio) params.planned_timesteps = data.get('planned_timesteps', params.planned_timesteps) - params.replan_timesteps = data.get('replan_timesteps', params.replan_timesteps) + # params.replan_timesteps = data.get('replan_timesteps', params.replan_timesteps) params.walk_com_height = data.get('walk_com_height', params.walk_com_height) params.walk_foot_height = data.get('walk_foot_height', params.walk_foot_height) params.walk_trunk_pitch = np.deg2rad(data.get('walk_trunk_pitch', np.rad2deg(params.walk_trunk_pitch))) @@ -185,7 +186,7 @@ def reset(self): ) self.supports = placo.FootstepsPlanner.make_supports( - self.footsteps, True, self.parameters.has_double_support(), True + self.footsteps, 0.0, True, self.parameters.has_double_support(), True ) self.trajectory = self.walk.plan(self.supports, self.robot.com_world(), 0.0) @@ -266,16 +267,16 @@ def tick(self, dt, left_contact=True, right_contact=True): # If enough time elapsed and we can replan, do the replanning if ( self.t - self.last_replan - > self.parameters.replan_timesteps * self.parameters.dt() + > REPLAN_DT and self.walk.can_replan_supports(self.trajectory, self.t) ): - self.last_replan = self.t - # Replanning footsteps from current trajectory self.supports = self.walk.replan_supports( - self.repetitive_footsteps_planner, self.trajectory, self.t + self.repetitive_footsteps_planner, self.trajectory, self.t, self.last_replan ) + self.last_replan = self.t + # Replanning CoM trajectory, yielding a new trajectory we can switch to self.trajectory = self.walk.replan(self.supports, self.trajectory, self.t) From 0f9a423a6dde4dc6f8ebb7a6d90815ca5a7328b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Passault?= Date: Tue, 27 May 2025 11:17:14 +0200 Subject: [PATCH 2/4] Bumping PlaCo to 0.8.8 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 817c3f56..9f5cc2d1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,7 +8,7 @@ dependencies = [ "flask>=3.1.0", "framesviewer>=1.0.2", "matplotlib>=3.10.0", - "placo==0.6.3", + "placo==0.8.8", "pygame>=2.6.1", "scikit-learn>=1.6.1", "scipy>=1.15.2", From 22374e34de734e93101c16ceb3c76e72dac38459 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Passault?= Date: Wed, 28 May 2025 00:59:36 +0200 Subject: [PATCH 3/4] Bumping to 0.8.9 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 9f5cc2d1..2a6343f8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,7 +8,7 @@ dependencies = [ "flask>=3.1.0", "framesviewer>=1.0.2", "matplotlib>=3.10.0", - "placo==0.8.8", + "placo==0.8.9", "pygame>=2.6.1", "scikit-learn>=1.6.1", "scipy>=1.15.2", From b36ac194985a6e76ed140ec0b693e54a27235a8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Passault?= Date: Wed, 28 May 2025 21:50:10 +0200 Subject: [PATCH 4/4] Bumping to 0.8.10 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 2a6343f8..a894a647 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,7 +8,7 @@ dependencies = [ "flask>=3.1.0", "framesviewer>=1.0.2", "matplotlib>=3.10.0", - "placo==0.8.9", + "placo==0.8.10", "pygame>=2.6.1", "scikit-learn>=1.6.1", "scipy>=1.15.2",