RoboMasterPy: RoboMaster Python SDK and framework

Release v0.1.1. (Installation)

RoboMasterPy is a RoboMaster Python SDK and framework:

  • Python SDK: inspect and control your Robomaster, remotely;

  • framework: development framework providing and regularising control flow and data flow, resolving common needs like pulling and parsing on video stream, events and pushes, decoupling boilerplate codes like controlling loop, logging, graceful shutdown. You may rely on the framework, implement your business logic with ease of mind and less manual labor.

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()

>>> cmd.get_robot_mode()

# ensure your Robomaster has enough room to move
>>> cmd.chassis_move(x=-1, z=30)

# activate video streaming,
# which can be handled by the framework.

# activate gimbal attitude push at 5Hz,
# which can be handled by the framework.
>>> cmd.gimbal_push_on(attitude_freq=5)

# Watch out!
>>> cmd.blaster_fire()

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, for example:

RoboMasterPy Goalkeeper

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!


RoboMasterPy is a fan work, and it has no concern with DJI.

DJI, RoboMaster are trademarks of SZ DJI Technology Co., Ltd.


RoboMasterPy was developed during a RoboMaster EP developing contest. The author would like to thank DJI for hardware and technical support.


RoboMasterPy is released under MIT license.