Alex Margaris / Mini-Rosco / Spring 2020
Designing an Automated Drive Mode with an Obstacle Avoidance Algorithm
Author/s: Alex Margaris
Table of Contents
Introduction
The following information will explain how to design and implement a toggle-able Automated Drive mode with a Navigation Algorithm that allows the Robot to avoid obstacles. The goal of this function is to give the user the option of manually controlling the Robot in RC Mode or having the Robot automatically navigate to a way point coordinate.
Necessary Components or Materials:
It should be noted that the implementation of an automated driving robot requires the use of at least one external sensor. In this instance, a US-100 ultrasonic sensor was used as a means of detecting objects within the Robot’s path.
It should also be noted that in this particular instance, the built in way point navigation was used to determine a “final destination” for the robot. In order to do this, either the phone’s on board GPS or an external GPS must be used. This report will not discuss this in detail. To read more about way point navigation please CLICK HERE
Software Block Diagram and Algorithm:
Below in Figure 1 the software block diagram used to design this system can be seen. Please note that the software block diagram will be explained in sections in the next portion of this post.
Steps:
- Create an automated mode command:
In order to create an Automated Mode, a handler must first be defined. This can be done by first declaring a boolean variable, as seen in Figure 2, within the ArxRobot application. Be sure to include this as a command in your CMD_LIST_SIZE. For more information on customizing the ArxRobot application, *CLICK HERE.*
Next, define a boolean variable to reference when determining what mode is currently “TRUE”. As seen in Figure 3 This will be your default mode.
Create a custom Automated Handler Function that enables the user to “toggle” between Automated Mode and Manual (RC) Mode within the ArxRobot application. This can also be written in terms of “TRUE” or “FALSE” if desired. When “FALSE” is active, then the Robot will be in Manual Mode.
Create a custom Move Handler
This can be written using a series of conditional statements. However, the custom Move Handler can ultimately be broken up into two primary conditions: when Automated==TRUE and when Automated==FALSE. When Automated==TURE, the Robot should execute the automated moving algorithm. When Automated==FALSE, the Robot should enter Manual (RC) Mode and should be controllable through the Arxterra control panel.
The Robot should use a distance test based off of readings in the on board ultrasonic sensor to determine what action to take. The motor speeds and directions are then specified based on the action that needs to be taken. This can be seen Figure 4 and Figure 5.
Conclusion
If implemented, a Robot should be able to have a Manual (RC) Mode and an Automatic Mode that should both be toggle-able with ease through the ArxRobot application.