Files
appRobotHoming/public/calibration.html
2026-06-10 09:51:12 +02:00

274 lines
9.0 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Kalibrierung appRobotHoming</title>
<link rel="stylesheet" href="/styles.css">
<style>
/* ===== CALIBRATION PAGE EXTRAS ===== */
.calib-header {
display: flex;
align-items: center;
gap: 16px;
margin-bottom: 20px;
}
.calib-header a {
color: var(--muted);
text-decoration: none;
font-size: 13px;
border: 1px solid #334155;
border-radius: 6px;
padding: 6px 12px;
transition: border-color 0.2s;
}
.calib-header a:hover {
border-color: var(--accent);
color: var(--accent);
}
.calib-header h1 {
margin: 0;
font-size: 17px;
font-weight: 500;
color: var(--accent);
}
/* ===== TABS ===== */
.tab-bar {
display: flex;
gap: 4px;
border-bottom: 2px solid #1f2937;
margin-bottom: 20px;
flex-wrap: wrap;
}
.tab-btn {
background: none;
border: none;
border-bottom: 3px solid transparent;
padding: 10px 18px;
color: var(--muted);
font-size: 14px;
cursor: pointer;
margin-bottom: -2px;
border-radius: 6px 6px 0 0;
transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.tab-btn:hover {
color: var(--text);
background: #1e293b;
}
.tab-btn.active {
color: var(--accent);
border-bottom-color: var(--accent);
background: #1e293b;
}
/* ===== TAB PANELS ===== */
.tab-panel {
display: none;
}
.tab-panel.active {
display: block;
}
.placeholder-note {
margin-top: 16px;
padding: 16px 20px;
background: #0b1220;
border: 1px dashed #334155;
border-radius: 8px;
color: var(--muted);
font-size: 13px;
line-height: 1.6;
}
.status-badge {
display: inline-block;
font-size: 11px;
padding: 2px 8px;
border-radius: 4px;
background: #1e293b;
color: var(--muted);
margin-left: 8px;
vertical-align: middle;
}
.status-badge.open { color: #f59e0b; }
.status-badge.done { color: #34d399; background: #064e3b; }
.status-badge.wip { color: #60a5fa; }
</style>
</head>
<body>
<div class="calib-header">
<a href="/">← Zurück</a>
<h1>Kalibrierung</h1>
</div>
<!-- TAB BAR -->
<div class="tab-bar" id="tabBar">
<button class="tab-btn active" data-tab="camera-npz">Camera NPZ</button>
<button class="tab-btn" data-tab="board">Board</button>
<button class="tab-btn" data-tab="robot-x-axis">Robot X Axis</button>
<button class="tab-btn" data-tab="arm">Arm1 / Arm2</button>
</div>
<!-- PANEL: Camera NPZ -->
<div class="tab-panel active" id="tab-camera-npz">
<div class="sections">
<div class="section full">
<h2>Camera NPZ <span class="status-badge open">offen</span></h2>
<div class="placeholder-note">
Ziel: Intrinsische Kameraparameter (Kameramatrix, Verzerrungskoeffizienten) für jede
Kamera ermitteln und als <code>.npz</code>-Datei speichern.<br><br>
Geplante Aktionen: Fotos aufnehmen (verschiedene Posen) · Kalibrierung berechnen ·
Reprojektionsfehler anzeigen · Datei speichern.<br><br>
<em>Aktionen werden ergänzt sobald das Konzept feststeht.</em>
</div>
<div class="controls" style="margin-top: 16px;">
<!-- Platzhalter für zukünftige Buttons -->
<button disabled title="Noch nicht implementiert">Fotos aufnehmen</button>
<button disabled title="Noch nicht implementiert">Kalibrierung berechnen</button>
<button disabled title="Noch nicht implementiert">NPZ speichern</button>
</div>
</div>
<div class="section full">
<h2>Ausgabe / Log</h2>
<textarea id="log-camera" readonly placeholder="(Ausgabe erscheint hier)"></textarea>
</div>
</div>
</div>
<!-- PANEL: Board -->
<div class="tab-panel" id="tab-board">
<div class="sections">
<div class="section full">
<h2>Board Referenz-Board-Kalibrierung <span class="status-badge open">offen</span></h2>
<div class="placeholder-note">
Ziel: Extrinsische Position des Marker-Boards im Kamera-Koordinatensystem bestimmen
(Rotations- und Translationsvektor via <code>solvePnP</code>).<br><br>
Geplante Aktionen: Kamerabild mit erkannten Markern anzeigen · Pose berechnen ·
Kalibrierungsdatei speichern.<br><br>
<em>Aktionen werden ergänzt sobald das Konzept feststeht.</em>
</div>
<div class="controls" style="margin-top: 16px;">
<button disabled title="Noch nicht implementiert">Foto aufnehmen</button>
<button disabled title="Noch nicht implementiert">Marker erkennen</button>
<button disabled title="Noch nicht implementiert">Pose berechnen</button>
<button disabled title="Noch nicht implementiert">Board-Pose speichern</button>
</div>
</div>
<div class="section full">
<h2>Ausgabe / Log</h2>
<textarea id="log-board" readonly placeholder="(Ausgabe erscheint hier)"></textarea>
</div>
</div>
</div>
<!-- PANEL: Robot X Axis -->
<div class="tab-panel" id="tab-robot-x-axis">
<div class="sections">
<div class="section full">
<h2>Robot X Axis <span class="status-badge open">offen</span></h2>
<div class="placeholder-note">
Ziel: X-Achse des Roboters im Weltkoordinatensystem verorten (Richtungsvektor und
Nullpunkt). Roboter fährt zwei bekannte Positionen an, Kamera beobachtet den
Endeffektor-Marker.<br><br>
Geplante Aktionen: Zu Referenzposition 1 fahren · Foto · Marker merken ·
Zu Referenzposition 2 fahren · Foto · Achsvektor berechnen · Speichern.<br><br>
<em>Aktionen werden ergänzt sobald das Konzept feststeht.</em>
</div>
<div class="controls" style="margin-top: 16px;">
<button disabled title="Noch nicht implementiert">Pos 1 anfahren</button>
<button disabled title="Noch nicht implementiert">Foto Pos 1</button>
<button disabled title="Noch nicht implementiert">Pos 2 anfahren</button>
<button disabled title="Noch nicht implementiert">Foto Pos 2</button>
<button disabled title="Noch nicht implementiert">Achse berechnen</button>
<button disabled title="Noch nicht implementiert">Speichern</button>
</div>
</div>
<div class="section full">
<h2>Ausgabe / Log</h2>
<textarea id="log-xaxis" readonly placeholder="(Ausgabe erscheint hier)"></textarea>
</div>
</div>
</div>
<!-- PANEL: Arm1 / Arm2 -->
<div class="tab-panel" id="tab-arm">
<div class="sections">
<div class="section full">
<h2>Arm1 / Arm2 Gelenk-Kalibrierung <span class="status-badge open">offen</span></h2>
<div class="placeholder-note">
Ziel: Nullposition und Kinematikparameter von Arm1 und Arm2 einmessen.
Arm fährt in mechanische Nullposition, Kamera prüft die tatsächliche Pose,
Offset wird berechnet und gespeichert.<br><br>
Geplante Aktionen: Arm1 → Nullpos → Foto → Winkel · Arm2 → Nullpos → Foto →
Winkel · Offset-Korrektur speichern.<br><br>
<em>Aktionen werden ergänzt sobald das Konzept feststeht.</em>
</div>
<div class="controls" style="margin-top: 16px;">
<button disabled title="Noch nicht implementiert">Arm1 → Nullpos</button>
<button disabled title="Noch nicht implementiert">Foto Arm1</button>
<button disabled title="Noch nicht implementiert">Arm2 → Nullpos</button>
<button disabled title="Noch nicht implementiert">Foto Arm2</button>
<button disabled title="Noch nicht implementiert">Offsets berechnen</button>
<button disabled title="Noch nicht implementiert">Speichern</button>
</div>
</div>
<div class="section full">
<h2>Ausgabe / Log</h2>
<textarea id="log-arm" readonly placeholder="(Ausgabe erscheint hier)"></textarea>
</div>
</div>
</div>
<script>
// Tab-Switching
document.getElementById('tabBar').addEventListener('click', e => {
const btn = e.target.closest('.tab-btn');
if (!btn) return;
document.querySelectorAll('.tab-btn').forEach(b => b.classList.remove('active'));
document.querySelectorAll('.tab-panel').forEach(p => p.classList.remove('active'));
btn.classList.add('active');
const panelId = 'tab-' + btn.dataset.tab;
document.getElementById(panelId).classList.add('active');
});
// Section collapse (gleiche Logik wie Hauptseite)
document.querySelectorAll('.section h2').forEach(h2 => {
h2.addEventListener('click', () => h2.closest('.section').classList.toggle('collapsed'));
});
</script>
</body>
</html>