![]() If there is a distance recorded for the angle, max_distance is adjusted as necessary to keep the display scaled to fit on the screen. If the distance recorded for that angle is zero, it's because a reading hasn't be acquired for that angle yet, and we can safely ignore it. The first step of a pass is to clear the display. ![]() In this example we display the distance data on a PiTFT. Since we're constantly reading fresh data, dropping an occasional scan shouldn't be an issue. If it takes too long to process a scan, data from the RPLIDAR will eventually be dropped. ![]() The only requirement is that it be as fast as possible. The process_data function can do anything from finding the closest object, to choosing the best direction to move in. Once we have updated scan_data, it is passed to the process_data function. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |