Open MrCampbellDuchess opened 3 years ago
You need do do pip install robomaster or build the codec whl file yourself, see my open pull request.
-- https://github.com/dji-sdk/RoboMaster-SDK/pull/49 -- https://github.com/JohnieBraaf/RoboMaster-SDK
Hi! I do have the same problem and unfortunately this Pull Request is not merged yet. Can I Download this Code and the SDK will work or do i have to setup something? Thank you for your answer!
Yes, you can use https://github.com/JohnieBraaf/RoboMaster-SDK for now, I have merged the latest upstream commits
On Ubuntu linux you can can install libmedia-codec
using what is currently on the master branch of this repository. A from scratch installation of the SDK can be done using the following commands:
cd RoboMaster-SDK
pip install .
cd lib/libmedia_codec
pip install .
I had to install the libopus
header's to get the libmedia_codec
package to compile on Ubuntu, sudo apt install libopus-dev
.
Getting a windows build to work should be possible as well.
\lib\site-packages\robomaster\media.py", line 32, in init self._video_decoder = libmedia_codec.H264Decoder() AttributeError: module 'libmedia_codec' has no attribute 'H264Decoder'
C:\Users\hahyu\RoboMaster-SDK>python test_robo_connection.py
Traceback (most recent call last):
File "C:\Users\hahyu\RoboMaster-SDK\test_robo_connection.py", line 1, in
C:\Users\hahyu\RoboMaster-SDK> I buid it succesfully without error code but it didn't make "libmedia_codec.dll" Chatgpt says thats the problem that i can't control robomaster, is it right? than how to get libmedia_codec.dll.
As the title suggests when attempt to use the sdk like this:
from robomaster import robot
I get this: Traceback (most recent call last): File "/home/admin/bottest.py", line 1, in
from robomaster import robot
File "/home/admin/.local/lib/python3.7/site-packages/robomaster/robot.py", line 31, in
from . import camera
File "/home/admin/.local/lib/python3.7/site-packages/robomaster/camera.py", line 25, in
from . import media
File "/home/admin/.local/lib/python3.7/site-packages/robomaster/media.py", line 21, in
import libmedia_codec
ModuleNotFoundError: No module named 'libmedia_codec'
I can see it's in the SDK download here on github but I can't get it to work.
Python 3.7.3 on rpi and openCV is installed.