/robomaster

Getting Started with Robomaster

Primary LanguagePython

stars forks issues

An Ultimate Tutorial for DJI Robomaster S1 Beginners

MY Image

The RoboMaster S1 is an educational robot that provides users with an in-depth understanding of science, math, physics, programming, and more through captivating gameplay modes and intelligent features.

Table of Contents

  1. Top 10 Features
  2. Stimulus that S1 Recognises
  3. Getting Started
  4. Items Check and Assembly
  5. Asembly the Mecanum Wheels
  6. Attaching the Gimbal to the Chassis
  7. Mounting the Gel Bead Container and Intelligent Battery
  8. Hacking into Robomaster S1
  9. References

Top 10 Features

  • Support for Python and Scratch programming language
  • 46 Programmable Components - all in DIY mode
  • 6 Programmable AI Module
  • Low-latency HD FPV
  • Scratch & Python Coding
  • 4WD Omnidirectional Movement
  • Intelligent Sensing Armor
  • Multiple Exciting Battle Modes
  • Innovative Hands-On Learning
  • Two shooting methods: gel beads and infrared beams.
  • Capability to capture photos and record 1080p videos; without a microSD card, it supports only 720p.

Stimulus that S1 recognises

  • Clapping Recognition: the S1 can recognize two or three consecutive claps and be programmed to execute custom responses.
  • Gesture Recognition: the S1 can detect human gestures such as hand or arm signals and be programmed to execute custom responses.
  • S1 Robot Recognition: the S1 can detect other RoboMaster S1 units.
  • Vision Marker Recognition: the S1 can identify 44 kinds of official Vision Markers, which are comprised primarily of numbers, letters, and special characters. All of the files for these Vision Markers can be downloaded at insert web address.
  • Line Recognition: the S1 can detect and follow blue, red, and green tracks with a width of approximately 15-25 mm.

How it works?

  • The RoboMaster S1 can be operated using a computer or a smart device via the touchscreen and gamepad. When using the gamepad with a touchscreen device, the robot can also be operated using an external mouse, which can be connected through a dedicated USB port
  • Users can connect to the RoboMaster S1 via Wi-Fi or a router. When connecting via Wi-Fi, your mobile device or computer connects to the Wi-Fi of the S1. Connection via router provides broader signal coverage, which allows multiple control methods for robots to operate simultaneously on the same network.
  • Flat surfaces such as wood, carpet, tile, and concrete are optimal for operating the S1. Users should avoid surfaces that are too smooth as the S1 wheels may have problems gaining enough traction for precise control. Surfaces with fine particles like sand or dirt should be avoided.

Table of Contents

  1. Getting Started
  2. Items Check and Assembly
  3. Asembly the Mecanum Wheels
  4. Attaching the Gimbal to the Chassis
  5. Mounting the Gel Bead Container and Intelligent Battery
  6. Hacking into Robomaster S1

Getting Started

  • Installing Robomaster Python Module on MacOS
conda create --name dji python=3.7
conda activate dji
pip install robomaster

Steps to assemble Robomaster

robo

image

image

image

image

image

image

image

Items Check and Assembly

image

Assembly the Mecanum Wheels

image

image

image image

Attaching the Gimbal to the chassis

image

image

image

image

image

image

image

image

image

image

image

Mounting the Gel Bead Container and Intelligent Battery

image

image

image

image

image

image

Get Ready!

image

Hacking into Robomaster

What you need

Step by step instructions

  • Unzip the Android SDK Platform‐Tools somewhere in your system
  • Use the Intelligent Controller Micro USB Port and connect the S1 to your computer.
  • Start the Robomaster S1 application. Go to the Lab, create a new Python application and paste the following code:
def root_me(module):
 __import__=rm_log.__dict__['__builtins__']['__import__']
 return __import__(module,globals(),locals(),[],0)
