If you have a teenage family member or friend, you may be familiar with FIRST Robotics, but maybe not with DJI’s RoboMaster competition: Imagine FIRST times 10. RoboMaster pits teams of University students against each other, each fielding six custom robots designed and built according to certain specs and rules. DJI’s S1 is a simplified, scaled-down, version of one of the “standard” robots that you might see in RoboMaster.
Unboxing a DJI RoboMaster S1
The S1 comes in a few dozen pieces, with a graphical set of instructions for assembly. I’d place the difficulty as being a little harder than putting a LEGO robot together, and less stressful than assembling an Ikea desk. Once you have the S1 built and its battery charged (also the optional Gamepad if you’re using one), the next step is to install the app and log in to a DJI account. It seems a bit excessive to have to create or log in to an account just to play with a toy robot, but if you’re ever going to want to participate in a multi-player scenario it makes some sense. Weirdly, the mobile version of the app asks for permission to make and manage phone calls. Fortunately saying no doesn’t seem to hurt anything.
Connecting the S1 over Wi-Fi to your router uses a clever but sort-of-annoying approach of having you tell the app your SSID and password to generate a QR code you scan with the S1’s camera. It’s not a big deal to do once, but it appears to have to be repeated any time you want to connect the S1 to a different device. That makes it painful to (for example) use a PC for programming and a phone in the Gamepad for battle. You can also use WiFi direct or a USB cable to connect to the S1, so I suspect a good solution might be to use a USB-C cable connected to a PC for programming and then Wi-Fi with a phone for operating the S1.
You can drive the S1 right away from the app, using the touchscreen on a phone or tablet, or keyboard and mouse on a PC. The Windows version is in beta, which may explain why it didn’t work on my laptop. You can also load your phone into the (optional) Gamepad-style controller, and rely on the controller’s joystick for movement and command buttons for operations like firing. I’m not sure why there isn’t a second joystick on the Gamepad for turning, but instead, you need to use your phone’s touchscreen (or change the settings so that the S1 rotates to follow whatever you do with the Gamepad). The real fun comes in when you start to program the S1 — either using some of the provided pre-built code or by learning to program it on your own.
The S1 can either fire infrared beams or gel capsules (similar to the ammunition used in the RoboMaster competition — just make sure and soak them for a few hours, per the incredibly-small-print instructions on the bottle). The capsules are non-toxic and disintegrate into dust that can be vacuumed up. An LED can provide visual feedback on where the S1’s gun is aimed, as long as your surroundings aren’t too bright, but primary manual targeting is with the FPV camera that showcases a gunsight in the middle.
Of course, you can also program the robot to aim and fire. Six targets on the sides, front, and rear of the bot respond to infrared or physical impacts. The targets aren’t very large, so close range shooting is helpful. There is a 1080p FPV camera aligned with the gun, that you can livestream in the app. FPV mode helps you target, of course, but also limits your ability to see anywhere except where the gun is pointed.
For safety, by default, the S1 won’t let you fire beads when your barrel is raised more than 10 degrees above level, so its effective range is limited to a few meters. However, if you turn the safety off and raise the barrel, the gun does an impressive job of hitting targets as far as 15 yards away, as you can see from the below video. Of course, DJI encourages you to wear safety glasses and not aim at any people or animals! That said, even at 3 feet the capsules weren’t able to punch through the paper air gun targets I used to test it (but they could clearly cause damage to an eye, for example).
Programming the S1 in Scratch or Python
Scratch is a graphical, block-based, programming environment created by MIT Media Lab as an educational tool. It is similar to LEGO’s EV3 programming system but more extensive. For those who are already comfortable with programming, Python is provided as an alternative, and you can always see the Python code generated by a Scratch program in case you want to migrate.
If what you’re hoping to do is program a battle robot, then the provided set of blocks for Scratch is extensive and well thought out. You can start at the lowest level, directly programming the gimbal, the gun, and how the S1 responds to hits on its armor. Or you can mix and match some of the existing modules and build on them. At the most sophisticated level, there are subroutines for tracking a person, and for line following.
The programming module has a basic debugging interface, where you can run the program while looking at what the robot is seeing. Once you have a program working, you can run it manually, as a custom skill when doing Battle, or set it load when you put the robot in Autonomous mode. DJI promises a library of programming videos, but so far it looks like there is part of one is available. It covers interacting with the robots PIDs (Proportional-Integral-Derivative Controllers), but seems to skip the portion where actually programming the PIDs is explained).
Speaking of PIDs, by allowing direct control of them, the S1 programming environment provides some differentiation from many less-expensive alternatives. For those who are used to simple “tell the robot where you want it to aim” programming, under the surface, there is almost certainly an algorithm that relies on a feedback loop with a PID to actually turn to the target expeditiously while minimizing overshoot. With the S1 you can tweak the algorithms that drive the PID for yourself, to hopefully create a better targeting system than your competition.
A Little About the RoboMaster Competition
RoboMaster’s big event is head-to-head between two teams of college students. Until recently they were almost all from China, but in 2018 there were teams from a number of countries, including the USA and Japan. The bots weigh up to 80 pounds and are all custom built by the team. The compete on a complicated battlescape, with the drivers facing away from the action, and relying on a mini-map to see where all the other bots are on the field. Almost all of the action revolves around shooting. Bots load up with ammunition from supply depots and go to work. Each team can field a Hero robot, a Sentry robot, and some Infantry robots, and potentially even a drone. Teams get points for both inflicting and avoiding damage, with the higher-scoring at the end of the timed match winning.
Most coverage of RoboMaster is in Chinese, but if you’re curious about the inspiration for the S1, here is coverage of the first day of the 2018 competition.
Not the Best Robot for Other Applications
If you don’t want to fight, the S1 may not be the best robot for you. While the S1 has plenty of interesting AI-powered features and a solid programming environment, DJI’s choice of hardware is definitely battle-focused. For example, there are hit detectors on every side of the robot, but no Ultrasonic distance sensors that would be very helpful for autonomous navigation or SLAM applications. Similarly, you’re paying for a sophisticated gimballed gun that could be omitted or replaced by more cameras or other sensors for other applications. Or you could buy a Jetson Nano and build yourself a JetBot, for example. Speaking of which I now have a review JetBot in house, so we’ll be doing a hands-on article on it soon as well.
Great for Programming and Fighting
The S1 isn’t the best platform for hardware hacking. You can add on to it, but the basic robot only goes together one way. However, it has plenty of software flexibility, so if you want to get going with a battling robot without having to solder or source parts from all over, it’s a great option. Of course, you need $500 and some friends with a similar desire and budget to make the most of it. If you do want to have fun programming a battling robot and have the cash, the S1 is great.