Add contol node for the LEDs

This commit is contained in:
2026-05-01 11:09:39 +00:00
parent 261e18af83
commit a1f91e834b
7 changed files with 263 additions and 4 deletions
+4
View File
@@ -73,6 +73,10 @@ async def websocket_endpoint(ws: WebSocket):
node.publish_cmd_vel(data.get('linear_x', 0.0), data.get('angular_z', 0.0))
elif msg_type == 'joint_command':
node.publish_joint_command(data.get('pan', 0.0), data.get('tilt', 0.0))
elif msg_type == 'led_color':
node.publish_led_color(data.get('r', 0.0), data.get('g', 0.0), data.get('b', 0.0), data.get('a', 1.0))
elif msg_type == 'led_effect':
node.publish_led_effect(data.get('effect', 'off'))
except WebSocketDisconnect:
pass
except Exception as e: