1 Star 0 Fork 7

xiaoyangge / RoboMasterPy

forked from 楠木 / RoboMasterPy 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

RoboMasterPy

English | 中文

Documentation Status

RoboMasterPy is a Python SDK and framework for RoboMaster EP.

The SDK(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'

RoboMasterPy Goalkeeper

The framework deals with video streaming, push and event, provides a high-level interface for controlling and communication. You can build your controlling logic basing on it.

Fun Examples

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.

MIT License Copyright (c) 2020 LI Zhennan Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

大疆机甲大师EP的Python SDK和编程框架 展开 收起
Python
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Python
1
https://gitee.com/xiaoyangge_admin/robomasterpy.git
git@gitee.com:xiaoyangge_admin/robomasterpy.git
xiaoyangge_admin
robomasterpy
RoboMasterPy
master

搜索帮助