TommyZQ commited on
Commit
dc4a0b5
1 Parent(s): 647fa9d

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +117 -3
README.md CHANGED
@@ -1,3 +1,117 @@
1
- ---
2
- license: apache-2.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Getting Started
2
+
3
+ Create a new conda environment for robomaster
4
+
5
+ ```bash
6
+ conda create -n robomaster python=3.8
7
+ pip install robomaster dora-rs==0.3.3
8
+ ```
9
+
10
+ Create a new conda environment for idefics2. This requirements file suppose that your using cu122.
11
+
12
+ ```bash
13
+ conda create -n idefics2 python=3.10
14
+ conda activate idefics2
15
+ pip install -r requirements.txt
16
+ ```
17
+
18
+ ## Robomaster Jailbreak
19
+
20
+ ### Installation of the Robomaster S1 Hack
21
+
22
+ This guide is an updated version of the original [Robomaster S1 SDK Hack Guide](https://www.bug-br.org.br/s1_sdk_hack.zip) and is intended for use on a Windows 11 system.
23
+
24
+ #### Prerequisites
25
+
26
+ Before you get started, you'll need the following:
27
+
28
+ - Robomaster S1 (do not update it to the latest version, as it may block the hack).
29
+ - [Robomaster App](https://www.dji.com/fr/robomaster-s1/downloads).
30
+ - [Android SDK Platform-Tools](https://developer.android.com/tools/releases/platform-tools). Simply unzip it and keep the path handy.
31
+ - A micro USB cable. If this guide doesn't work, there might be an issue with the cable, and you may need to replace it with one that supports data transfer.
32
+
33
+ #### Instructions
34
+
35
+ 1. Start the Robomaster App and connect the Robomaster S1 using one of the two options provided (via router or via Wi-Fi).
36
+ 2. While connected, use a micro USB cable to connect the robot to the computer's USB port. You should hear a beep sound, similar to when you connect any device. (Please note that no other Android device should be connected via USB during this process).
37
+ 3. In the Lab section of the app, create a new Python application and paste the following code:
38
+
39
+ ```python
40
+ def root_me(module):
41
+ __import__ = rm_define.__dict__['__builtins__']['__import__']
42
+ return __import__(module, globals(), locals(), [], 0)
43
+
44
+ builtins = root_me('builtins')
45
+ subprocess = root_me('subprocess')
46
+ proc = subprocess.Popen('/system/bin/adb_en.sh', shell=True, executable='/system/bin/sh', stdout=subprocess.PIPE, stderr=subprocess.PIPE)
47
+ ```
48
+
49
+ 4. Run the code; there should be no errors, and the console should display **Execution Complete**
50
+ 5. Without closing the app, navigate to the folder containing the Android SDK Platform-Tools and open a terminal inside it.
51
+ 6. Run the ADP command `.\adb.exe devices `. If everything is working correctly, you should see output similar to this: ![image](https://github.com/Felixhuangsiling/Dora-Robomaster/assets/77993249/dc6368ec-052c-4b18-8fdc-0ec314adb073)
52
+ 7. Execute the upload.sh script located in the folder `s1_SDK`.
53
+ 8. Once everything has been executed, restart the S1 by turning it off and then back on. While it's booting up, you should hear two chimes instead of the usual single chime, indicating that the hack has been successful.
54
+
55
+ ## Robomaster Connection
56
+
57
+ Make sure to be connected using the wifi hotspot of the robomaster which is the most stable one.
58
+
59
+ The default password for the hotpsot is: 12341234
60
+
61
+ You might need to have a second wifi card if you want to be able to run the demo with internet on.
62
+
63
+ ## Post-Installation test
64
+
65
+ Please try running idefics2 with:
66
+
67
+ ```bash
68
+ conda activate idefics2
69
+ python tests/test_idefics2.py
70
+ ```
71
+
72
+ Please try running robomaster with:
73
+
74
+ ```bash
75
+ conda activate robomaster
76
+ python tests/test_robomaster.py
77
+ ```
78
+
79
+ ## Running the demo
80
+
81
+ ```bash
82
+ export HF_TOKEN=<TOKEN>
83
+ conda activate idefics2
84
+ # This requires dora==0.3.3, update with:
85
+ # cargo install dora-cli
86
+ dora up
87
+ dora start graphs/dataflow_robot_vlm.yml --attach --hot-reload
88
+ ```
89
+
90
+ Current way to interact is by press up arrow key on laptop to record a message and send to the VLM
91
+
92
+ ## Running the demo without robot
93
+
94
+ ```bash
95
+ export HF_TOKEN=<TOKEN>
96
+ conda activate idefics2
97
+ # This requires dora==0.3.3, update with:
98
+ # cargo install dora-cli
99
+ dora up
100
+ dora start graphs/dataflow_vlm_basic.yml --attach --hot-reload
101
+ ```
102
+
103
+ Current way to interact is by press up arrow key on laptop to record a message and send to the VLM
104
+
105
+ ## Kill process in case of failure
106
+
107
+ Due to a Python GIL issue, we currently meed to kill processes manually. You can use the following command to do so:
108
+
109
+ ```bash
110
+ pkill -f 'import dora;'
111
+ ```
112
+
113
+ ## LICENSE
114
+
115
+ While the source of this library is licensed under Apache-2.0, the usage of the Text to Speech(TTS) SystemEngine is licensed under Mozilla Public License 2.0 and GNU Lesser General Public License (LGPL) version 3.0.
116
+
117
+ Feel free to remove the TTS SystemEngine.