Read constraints from the published URDF rather than hard code them.

Also make the webui more responsive for small screens.
This commit is contained in:
2026-05-01 14:20:59 +00:00
parent ee71c80edd
commit 16ee4b8296
11 changed files with 221 additions and 60 deletions
+5
View File
@@ -54,6 +54,7 @@ async def lifespan(app: FastAPI):
node = start_ros()
node.on_joint_states_callbacks.append(manager.broadcast_from_thread)
node.on_ultrasonic_callbacks.append(manager.broadcast_from_thread)
node.on_joint_limits_callbacks.append(manager.broadcast_from_thread)
yield
stop_ros()
@@ -65,6 +66,10 @@ app = FastAPI(lifespan=lifespan)
async def websocket_endpoint(ws: WebSocket):
await manager.connect(ws)
node = get_node()
# Send cached joint limits immediately so the client doesn't wait for the next publish
cached_limits = node.get_joint_limits()
if cached_limits:
await ws.send_json({'type': 'joint_limits', 'limits': cached_limits})
try:
while True:
data = await ws.receive_json()