Python library and framework for RoboMaster EP.
Project description
RoboMasterPy
English | 中文
RoboMasterPy is a Python library and framework for RoboMaster EP.
The library(client) is straightforward to use:
>>> import robomasterpy as rm
# IP of RoboMaster is detected under router mode
>>> cmd = rm.Commander()
# check RoboMaster's API version
>>> cmd.version()
'version 00.00.00.60'
>>> cmd.get_robot_mode()
'chassis_lead'
# ensure your Robomaster has enough room to move
>>> cmd.chassis_move(x=-1, z=30)
'ok'
# activate video streaming,
# which can be handled by the framework.
>>> cmd.stream(rm.SWITCH_ON)
'ok'
# activate gimbal attitude push at 5Hz,
# which can be handled by the framework.
>>> cmd.gimbal_push_on(attitude_freq=5)
'ok'
# Watch out!
>>> cmd.blaster_fire()
'ok'
The framework deals with video streaming, push and event, you can build your controlling logic basing on it, for example(TODO: add links):
- Drive your robomaster using keyboard;
- Make your robomaster a goalkeeper.
Installation
RoboMasterPy requires Python 3.6 and above.
pip install robomasterpy
If you are using Python 3.6.x, you need to install dataclasses
:
pip install dataclasses
User Guide
https://robomasterpy.nanmu.me/
Documentation is generously hosted by Read the Docs.
Health and Safety Notice
- Your Robomaster may hurt people or pet, break stuffs or itself;
- Make sure your RoboMaster has enough room to move; make sure the ground is clear;
- Start slowly, avoid using high speed for debugging;
- Use cushion;
- Stay safe and have fun!
Paperwork
RoboMasterPy is a fan work, and it has no concern with DJI.
DJI, RoboMaster are trademarks of SZ DJI Technology Co., Ltd.
Acknowledgement
RoboMasterPy was incubated during a RoboMaster EP developing contest. The author would like to thank DJI for hardware and technical support.
License
RoboMasterPy is released under MIT license.
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 robomasterpy-0.1.0.tar.gz
.
File metadata
- Download URL: robomasterpy-0.1.0.tar.gz
- Upload date:
- Size: 14.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cd3644b087aa757c3683359ea3bca8058e3f2b718012c7e5f5b765afd984c207 |
|
MD5 | bc31aa4e1a47faea772bfc4025beed23 |
|
BLAKE2b-256 | 48a89dc75c8fcb1dd7797d37e7728a6cbccc3f0d336915bb50fe379bd3c25559 |
File details
Details for the file robomasterpy-0.1.0-py2.py3-none-any.whl
.
File metadata
- Download URL: robomasterpy-0.1.0-py2.py3-none-any.whl
- Upload date:
- Size: 15.5 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ebf330b5be7ba3b49c6ea5b6d4124a7eaebb13b8c0c40aa4983f5da5210a1a6 |
|
MD5 | f8e5f95b6416adb50276b604f0360fdd |
|
BLAKE2b-256 | 900b12c52392acad29088a582c60149a0709e12b7ae213a1717aafa88d83f228 |