Spaces:
Running
Running
Commit ·
e28fde1
1
Parent(s): 4aeffcb
Update defaults and redirect index to openarm.html
Browse files- assets/{openarm-DqhZ0Caw.js → openarm-Cirlttho.js} +1 -1
- index.html +3 -20
- openarm.html +7 -7
assets/{openarm-DqhZ0Caw.js → openarm-Cirlttho.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
import{c as It,f as bt,B as de}from"./connect-DkGLCYAo.js";import{W as ue,S as he,A as fe,D as jt,P as me,O as pe,G as ge,a as ye,B as Vt,b as Ct,c as we,d as ve,e as xe,M as Qt,f as Ie,g as be,U as Ce,h as Ee,i as $e,C as Be,L as Fe,j as Re,k as lt}from"./URDFLoader-CL7UVBjw.js";const $=new URLSearchParams(location.search),ot="openarm.",dt=(t,e)=>$.get(t)||localStorage.getItem(ot+t)||e,Y=document.getElementById("relayUrl"),ut=document.getElementById("leftPath"),ht=document.getElementById("rightPath"),ft=document.getElementById("depthPath"),mt=document.getElementById("certHash");Y.value=dt("relay","https://cdn.1ms.ai");ut.value=$.get("left")||$.get("path")||localStorage.getItem(ot+"left")||"anon/xoq-can-can0/state";ht.value=dt("right","anon/xoq-can-can1/state");ft.value=dt("depth","");mt.value=dt("certHash","");const Pe={relay:Y,left:ut,right:ht,depth:ft,certHash:mt,camX:document.getElementById("camX"),camY:document.getElementById("camY"),camZ:document.getElementById("camZ"),camRoll:document.getElementById("camRoll"),camPitch:document.getElementById("camPitch"),camYaw:document.getElementById("camYaw"),queryRate:document.getElementById("queryRate"),ptSize:document.getElementById("ptSize")};for(const[t,e]of Object.entries(Pe)){const n=localStorage.getItem(ot+t);n&&!$.has(t)&&(e.value=n),e.addEventListener("input",()=>localStorage.setItem(ot+t,e.value))}const T=document.getElementById("log"),O=document.getElementById("startBtn"),st=document.getElementById("stopBtn"),g=document.getElementById("queryBtn"),Se=document.getElementById("statusText"),rt=[{name:"J1",desc:"Shoulder pan",canId:17,color:16739125},{name:"J2",desc:"Shoulder lift",canId:18,color:16747586},{name:"J3",desc:"Shoulder rot",canId:19,color:16755021},{name:"J4",desc:"Elbow flex",canId:20,color:16765286},{name:"J5",desc:"Wrist roll",canId:21,color:448160},{name:"J6",desc:"Wrist pitch",canId:22,color:1149618},{name:"J7",desc:"Wrist rot",canId:23,color:473932},{name:"Grip",desc:"Gripper",canId:24,color:8599788}],kt=["L_J1","L_J2","L_J3","L_J4","L_J5","L_J6","L_J7"],Mt=["R_J1","R_J2","R_J3","R_J4","R_J5","R_J6","R_J7"];function Xt(){return new Array(8).fill(null).map(()=>({angle:0,velocity:0,torque:0,tempMos:0,tempRotor:0,updated:!1}))}const N=Xt(),j=Xt();let at=[],ct=!1,Et=0,$t=0,it=0,At=performance.now();const q={left:{conn:null,broadcast:null,track:null,group:null},right:{conn:null,broadcast:null,track:null,group:null}};let Z=null,k=!1,H=0,wt=0;function c(t,e="info"){const n=document.createElement("div");n.className=`log-entry log-${e}`,n.textContent=`[${new Date().toLocaleTimeString()}] ${t}`,T.appendChild(n),T.children.length>200&&T.removeChild(T.firstChild),T.scrollTop=T.scrollHeight}function Le(t){return t<1024?`${t} B`:t<1024*1024?`${(t/1024).toFixed(1)} K`:`${(t/(1024*1024)).toFixed(1)} M`}function b(t){Se.textContent=t}function Zt(t,e){const n=document.getElementById(t),s=[];for(let o=0;o<rt.length;o++){const r=rt[o],a=document.createElement("div");a.className="joint-row",a.innerHTML=`
|
| 2 |
<span class="joint-label" style="color:#${r.color.toString(16).padStart(6,"0")}">${r.name}</span>
|
| 3 |
<span class="joint-angle" id="${e}-angle-${o}">0.0°</span>
|
| 4 |
<span class="joint-vel" id="${e}-vel-${o}">0.0</span>
|
|
|
|
| 1 |
+
import{c as It,f as bt,B as de}from"./connect-DkGLCYAo.js";import{W as ue,S as he,A as fe,D as jt,P as me,O as pe,G as ge,a as ye,B as Vt,b as Ct,c as we,d as ve,e as xe,M as Qt,f as Ie,g as be,U as Ce,h as Ee,i as $e,C as Be,L as Fe,j as Re,k as lt}from"./URDFLoader-CL7UVBjw.js";const $=new URLSearchParams(location.search),ot="openarm.",dt=(t,e)=>$.get(t)||localStorage.getItem(ot+t)||e,Y=document.getElementById("relayUrl"),ut=document.getElementById("leftPath"),ht=document.getElementById("rightPath"),ft=document.getElementById("depthPath"),mt=document.getElementById("certHash");Y.value=dt("relay","https://cdn.1ms.ai");ut.value=$.get("left")||$.get("path")||localStorage.getItem(ot+"left")||"anon/xoq-can-can0/state";ht.value=dt("right","anon/xoq-can-can1/state");ft.value=dt("depth","anon/realsense");mt.value=dt("certHash","");const Pe={relay:Y,left:ut,right:ht,depth:ft,certHash:mt,camX:document.getElementById("camX"),camY:document.getElementById("camY"),camZ:document.getElementById("camZ"),camRoll:document.getElementById("camRoll"),camPitch:document.getElementById("camPitch"),camYaw:document.getElementById("camYaw"),queryRate:document.getElementById("queryRate"),ptSize:document.getElementById("ptSize")};for(const[t,e]of Object.entries(Pe)){const n=localStorage.getItem(ot+t);n&&!$.has(t)&&(e.value=n),e.addEventListener("input",()=>localStorage.setItem(ot+t,e.value))}const T=document.getElementById("log"),O=document.getElementById("startBtn"),st=document.getElementById("stopBtn"),g=document.getElementById("queryBtn"),Se=document.getElementById("statusText"),rt=[{name:"J1",desc:"Shoulder pan",canId:17,color:16739125},{name:"J2",desc:"Shoulder lift",canId:18,color:16747586},{name:"J3",desc:"Shoulder rot",canId:19,color:16755021},{name:"J4",desc:"Elbow flex",canId:20,color:16765286},{name:"J5",desc:"Wrist roll",canId:21,color:448160},{name:"J6",desc:"Wrist pitch",canId:22,color:1149618},{name:"J7",desc:"Wrist rot",canId:23,color:473932},{name:"Grip",desc:"Gripper",canId:24,color:8599788}],kt=["L_J1","L_J2","L_J3","L_J4","L_J5","L_J6","L_J7"],Mt=["R_J1","R_J2","R_J3","R_J4","R_J5","R_J6","R_J7"];function Xt(){return new Array(8).fill(null).map(()=>({angle:0,velocity:0,torque:0,tempMos:0,tempRotor:0,updated:!1}))}const N=Xt(),j=Xt();let at=[],ct=!1,Et=0,$t=0,it=0,At=performance.now();const q={left:{conn:null,broadcast:null,track:null,group:null},right:{conn:null,broadcast:null,track:null,group:null}};let Z=null,k=!1,H=0,wt=0;function c(t,e="info"){const n=document.createElement("div");n.className=`log-entry log-${e}`,n.textContent=`[${new Date().toLocaleTimeString()}] ${t}`,T.appendChild(n),T.children.length>200&&T.removeChild(T.firstChild),T.scrollTop=T.scrollHeight}function Le(t){return t<1024?`${t} B`:t<1024*1024?`${(t/1024).toFixed(1)} K`:`${(t/(1024*1024)).toFixed(1)} M`}function b(t){Se.textContent=t}function Zt(t,e){const n=document.getElementById(t),s=[];for(let o=0;o<rt.length;o++){const r=rt[o],a=document.createElement("div");a.className="joint-row",a.innerHTML=`
|
| 2 |
<span class="joint-label" style="color:#${r.color.toString(16).padStart(6,"0")}">${r.name}</span>
|
| 3 |
<span class="joint-angle" id="${e}-angle-${o}">0.0°</span>
|
| 4 |
<span class="joint-vel" id="${e}-vel-${o}">0.0</span>
|
index.html
CHANGED
|
@@ -1,22 +1,5 @@
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
-
<html
|
| 3 |
-
<head>
|
| 4 |
-
|
| 5 |
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
-
<title>XoQ Examples</title>
|
| 7 |
-
<style>
|
| 8 |
-
body { font-family: system-ui, sans-serif; max-width: 600px; margin: 2rem auto; padding: 0 1rem; }
|
| 9 |
-
h1 { margin-bottom: 2rem; }
|
| 10 |
-
a { display: block; margin: 1rem 0; font-size: 1.2rem; }
|
| 11 |
-
</style>
|
| 12 |
-
</head>
|
| 13 |
-
<body>
|
| 14 |
-
<h1>XoQ Examples</h1>
|
| 15 |
-
<a href="openarm.html">OpenArm 3D Visualizer</a>
|
| 16 |
-
<a href="camera.html">Camera Viewer</a>
|
| 17 |
-
<a href="publish.html">Publisher (Serial → MoQ)</a>
|
| 18 |
-
<a href="subscribe.html">Subscriber (MoQ → Console)</a>
|
| 19 |
-
<a href="urdf_viewer.html">URDF Robot Viewer</a>
|
| 20 |
-
<a href="video_player.html">Video Player</a>
|
| 21 |
-
</body>
|
| 22 |
</html>
|
|
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
+
<html>
|
| 3 |
+
<head><meta http-equiv="refresh" content="0;url=openarm.html"></head>
|
| 4 |
+
<body></body>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
</html>
|
openarm.html
CHANGED
|
@@ -167,7 +167,7 @@
|
|
| 167 |
.log-error { color: #ff4757; }
|
| 168 |
.log-data { color: #00d4ff; }
|
| 169 |
</style>
|
| 170 |
-
<script type="module" crossorigin src="/assets/openarm-
|
| 171 |
<link rel="modulepreload" crossorigin href="/assets/connect-DkGLCYAo.js">
|
| 172 |
<link rel="modulepreload" crossorigin href="/assets/URDFLoader-CL7UVBjw.js">
|
| 173 |
</head>
|
|
@@ -196,7 +196,7 @@
|
|
| 196 |
</label>
|
| 197 |
<label>
|
| 198 |
Hz:
|
| 199 |
-
<input type="number" id="queryRate" value="
|
| 200 |
</label>
|
| 201 |
<button id="startBtn">Connect</button>
|
| 202 |
<button id="stopBtn" disabled>Disconnect</button>
|
|
@@ -207,11 +207,11 @@
|
|
| 207 |
<label style="font-size:0.75rem;">Pt size: <input type="range" id="ptSize" min="0.5" max="8" step="0.5" value="2" style="width:60px; vertical-align:middle;" /></label>
|
| 208 |
<span style="font-size:0.7rem; color:#666;">depth: 1mm</span>
|
| 209 |
<span style="border-left:1px solid #444; height:1.2rem;"></span>
|
| 210 |
-
<label style="font-size:0.75rem;">Cam X:<input type="number" id="camX" value="0" step="0.01" style="width:48px; padding:0.2rem; border:1px solid #444; border-radius:3px; background:#2a2a4a; color:#fff; font-size:0.75rem;" /></label>
|
| 211 |
-
<label style="font-size:0.75rem;">Y:<input type="number" id="camY" value="0" step="0.01" style="width:48px; padding:0.2rem; border:1px solid #444; border-radius:3px; background:#2a2a4a; color:#fff; font-size:0.75rem;" /></label>
|
| 212 |
-
<label style="font-size:0.75rem;">Z:<input type="number" id="camZ" value="0" step="0.01" style="width:48px; padding:0.2rem; border:1px solid #444; border-radius:3px; background:#2a2a4a; color:#fff; font-size:0.75rem;" /></label>
|
| 213 |
-
<label style="font-size:0.75rem;">R:<input type="number" id="camRoll" value="
|
| 214 |
-
<label style="font-size:0.75rem;">P:<input type="number" id="camPitch" value="
|
| 215 |
<label style="font-size:0.75rem;">Yw:<input type="number" id="camYaw" value="0" step="1" style="width:40px; padding:0.2rem; border:1px solid #444; border-radius:3px; background:#2a2a4a; color:#fff; font-size:0.75rem;" /></label>
|
| 216 |
</div>
|
| 217 |
|
|
|
|
| 167 |
.log-error { color: #ff4757; }
|
| 168 |
.log-data { color: #00d4ff; }
|
| 169 |
</style>
|
| 170 |
+
<script type="module" crossorigin src="/assets/openarm-Cirlttho.js"></script>
|
| 171 |
<link rel="modulepreload" crossorigin href="/assets/connect-DkGLCYAo.js">
|
| 172 |
<link rel="modulepreload" crossorigin href="/assets/URDFLoader-CL7UVBjw.js">
|
| 173 |
</head>
|
|
|
|
| 196 |
</label>
|
| 197 |
<label>
|
| 198 |
Hz:
|
| 199 |
+
<input type="number" id="queryRate" value="10" min="10" max="1000" step="10" style="width:60px; padding:0.35rem 0.3rem; border:1px solid #444; border-radius:4px; background:#2a2a4a; color:#fff; font-size:0.85rem;" />
|
| 200 |
</label>
|
| 201 |
<button id="startBtn">Connect</button>
|
| 202 |
<button id="stopBtn" disabled>Disconnect</button>
|
|
|
|
| 207 |
<label style="font-size:0.75rem;">Pt size: <input type="range" id="ptSize" min="0.5" max="8" step="0.5" value="2" style="width:60px; vertical-align:middle;" /></label>
|
| 208 |
<span style="font-size:0.7rem; color:#666;">depth: 1mm</span>
|
| 209 |
<span style="border-left:1px solid #444; height:1.2rem;"></span>
|
| 210 |
+
<label style="font-size:0.75rem;">Cam X:<input type="number" id="camX" value="-0.26" step="0.01" style="width:48px; padding:0.2rem; border:1px solid #444; border-radius:3px; background:#2a2a4a; color:#fff; font-size:0.75rem;" /></label>
|
| 211 |
+
<label style="font-size:0.75rem;">Y:<input type="number" id="camY" value="0.79" step="0.01" style="width:48px; padding:0.2rem; border:1px solid #444; border-radius:3px; background:#2a2a4a; color:#fff; font-size:0.75rem;" /></label>
|
| 212 |
+
<label style="font-size:0.75rem;">Z:<input type="number" id="camZ" value="0.22" step="0.01" style="width:48px; padding:0.2rem; border:1px solid #444; border-radius:3px; background:#2a2a4a; color:#fff; font-size:0.75rem;" /></label>
|
| 213 |
+
<label style="font-size:0.75rem;">R:<input type="number" id="camRoll" value="90" step="1" style="width:40px; padding:0.2rem; border:1px solid #444; border-radius:3px; background:#2a2a4a; color:#fff; font-size:0.75rem;" /></label>
|
| 214 |
+
<label style="font-size:0.75rem;">P:<input type="number" id="camPitch" value="-225" step="1" style="width:40px; padding:0.2rem; border:1px solid #444; border-radius:3px; background:#2a2a4a; color:#fff; font-size:0.75rem;" /></label>
|
| 215 |
<label style="font-size:0.75rem;">Yw:<input type="number" id="camYaw" value="0" step="1" style="width:40px; padding:0.2rem; border:1px solid #444; border-radius:3px; background:#2a2a4a; color:#fff; font-size:0.75rem;" /></label>
|
| 216 |
</div>
|
| 217 |
|