- Notifications
You must be signed in to change notification settings - Fork 561
Open
Description
Describe the bug
When running swift_recording.py or readme.py from the examples folder, Swift crashes with the error:
## Application error: a client-side exception has occurred (see the browser console for more information). The browser console shows multiple errors, including:
Error: Incorrect or missing format: Valid formats are gif, webm, ffmpegserver, png, jpg, webm-mediarecorder Uncaught TypeError: Cannot read properties of null (reading 'children') The crash occurs specifically when calling env.start_recording(). I tried with a simpler example and the same issue happens.
Version information
Installed from PyPI inside of a Python .venv:
- roboticstoolbox-python: 1.1.1
- swift-sim: 1.1.0
- Python: 3.11.9 (also tested on 3.9.5, same result)
- OS: Windows 11
To Reproduce
Steps to reproduce the behavior:
- Use a local Python environment and install roboticstoolbox-python (in Windows)
- Run the following script:
import swift import roboticstoolbox as rtb import spatialmath as sm import numpy as np env = swift.Swift() env.launch() panda = rtb.models.Panda() panda.q = panda.qr Tep = panda.fkine(panda.q) * sm.SE3.Trans(0.2, 0.2, 0.45) arrived = False env.add(panda) dt = 0.05 env.start_recording("panda_swift_recording", 1 / dt) while not arrived: v, arrived = rtb.p_servo(panda.fkine(panda.q), Tep, 1) panda.qd = np.linalg.pinv(panda.jacobe(panda.q)) @ v env.step(dt) env.stop_recording()- The model loads and starts to move, but then the environment crashes.
Expected behavior
Recording should start without crashing Swift.
Screenshots
Additional context
I am running Swift in Chrome. Had a crash issue when loading the model, but was fixed following #383.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels