dji-sdk/RoboMaster-SDK

libmedia_codec not installing

MrCampbellDuchess opened this issue · 5 comments

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.

You need do do pip install robomaster or build the codec whl file yourself, see my open pull request.

-- #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.