diff --git a/src/components/trials/wizard/WizardInterface.tsx b/src/components/trials/wizard/WizardInterface.tsx index 1c07086..8088833 100755 --- a/src/components/trials/wizard/WizardInterface.tsx +++ b/src/components/trials/wizard/WizardInterface.tsx @@ -600,6 +600,13 @@ export const WizardInterface = React.memo(function WizardInterface({ setCompletedActionsCount(0); setCurrentStepIndex(targetIndex); setLastResponse(null); + + // Mark source step as completed so it won't be revisited + setCompletedSteps((prev) => { + const next = new Set(prev); + next.add(currentStepIndex); + return next; + }); return; } } diff --git a/src/lib/ros/wizard-ros-service.ts b/src/lib/ros/wizard-ros-service.ts index 389e8c0..e20c4b8 100644 --- a/src/lib/ros/wizard-ros-service.ts +++ b/src/lib/ros/wizard-ros-service.ts @@ -504,6 +504,27 @@ export class WizardRosService extends EventEmitter { await new Promise((resolve) => setTimeout(resolve, 1000)); break; + case "move_arm": + const arm = String(parameters.arm || "right"); + const prefix = arm.toLowerCase() === "left" ? "L" : "R"; + this.publish("/joint_angles", "naoqi_bridge_msgs/JointAnglesWithSpeed", { + joint_names: [ + `${prefix}ShoulderPitch`, + `${prefix}ShoulderRoll`, + `${prefix}ElbowYaw`, + `${prefix}ElbowRoll`, + ], + joint_angles: [ + Number(parameters.shoulder_pitch) || 0, + Number(parameters.shoulder_roll) || 0, + Number(parameters.elbow_yaw) || 0, + Number(parameters.elbow_roll) || 0, + ], + speed: Number(parameters.speed) || 0.3, + }); + await new Promise((resolve) => setTimeout(resolve, 1000)); + break; + case "emergency_stop": this.publish("/cmd_vel", "geometry_msgs/Twist", { linear: { x: 0, y: 0, z: 0 },