Sample MATLAB Code for Robo Ninja Warrior
Simulator Autostart
Teleoperation and LIDAR visualization
The first code you should run is the teleoperation and LIDAR visualization script. The documentation for how to run it is included in the .m file. If you are using the simulator, and would like to see images from a virtual camera that hovers over the Neato, you can use teleopAndVisualizerWithImages.m.
Characterizing the Motion of the Neato
- Make a plot of the Neato’s position over time (simulator only)
- Run a Simple Wheel Velocity Experiment (simulator only)
Challenge Code
- Collect Scans (starter code for exercise 4 on the Frames of Reference and LIDAR assignment)
- Collect Scans Solution, Make Gauntlet Map Solution (solutions for exercise 4 on the Frames of Reference and LIDAR assignment)
- Place Neato (a helper function to support many of the challenges)
- Bridge of Doom Starter Code QEA 2020
- Bridge of Doom Solution QEA 2020 (this is a sample solution to the Bridge of Doom challenge for QEA 2020)
- Bridge of Doom Solution (this is a sample solution to the Bridge of Doom challenge)
- Flatland Solution (this is a sample solution to the Flatland challenge)
- Gradient Ascent Sample Notebook
- Drive ellipse (this shows how to drive a simple parameterized curve))
- A basic implementation of physical gradient descent. The Neato can use its onboard accelerometer to reach the top of the mountain using this code. In the first few iterations of this module we used to have students do this as one of the three challenges. Recently, we’ve dropped it due to the complexity of supporting it.
- Building blocks of a solution to the Gauntlet (find walls, find circles, make potential fields)
Miscellaneous Robot Code
- Drive Forward
- Drive until bump, Drive until bump with velocity input, Drive until bump then reverse for 5 seconds
- Drive until bump, then run away
- Test twist
- Test stop
- Symbolic function sample (supports the Bridge of Doom challenge)