So in the course of finishing what would have been part 3 of this project, the post processing, I decided that some design changes needed to be made to the robot. I made two hardware changes: larger drive wheels and the addition of a compass sensor.
After assembling the hardware for my SLAM (Simultaneous Localization and Mapping) robot, I set about to write the code which controls the drive motors, senses obstacles, and records the robot’s path. Lego’s NXT kit comes with a rather basic visual programming language called NXT-G. This program, which constructs programs by creating essentially flow charts, is almost counterintuitive to anyone with command line programing experience. I decided instead to use the third-party programming language called Not eXactly C (NXC) and its associated IDE, Bricx Command Center.
Continue reading “SLAM-5 Bot part 2: The Control Algorithm”