Merge branch 'feat/gesture-ui-cb' of git.science.uu.nl:ics/sp/2025/n25b/pepperplus-ui into feat/gesture-ui-cb

This commit is contained in:
Tuurminator69
2026-01-03 20:28:53 +01:00

View File

@@ -11,10 +11,12 @@ export default function GesturePage() {
async function getTags() {
try {
const res = await fetch("http://localhost:8000/robot/get_available_gesture_tags");
// You can optionally use a query parameter: `commands/gesture/tags/?count=<number>`.
// This will yield a list of tags with that count.
const res = await fetch("http://localhost:8000/robot/commands/gesture/tags/");
if (!res.ok) throw new Error("Failed communicating with the backend.");
const jsonRes = await res.json();
setTags(jsonRes["tags"]);
setTags(jsonRes["available_gesture_tags"]);
} catch (err) {
console.error("Failed to fetch tags:", err);
}
@@ -29,7 +31,7 @@ export default function GesturePage() {
const gesture = { endpoint: "actuate/gesture/tag", data: selectedTag };
try {
const res = await fetch("http://localhost:8000/robot/command", {
const res = await fetch("http://localhost:8000/robot/command/gesture", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify(gesture),