同步操作将从 楠木/RoboMasterPy 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
English | 中文
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'
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.
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
https://robomasterpy.nanmu.me/
Documentation is generously hosted by Read the Docs.
RoboMasterPy is a fan work, and it has no concern with DJI.
DJI, RoboMaster are trademarks of SZ DJI Technology Co., Ltd.
RoboMasterPy was incubated during a RoboMaster EP developing contest. The author would like to thank DJI for hardware and technical support.
RoboMasterPy is released under MIT license.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。