RoboMasters is a super interesting robotics competition hold by DJI, Ltd. My teammates and I participated its first event in 2015.
Before the match began at May 31st, each team had to design 3 robot tanks, companied with 2 robots provided, to combat in a battle field. The combat proceeded by shooting small spherical bullets toward enemy tanks. The tanks’ shield was provided by the organizer, carrying a judge system that can sense impact from hitting bullets and calculate remaining Hit Points (HP). When all tanks from a team have their HP empty, or the HP of a team’s base hits zero, the combat is over.
We were given 3 months for preparation. Our team was divided into 3 groups–mechanical, eletronical and programming. The mechanical group and eletronical group each had 5-7 people, while I alone were reponsible for programming the robots. (Initially I had two other people working together with me, but they left our team due to conflicted time schedule.)
Though busy, I had a very enjoyable time in the three months. I spent almost all my spare time in the lab, learning, discussing, baffled by mysterious problems and exhilarated after having them solved.
The three projects were the source code running on three kinds of PCBs in each tank–respectively one Turret Controller, four Wheel Controllers and one Control Center. They were all based on STM32.
Turret Controller, receiving commands from Control Center, rotated the yaw and pitch angles of a turret and regulated the speed of shooting motors. It also managed to sustain a stable and accurate posture of the turrent by calculating data from a gyro-accelerometer (just like a chicken’s head). The most challenging part was the feedback control of posture. We had to balance between the control latency and stability. Of course, lower latency is always desired as we want our input to be achieved as quickly as possible. The problem was, given the unignorable weight of the turret itself and the limited torque of the motors for controlling posture, the turret could only be rotated within bounded angular acceleration, which meant high latency when the force was too light, or drastic viberation when the rotation speed was too high.
A Driver Controller was assigned to each wheel to control the wheel’s behavior. Mecanum Wheel, required by the organizer, was used as the drive system. It allows stationary rotation as well as sideway movement by simply giving different directions and speeds to the four wheels. Through feedback control, each Driver Controller managed to achieve as accurately as possible the target speed given by Control Center.
Control Center, as its name suggests, was the brain of a tank. It received commands from a remoter, gathered data from all sensors and other boards, sythesized situation it was in, calculated posture and speed it had to achieve or maintain and gave orders to other controllers.
The communication between PCBs was established via CAN bus. It is widely used in car industry where all kinds of sensors are communicating through CAN with each other and the main computer.
Result and thoughts
We didn’t perform our best on the battle field that day. Looking back, I think it was due to a number of outside and inside reasons, e.g. unknown eletromagnetic jamming in the venue, hasty preparation, lack of reverse current protection (when moving our super heavy tanks between match rounds, we broke some of our tanks) and so on. Some deeper reasons rooted in our project management strategy. Though, I really enjoyed the competition, especially its preparation phase.
During the wonderful time, I have gained so much engineering knowledge and experience. I learnt the process of designing and producing our own mechanical components from our genius mechanical group. The eletronical group has taught me how to better debug circuit problems and the way to design PCBs that are free of bugs. The whole experience was also very enlightening, showing me the great power of teamwork.