dji-sdk / RoboMaster-SDK

DJI RoboMaster Python SDK and Sample Code for RoboMaster EP.
Apache License 2.0
327 stars 151 forks source link

Does this SDK apply to S1 as well or just EP? #10

Open PennTao opened 4 years ago

PennTao commented 4 years ago

I followed the document trying to establish TCP connection to S1 from my mac, but got the error saying that "target machine actively refused it"

I wonder if DJI blocks TCP connection on S1 or did I miss something there

nanmu42 commented 4 years ago

As far as I know, "EP" stands for "education pack", and it is the only version of robomaster officially supporting SDK by now.

YuhooZhu commented 4 years ago

I followed the document trying to establish TCP connection to S1 from my mac, but got the error saying that "target machine actively refused it"

I wonder if DJI blocks TCP connection on S1 or did I miss something there

HELLO, Have you succeeded? I have the same question. 老哥你好,S1是不支持SDK的吗, 你解决了没有, 还是只能等大疆发布?谢谢

brunoga commented 4 years ago

The SDK currently did not work with the S1. DJI have no indications that it ever will but I guess anything is possible. Specially considering that the SDK would work ok in the S1 if DJI wanted it to.

dobl1 commented 4 years ago

Hi, Beyond DJI's desire to make the SDK accessible to S1 (which I hope is possible, it would make the possibility of use much more interesting). Do you think that the hardware of the S1 is the same as the EP (at the control card level)? Because maybe the SDK is not even compatible with the S1 hardware ..

brunoga commented 4 years ago

Yes, it is compatible (ignoring all the hardware present in the EP that is not present in the S1). It is mostly Python code and a single C/C++ binary. In fact, I have it running in my S1 but because it is not supported by DJI, I needed a non-trivial hack to get it running, but it works and the changes are minimal (mostly, copying some files from the EP to the S1).

dobl1 commented 4 years ago

I am very interested to know the procedure, personally I only have the S1 for a few days. Thank you !

YuhooZhu commented 4 years ago

I think I only can remote high and low voltage approxima to control from S1's S.Bus. but cannot use EP SDK, especially how to connect WIFI By SDK, I am very interested to know the procedure too. Thank you !

MarBanW commented 4 years ago

I am also very interested to know the procedure, I have spend some time already with dji support and what I received is we take it under consideration... personally s1 become very interesting only then... Thank you !

brunoga commented 4 years ago

Unfortunately it is not a simple process. You need to root your S1 and then you need to copy some files from the EP to the S1 (so you need access to a Robomaster EP).

MarBanW commented 4 years ago

Do we have any valid (You have :)) procedure how to root s1... There was one but stopped working...

brunoga commented 4 years ago

Yes. For obvious reasons, I am not going to mention it here. :)

MarBanW commented 4 years ago

Agree :)

Toumal commented 4 years ago

Please @dji-dev @grwhale-zhang consider either adding SDK support to the S1, or offer a reasonably priced upgrade path to turn the S1 into a Robomaster EP with SDK support.

MarBanW commented 4 years ago

I agree with @Toumal. I bought s1 (not cheep toy) mainly because of flexability and usage of sdk so offer a reasonably priced upgrade path to turn the S1 into a Robomaster EP with SDK support....

tomso1 commented 4 years ago

please allow your customers to use the product with proper SDK!! @dji-dev @grwhale-zhang

grwhale-zhang commented 4 years ago

Hi guys, this is good news.

You can send good ideas developed with SDK to marketing.education@dji.com and they will reply to you how to apply the SDK.

Good luck.

brunoga commented 4 years ago

@grwhale-zhang Just to clarify, do you mean that they can help us get SDK support in the S1 in an official way?

MarBanW commented 4 years ago

@grwhale-zhang I'm joining my colleague's question...

brunoga commented 4 years ago

Meanwhile...

Robomaster EP SDK working on the S1!

PennTao commented 4 years ago

Meanwhile...

Robomaster EP SDK working on the S1!

This is awesome! Could you share the instruction ?

sam-cms commented 4 years ago

Oh the endless possibilities of that !! Could you please share those instructions indeed ? thanks

wurstcase commented 4 years ago

It involves rooting the S1 and copying over files from the EP, guess he won't share it.

MarBanW commented 4 years ago

@grwhale-zhang I sent info to marketing.education@dji.com 2-3 weeks ago and till now I've not received any answer... Guys any of you have tried to contact them as well? Have you received any info..?

wurstcase commented 4 years ago

@MarBanW contacted them about 2 weeks ago, didn't get an answer either

wydmynd commented 4 years ago

