@@ -37,15 +37,14 @@ impl<'a, T: RealField> StepPlan<'a, T> {
3737 }
3838}
3939
40- // TODO borrow parameters, initial_pose,...
4140#[ derive( Clone , Debug ) ]
4241pub struct StepPlanning < ' a > {
4342 pub path : Path < ' a > ,
4443 pub target_orientation : Orientation2 < Ground > ,
4544 pub initial_pose : Pose < f32 > ,
4645 pub initial_support_foot : Side ,
4746 pub orientation_mode : OrientationMode ,
48- pub parameters : StepPlanningOptimizationParameters ,
47+ pub parameters : & ' a StepPlanningOptimizationParameters ,
4948}
5049
5150impl StepPlanning < ' _ > {
@@ -81,7 +80,7 @@ impl StepPlanning<'_> {
8180 target_orientation_penalty,
8281 walk_orientation_penalty,
8382 ..
84- } = self . parameters ;
83+ } = * self . parameters ;
8584 let PlannedStep { pose, step } = planned_step;
8685
8786 let path_progress_cost = self . path_progress ( ) . loss ( pose. position ) * path_progress_reward;
@@ -107,7 +106,7 @@ impl StepPlanning<'_> {
107106 target_orientation_penalty,
108107 walk_orientation_penalty,
109108 ..
110- } = self . parameters ;
109+ } = * self . parameters ;
111110 let PlannedStep { pose, step } = planned_step;
112111
113112 let path_progress_gradient =
0 commit comments