brunoga / robomaster

Collection of code related to DJI's Robomaster S1 and EP.
Apache License 2.0
45 stars 8 forks source link

python api in robomaster sdk #6

Closed cuthate closed 1 year ago

cuthate commented 2 years ago

How can I edit and use python api in windows (.py)? E.g pidPitch = rm_ctrl.PIDCtrl() pidYaw = rm_ctrl.PIDCtrl()

brunoga commented 2 years ago

I recommend you look at the documentation for the Robomaster S1/EP.

Robomaster S1 programming Guide

This API can only be used in the robot. To use a python API from outside the robot you need an EP or a hacked S1.

cuthate commented 2 years ago

I am using EP I also have a look at the documentation

e.g. I can't execute in sdk -> variable_b = robot_ctrl.get_battery_percentage()

(My English is not good, I use google translate, sorry)

brunoga commented 2 years ago

The code you showed is for the internal robot API, not the external SDK. It will not work with the external SDK. Documentation for the external SDK is here .

Note this repository has no relationship to the Python SDK whatsoever.

cuthate commented 2 years ago

ok... i got it... I want to use the functions of the api and implement it in the sdk... because i want to use raspberry pi control

Or is there a way to call programs in dji from sdk?