Control

Robot Navigation allows controlling the robot either by means of direct commands from the user or the high level control. This section explains the different alternatives for controlling a robot and how they can be set in the Robot Navigation software.

User Commands
The InputKeys class has three subclasses that allow the user to interact directly with the robot. Only the first one requires a network connection, while the other two are convenient in places where a WiFi connection may not be available.
Keyboard: Allows sending commands using a computer keyboard through a a remote connection (telnet or ssh). This class is defined as the default user interface class.

Keyboard user_input;

Buttons: Allows sending commands using the EV3 brick buttons. In order to use this user control method, the InputKeys variable must be instructed to create a subclass Buttons.
Buttons user_input;

IrRemote: Uses the IR remote control and receiver to control the robot. This method is quite convenient since it allows remote control without the need of a network connection.
IrRemote user_input(IR_PORT);

Notice that the user only needs to choose the desired user interface method. The rest of the system will continue to operate as usual. A video showing the two methods can be seen at:

High Level Control Commands
The Control class is in charge of running elaborated maneuvers such as self-homing or drawing. At the moment it implements a self-homing algorithm that can be enabled when the user presses the ‘c’ key. This class is created by default in the Robot Navigation main program:

Control control(&odometry);

The demonstration of the high level control can be seen at:

Prev << Position Estimation
Next >> Debugging and Data Analysis