A mobile robot lab for demonstrating advanced nonlinear controller design and decentralized control schemes.
A mobile robot lab for demonstrating advanced nonlinear controller design and decentralized control schemes.
While working at university, I designed and built a mobile robot lab for demonstrating advanced nonlinear controller design and decentralized control schemes. Once an experiment is started, the nodes can operate independently, allowing truly decentralized controller execution. Various flavors of nonlinear model predictive control and collaborative control tasks were successfully implemented.
I designed the robots from scratch to accommodate the setup's rather unique requirements. The decentralized approach requires significant computing power on each node, while use in student experiments demands long battery runtime and short charge cycles. The nodes are modular in design, with the drivetrain controller and processor module mounted on plug-in boards. Depending on the application, a stepper motor or brushed DC drive can also be fitted. The nodes run Linux. A separate embedded controller implements real-time operations.
Without getting into too much detail, the nodes are roughly configured as follows:
The brushless drive also makes the robot quite fun to drive around. The drive system delivers enough torque to wheelie the robot, do burnouts, or wreck it in a crash. While doing wheelies with robots might be fun, the main reason behind generating lots of torque is to allow for fast-settling kinetics. A low-level PI-feedforward controller was designed to largely compensate for the dynamics. This allows controller design under purely kinematic assumptions, greatly simplifying the resulting nonlinear program. Closed-loop control can also be disabled if kinetics should also be optimized.
Robot position is measured using a 3D motion tracking setup mounted to the ceiling trusses. The robot was designed to accept different unique, non-symmetric spherical marker patterns.
Because the concrete floor in the lab environment was quite uneven, I ended up designing a false floor setup that can be leveled using adjustable feet. The arena measures roughly 24 × 12' (4 × 8 m). The driving surface was fitted with a textured PVC film to minimize wheel slip. The frame was constructed from aluminum extrusions. The frame was designed to carry a human being, as it is necessary to walk on the surface for camera calibration.
Two projectors were mounted to provide real-time plotting on the driving surface. Mirrors project the image to allow for horizontal projector mounting (required for heat dissipation). Because this results in some not-so-trivial projection geometry, custom image rectification was implemented. The plotting software is also custom and can be accessed using a Python module injected into the controller runtime. Along with the projectors, a 3D motion tracking system was also mounted on the ceiling.
Considerable time was invested in developing custom software that allows easy execution of truly decentralized control schemes. The entire lab is controlled from a web-based control panel. The control panel was written using the React framework and Material UI. Real-time updates are pushed to the web panel using WebSockets. The entire lab can be operated remotely.
The web panel features a built-in code editor. The code can be uploaded and executed on each robot node with the click of one button. Code execution usually starts roughly one second later. Each node's Python console is streamed to the code editor. Exceptions are caught on each node and highlighted in the code editor. Additional exception logging was also implemented to examine each node separately after running an experiment. Using the same mechanism, switching between different experiments only takes seconds. The Python runtime on the nodes provides full hardware abstraction and intuitive APIs.
Each controller script can also offload parts of the computations to an additional server. This is particularly useful when solving optimization programs that are too involved for the Cortex processor. A signaling scheme was implemented for inter-node or node-server communication.
I chose C++ for most of the backend and Node.js ES6 for the web app. The node firmware was written in plain C. Due to its heavy overhead, Python is only used for controller script execution.