Mr Jos Posted December 26, 2020 Posted December 26, 2020 Hey, I've been trying to understand how the inverse kinematic works and found out I need to use a Matrix (many). So I won't be able to just use loads of lists with pybricks. After some more reading I found that I need 'numpy' extension. I don't seem to find it in the 'Visual Studio Code' "extensions" tab. So; Is it possible, and if so, how can I use numpy [or matrix] when running the program on the EV3 bricks alone. Quote
Mr Jos Posted December 26, 2020 Author Posted December 26, 2020 (edited) Any other extension would be good for me aswell.. it's for these matrix's. Edited December 26, 2020 by Mr Jos Quote
David Lechner Posted December 26, 2020 Posted December 26, 2020 Pybricks runs on MicroPython, so regular NumPy for Python won't work with it. If you are using Python 3 on the EV3, you can install NumPy with: sudo apt update sudo apt install python3-numpy There is a numpy-like library for MicroPython at https://github.com/v923z/micropython-ulab but you will need to compile it yourself. Pybricks 3.x will also have a basic Matrix class, but EV3 isn't the focus of the 3.x release, so some things may be broken. You can find daily builds of the `pybricks-micropython` executable for EV3 at https://github.com/pybricks/pybricks-micropython/actions?query=is%3Asuccess+branch%3Amaster+workflow%3ABuild. (Click on a build then scroll down to "Artifacts" and download "pybricks-micropython". Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.