EV3 simulator for the ev3dev2 library
Project description
ev3dev2simulator: simulator for the EV3 (ev3dev2 API)
The behaviour of the EV3 robot is simulated in the simulator. This is convenient to quickly test programs when you momentarily don’t have access to an EV3.
You can use the 'ev3dev2' python library to program the EV3. The simulator installs a fake 'ev3dev2' library on the PC. When using this library on the PC, every call to this API is forwarded to the simulator which uses it to simulate the behaviour of the EV3 robot.
For an example see: https://github.com/ev3dev-python-tools/thonny-ev3dev/wiki/Simulator-example
The running program can be seen in the following video: http://www.cs.ru.nl/lab/ev3dev2simulator.html .
The thonny-ev3dev plugin makes it easier to program the EV3 programmable LEGO brick using the Thonny Python IDE for beginners. The thonny-ev3dev plugin for the Thonny IDE comes with the ev3dev2simulator.
For more info about the thonny-ev3dev plugin see: https://github.com/ev3dev-python-tools/thonny-ev3dev/wiki
For more info about Thonny: http://thonny.org
Getting started
Prerequisites needed only for Linux
For Macos and Windows you don't need any prerequisites, but for linux you do.
The pyttsx3 python speech library uses system libraries in its implementation. For Macos/Windows the used system 'speak' libraries are always available, but for linux you must sure these are installed with:
sudo apt update && sudo apt install espeak ffmpeg libespeak1
For linux there are is no binary distribution available for simpleaudio. The Python 3 and ALSA development packages are required for pip to build the extension. For Debian variants (including Raspbian), this will usually get the job done:
sudo apt-get install -y python3-dev libasound2-dev
Installation
Install with pip:
pip install ev3dev2simulator
For Windows and Macos all binary dependencies are provided by wheels on pypi, however for Linux the binary extenssion for simpleaudio is compiled when installing.
Then you can just run the simulator by running the executable:
ev3dev2simulator
The simulator works on all python versions 3.8 till python 3.12.
Using the simulator
The user guide of the simulator can be found on the wiki.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file ev3dev2simulator-2.0.9.tar.gz
.
File metadata
- Download URL: ev3dev2simulator-2.0.9.tar.gz
- Upload date:
- Size: 309.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c7c6f825f388951279dd6414c83a1412b81fb708ccdeede7b50090b8004c9fd7 |
|
MD5 | d00e0d9808e8ff98574995bce0a91622 |
|
BLAKE2b-256 | 80cfa0813c263a1dfe092f3069a01dd20cd34d053a5640c0fce283f053539bb7 |
Provenance
File details
Details for the file ev3dev2simulator-2.0.9-py3-none-any.whl
.
File metadata
- Download URL: ev3dev2simulator-2.0.9-py3-none-any.whl
- Upload date:
- Size: 356.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f1b25617c6495c20610f00e9b304dc94aae0d7823b55ab66ef856807c41beba2 |
|
MD5 | 0a1ee8cd8f752f259423b97b41ab83f7 |
|
BLAKE2b-256 | 1c8a82b85447e4a4f3bf669cde80a7ca270ddb74f046e7c255cd5e9e2901252b |