also the same. future customers beware :(

YoshiRi commented 4 years ago

Anybody succeeded to apply the SDK? I've got root access but still can not connect with socket.

MarBanW commented 4 years ago

Hi, How did you manage to get root access? PozdrawiamMarcin-------- Oryginalna wiadomość --------Od: Yoshi Ri notifications@github.comData: śr., 12 sie 2020, 12:46Do: dji-sdk/RoboMaster-SDK RoboMaster-SDK@noreply.github.comDW: MarBanW m.banasinski@wp.pl, Mention mention@noreply.github.comTemat: Re: [dji-sdk/RoboMaster-SDK] Does this SDK apply to S1 as well or just EP? (#10) Anybody succeeded to apply the SDK? I've got root access but still can not connect with socket.

—You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub, or unsubscribe.

YoshiRi commented 4 years ago

@MarBanW Hi. I followed pdf of this discussion. My firmware version is old, so this method may not work in newer firmwares.

ParadoxRobotics commented 4 years ago

Hi @dji-dev @grwhale-zhang !

Do you have any information concerning the support of the S1 with the EP SDK ? I would like to use the S1 as a research platform with OpenCV/Pytorch for robotics application.

Best regards ^^

xlla commented 3 years ago

I have set up a S1 today, before activated it, I can connect it to raspberray pi with a usb cable,

rpi4:~/git/RoboMaster-SDK$ lsusb
Bus 001 Device 005: ID 2ca3:001f 

and join the usb ethernet

rpi4:~/git/RoboMaster-SDK$ ifconfig
enp1s0u1u2u2 Link encap:Ethernet  HWaddr 62:39:79:84:E7:5D  
          inet addr:192.168.42.3  Bcast:192.168.42.255  Mask:255.255.255.0
          inet6 addr: fe80::6039:79ff:fe84:e75d/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:6 errors:0 dropped:0 overruns:0 frame:0
          TX packets:35 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1686 (1.6 KiB)  TX bytes:7812 (7.6 KiB)

rpi4:~/git/RoboMaster-SDK$ ping 192.168.42.2
PING 192.168.42.2 (192.168.42.2): 56 data bytes
64 bytes from 192.168.42.2: seq=0 ttl=64 time=0.658 ms
64 bytes from 192.168.42.2: seq=1 ttl=64 time=0.375 ms
^C

but failure to run the example

rpi4:~/git/RoboMaster-SDK$ vi examples/01_robot/00_logger.py 
rpi4:~/git/RoboMaster-SDK$ python3 examples/01_robot/00_logger.py 
2021-01-02 23:14:08,013 INFO robot.py:1116 Robot: try to connection robot.
2021-01-02 23:14:08,014 INFO conn.py:278 CONN TYPE is rndis
2021-01-02 23:14:08,015 INFO conn.py:318 SdkConnection: request_connection, local addr ('192.168.42.3', 10457), remote_addr ('192.168.42.2', 20020), proxy addr ('192.168.42.2', 30030)
2021-01-02 23:14:13,021 ERROR conn.py:268 SdkConnection: RECV TimeOut!
2021-01-02 23:14:13,028 WARNING conn.py:337 SdkConnection: Connection Failed, please check hareware connections!!!
2021-01-02 23:14:13,029 ERROR robot.py:1169 Robot: Connection Failed, Please Check Hareware Connections!!! conn_type rndis, host ('192.168.42.3', 10457), target ('192.168.42.2', 20020).
2021-01-02 23:14:13,029 INFO robot.py:1122 Robot: initialized, try to use default Client.
2021-01-02 23:14:13,030 ERROR client.py:70 Client: __init__, create Connection, exception: module 'robomaster.config' has no attribute 'DEFAULT_CONN_PROTO'
2021-01-02 23:14:13,031 WARNING client.py:102 Client: initialize, no connections, init connections first.
2021-01-02 23:14:13,036 INFO dds.py:180 Subscriber: dispatcher_task is running...
2021-01-02 23:14:13,038 INFO uart.py:68 serial: dispatcher_task is running...
2021-01-02 23:14:13,038 ERROR client.py:150 Client: send_sync_msg, client recv_task is not running.
2021-01-02 23:14:13,040 WARNING robot.py:1269 Robot: enable_sdk error.
2021-01-02 23:14:13,042 ERROR client.py:150 Client: send_sync_msg, client recv_task is not running.
2021-01-02 23:14:13,043 WARNING robot.py:1339 Robot: reset dds node fail!
2021-01-02 23:14:13,046 ERROR client.py:150 Client: send_sync_msg, client recv_task is not running.
2021-01-02 23:14:13,047 WARNING robot.py:1325 Robot: enable_dds err.
2021-01-02 23:14:13,049 ERROR client.py:150 Client: send_sync_msg, client recv_task is not running.
2021-01-02 23:14:13,051 ERROR client.py:150 Client: send_sync_msg, client recv_task is not running.
2021-01-02 23:14:13,053 WARNING vision.py:260 Robot: enable vision failed.

I thought it due to "un-activation". After activate it thru App, It was never been connected. While plug in usb cable, no usb device appear. Power off and on , no usb device appear.

It seems after activation, dji lock S1 out of this SDK and force us to buy EP to got more money.

brunoga commented 3 years ago

I have set up a S1 today, before activated it, I can connect it to raspberray pi with a usb cable,

rpi4:~/git/RoboMaster-SDK$ lsusb Bus 001 Device 005: ID 2ca3:001f and join the usb ethernet

rpi4:~/git/RoboMaster-SDK$ ifconfig enp1s0u1u2u2 Link encap:Ethernet HWaddr 62:39:79:84:E7:5D
inet addr:192.168.42.3 Bcast:192.168.42.255 Mask:255.255.255.0 inet6 addr: fe80::6039:79ff:fe84:e75d/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:6 errors:0 dropped:0 overruns:0 frame:0 TX packets:35 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:1686 (1.6 KiB) TX bytes:7812 (7.6 KiB)

rpi4:~/git/RoboMaster-SDK$ ping 192.168.42.2 PING 192.168.42.2 (192.168.42.2): 56 data bytes 64 bytes from 192.168.42.2: seq=0 ttl=64 time=0.658 ms 64 bytes from 192.168.42.2: seq=1 ttl=64 time=0.375 ms ^C but failure to run the example

rpi4:~/git/RoboMaster-SDK$ vi examples/01_robot/00_logger.py rpi4:~/git/RoboMaster-SDK$ python3 examples/01_robot/00_logger.py 2021-01-02 23:14:08,013 INFO robot.py:1116 Robot: try to connection robot. 2021-01-02 23:14:08,014 INFO conn.py:278 CONN TYPE is rndis 2021-01-02 23:14:08,015 INFO conn.py:318 SdkConnection: request_connection, local addr ('192.168.42.3', 10457), remote_addr ('192.168.42.2', 20020), proxy addr ('192.168.42.2', 30030) 2021-01-02 23:14:13,021 ERROR conn.py:268 SdkConnection: RECV TimeOut! 2021-01-02 23:14:13,028 WARNING conn.py:337 SdkConnection: Connection Failed, please check hareware connections!!! 2021-01-02 23:14:13,029 ERROR robot.py:1169 Robot: Connection Failed, Please Check Hareware Connections!!! conn_type rndis, host ('192.168.42.3', 10457), target ('192.168.42.2', 20020). 2021-01-02 23:14:13,029 INFO robot.py:1122 Robot: initialized, try to use default Client. 2021-01-02 23:14:13,030 ERROR client.py:70 Client: init, create Connection, exception: module 'robomaster.config' has no attribute 'DEFAULT_CONN_PROTO' 2021-01-02 23:14:13,031 WARNING client.py:102 Client: initialize, no connections, init connections first. 2021-01-02 23:14:13,036 INFO dds.py:180 Subscriber: dispatcher_task is running... 2021-01-02 23:14:13,038 INFO uart.py:68 serial: dispatcher_task is running... 2021-01-02 23:14:13,038 ERROR client.py:150 Client: send_sync_msg, client recv_task is not running. 2021-01-02 23:14:13,040 WARNING robot.py:1269 Robot: enable_sdk error. 2021-01-02 23:14:13,042 ERROR client.py:150 Client: send_sync_msg, client recv_task is not running. 2021-01-02 23:14:13,043 WARNING robot.py:1339 Robot: reset dds node fail! 2021-01-02 23:14:13,046 ERROR client.py:150 Client: send_sync_msg, client recv_task is not running. 2021-01-02 23:14:13,047 WARNING robot.py:1325 Robot: enable_dds err. 2021-01-02 23:14:13,049 ERROR client.py:150 Client: send_sync_msg, client recv_task is not running. 2021-01-02 23:14:13,051 ERROR client.py:150 Client: send_sync_msg, client recv_task is not running. 2021-01-02 23:14:13,053 WARNING vision.py:260 Robot: enable vision failed. I thought it due to "un-activation". After activate it thru App, It was never been connected. While plug in usb cable, no usb device appear. Power off and on , no usb device appear.

It seems after activation, dji lock S1 out of this SDK and force us to buy EP to got more money.

The S1 does not include all files required for SDK support on its firmware so, technically DJI does not lock it out of SDK support after you activate it, it already did that when it shipped the S1. But yes, the SDK is not supported in the S1 but not due to any technical problem. Just because DJI does not want to.