builtins=root_me('builtins')
subprocess=root_me('subprocess')
proc=subprocess.Popen('/system/bin/adb_en.sh',shell=True,executable='
/system/bin/sh',stdout=subprocess.PIPE,stderr=subprocess.PIPE)
  • Run the Code within the S1 Lab. If you followed the steps correctly there should be no compilation errors. The Console will show: Execution Complete

  • Don’t close the S1 Application! Open an Explorer window and go to the directory which holds the earlier extracted Android Platform Tools. Open a PowerShell in this directory (Shift + Right‐Click)

  • Run the ADP command to list the devices:

.\adb.exe devices

You should see something like this:

Screen Shot 2021-07-21 at 2 04 14 PM

  • Execute:
.\adb.exe shell

Screen Shot 2021-07-21 at 2 04 35 PM

DJI Specific Commands

dji
dji_amt_board       dji_derivekey       dji_monitor         dji_verify
dji_blackbox        dji_hdvt_uav        dji_net.sh          dji_vision
dji_camera          dji_log_control.sh  dji_network
dji_chkotp          dji_mb_ctrl         dji_sw_uav
dji_cpuburn         dji_mb_parser       dji_sys

Checking IP address

 ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
8: rndis0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 0a:f8:f6:bb:55:64 brd ff:ff:ff:ff:ff:ff
    inet 192.168.42.2/24 brd 192.168.42.255 scope global rndis0
       valid_lft forever preferred_lft forever
9: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 60:60:1f:cd:95:f7 brd ff:ff:ff:ff:ff:ff
    inet 192.168.2.1/24 brd 192.168.2.255 scope global wlan0
       valid_lft forever preferred_lft forever

Checking the type of Hunter.py file

./hunter.py
vision_ctrl.enable_detection(rm_define.vision_detection_marker)  

Checking Memory Stats

127|root@xw607_dz_ap0002_v4:/system/bin # cat /proc/meminfo
MemTotal:         271708 kB
MemFree:           59076 kB
Buffers:           18700 kB
Cached:            94776 kB
SwapCached:            0 kB
Active:           117648 kB
Inactive:          58020 kB
Active(anon):      62724 kB
Inactive(anon):      136 kB
Active(file):      54924 kB
Inactive(file):    57884 kB
Unevictable:         500 kB
Mlocked:               0 kB
HighTotal:             0 kB
HighFree:              0 kB
LowTotal:         271708 kB
LowFree:           59076 kB
SwapTotal:             0 kB
SwapFree:              0 kB
Dirty:                36 kB
Writeback:             0 kB
AnonPages:         62696 kB
Mapped:            12308 kB
Shmem:               176 kB
Slab:              12712 kB
SReclaimable:       6248 kB
SUnreclaim:         6464 kB
KernelStack:        2152 kB
PageTables:         1300 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:      135852 kB
Committed_AS:     341612 kB
VmallocTotal:     745472 kB
VmallocUsed:      153220 kB
VmallocChunk:     432132 kB

Top Command

oot@xw607_dz_ap0002_v4:/system/bin # top



User 8%, System 13%, IOW 0%, IRQ 0%
User 126 + Nice 0 + Sys 203 + Idle 1138 + IOW 2 + IRQ 0 + SIRQ 1 = 1470

  PID PR CPU% S  #THR     VSS     RSS PCY UID      Name
14020  1   3% S    28 146468K   8588K  fg root     /system/bin/dji_camera
  247  3   3% S    24 213128K  14876K  fg root     /system/bin/dji_vision
  483  1   2% S     8 112412K  11072K unk root     /data/python_files/bin/python
  233  1   2% S    22  44460K   5232K  fg root     /system/bin/dji_hdvt_uav
  239  0   1% S    15  31368K   4464K  fg root     /system/bin/dji_sw_uav
  237  0   0% S    13  24208K   4092K  fg root     /system/bin/dji_network
   41  0   0% S     1      0K      0K  fg root     kworker/0:1
  245  1   0% S     6  31904K  20492K  fg root     /system/bin/dji_blackbox
   69  1   0% S     1      0K      0K  fg root     mmcqd/0
  243  1   0% S    27  50832K   9300K  fg root     /system/bin/dji_sys

References