mirror of
https://github.com/soconnor0919/hristudio.git
synced 2026-05-08 13:58:55 -04:00
fix(wizard-ros): use executeSSH for animations to bypass studyId requirement
This commit is contained in:
@@ -1057,20 +1057,8 @@ export class WizardRosService extends EventEmitter {
|
|||||||
|
|
||||||
console.log(`[WizardROS] Executing animation via API: ${animation}`);
|
console.log(`[WizardROS] Executing animation via API: ${animation}`);
|
||||||
|
|
||||||
// Use the robots command API to execute via SSH
|
// Use executeSSH to run animation via qicli (bypasses studyId requirement)
|
||||||
const response = await fetch("/api/robots/command", {
|
await this.executeSSHCommand(`qicli call ALAnimationPlayer.run '${animation}'`);
|
||||||
method: "POST",
|
|
||||||
headers: { "Content-Type": "application/json" },
|
|
||||||
body: JSON.stringify({
|
|
||||||
action: "executeSystemAction",
|
|
||||||
parameters: { id: actionId },
|
|
||||||
}),
|
|
||||||
});
|
|
||||||
|
|
||||||
if (!response.ok) {
|
|
||||||
const error = await response.text();
|
|
||||||
throw new Error(`Animation failed: ${error}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
console.log(`[WizardROS] Animation completed: ${animation}`);
|
console.log(`[WizardROS] Animation completed: ${animation}`);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user