diff --git a/crates/control/src/motion/dispatching_interpolator.rs b/crates/control/src/motion/dispatching_interpolator.rs index 4350c0350c..ad121d51cc 100644 --- a/crates/control/src/motion/dispatching_interpolator.rs +++ b/crates/control/src/motion/dispatching_interpolator.rs @@ -38,10 +38,10 @@ pub struct CycleContext { stand_up_front_positions: Input, "stand_up_front_positions">, stand_up_sitting_positions: Input, "stand_up_sitting_positions">, wide_stance_positions: Input, "wide_stance_positions">, - keeper_jump_left_motor_command: - Input>, "keeper_jump_left_motor_command">, - keeper_jump_right_motor_command: - Input>, "keeper_jump_right_motor_command">, + keeper_jump_left_motor_commands: + Input>, "keeper_jump_left_motor_commands">, + keeper_jump_right_motor_commands: + Input>, "keeper_jump_right_motor_commands">, walk_motor_commands: Input>, "walk_motor_commands">, initial_pose: Parameter, "initial_pose">, @@ -109,8 +109,8 @@ impl DispatchingInterpolator { MotionType::StandUpFront => *context.stand_up_front_positions, MotionType::StandUpSitting => *context.stand_up_sitting_positions, MotionType::WideStance => *context.wide_stance_positions, - MotionType::KeeperJumpLeft => context.keeper_jump_left_motor_command.positions, - MotionType::KeeperJumpRight => context.keeper_jump_right_motor_command.positions, + MotionType::KeeperJumpLeft => context.keeper_jump_left_motor_commands.positions, + MotionType::KeeperJumpRight => context.keeper_jump_right_motor_commands.positions, MotionType::CenterJump => *context.center_jump_positions, MotionType::Unstiff => panic!("Dispatching Unstiff doesn't make sense"), MotionType::Animation => context.animation_commands.positions, diff --git a/crates/control/src/motion/keeper_jump_left.rs b/crates/control/src/motion/keeper_jump_left.rs index 79aacd0635..a50a1a0c1b 100644 --- a/crates/control/src/motion/keeper_jump_left.rs +++ b/crates/control/src/motion/keeper_jump_left.rs @@ -34,7 +34,7 @@ pub struct CycleContext { #[context] #[derive(Default)] pub struct MainOutputs { - pub keeper_jump_left_motor_command: MainOutput>>, + pub keeper_jump_left_motor_commands: MainOutput>>, } impl KeeperJumpLeft { @@ -49,6 +49,7 @@ impl KeeperJumpLeft { pub fn cycle(&mut self, context: CycleContext) -> Result { let last_cycle_duration = context.cycle_time.last_cycle_duration; let condition_input = context.condition_input; + if context.motion_selection.current_motion == MotionType::KeeperJumpLeft { self.interpolator .advance_by(last_cycle_duration, condition_input); @@ -58,7 +59,7 @@ impl KeeperJumpLeft { context.motion_safe_exits[MotionType::KeeperJumpLeft] = self.interpolator.is_finished(); Ok(MainOutputs { - keeper_jump_left_motor_command: self.interpolator.value().mirrored().into(), + keeper_jump_left_motor_commands: self.interpolator.value().mirrored().into(), }) } } diff --git a/crates/control/src/motion/keeper_jump_right.rs b/crates/control/src/motion/keeper_jump_right.rs index a27b8d7151..a03fea0c64 100644 --- a/crates/control/src/motion/keeper_jump_right.rs +++ b/crates/control/src/motion/keeper_jump_right.rs @@ -34,7 +34,7 @@ pub struct CycleContext { #[context] #[derive(Default)] pub struct MainOutputs { - pub keeper_jump_right_motor_command: MainOutput>>, + pub keeper_jump_right_motor_commands: MainOutput>>, } impl KeeperJumpRight { @@ -49,6 +49,7 @@ impl KeeperJumpRight { pub fn cycle(&mut self, context: CycleContext) -> Result { let last_cycle_duration = context.cycle_time.last_cycle_duration; let condition_input = context.condition_input; + if context.motion_selection.current_motion == MotionType::KeeperJumpRight { self.interpolator .advance_by(last_cycle_duration, condition_input); @@ -58,7 +59,7 @@ impl KeeperJumpRight { context.motion_safe_exits[MotionType::KeeperJumpRight] = self.interpolator.is_finished(); Ok(MainOutputs { - keeper_jump_right_motor_command: self.interpolator.value().into(), + keeper_jump_right_motor_commands: self.interpolator.value().into(), }) } } diff --git a/crates/control/src/motion/motor_commands_collector.rs b/crates/control/src/motion/motor_commands_collector.rs index 4461f9781d..a609bb2990 100644 --- a/crates/control/src/motion/motor_commands_collector.rs +++ b/crates/control/src/motion/motor_commands_collector.rs @@ -42,10 +42,10 @@ pub struct CycleContext { stand_up_front_positions: Input, "stand_up_front_positions">, stand_up_sitting_positions: Input, "stand_up_sitting_positions">, wide_stance_positions: Input, "wide_stance_positions">, - keeper_jump_left_motor_command: - Input>, "keeper_jump_left_motor_command">, - keeper_jump_right_motor_command: - Input>, "keeper_jump_right_motor_command">, + keeper_jump_left_motor_commands: + Input>, "keeper_jump_left_motor_commands">, + keeper_jump_right_motor_commands: + Input>, "keeper_jump_right_motor_commands">, center_jump_positions: Input, "center_jump_positions">, walk_motor_commands: Input>, "walk_motor_commands">, cycle_time: Input, @@ -90,8 +90,8 @@ impl MotorCommandCollector { let stand_up_front_positions = context.stand_up_front_positions; let stand_up_sitting_positions = context.stand_up_sitting_positions; let wide_stance_positions = context.wide_stance_positions; - let keeper_jump_left = context.keeper_jump_left_motor_command; - let keeper_jump_right = context.keeper_jump_right_motor_command; + let keeper_jump_left = context.keeper_jump_left_motor_commands; + let keeper_jump_right = context.keeper_jump_right_motor_commands; let walk = context.walk_motor_commands; let (positions, stiffnesses) = match motion_selection.current_motion {