This section is dedicated to explaining how to create more advanced applications. The program can be used immediately with a skid/steer robot built using the Lego Mindstorms EV3 kit. After compiling the first test programs, readers will be able to remote control the robot using the keyboard as shown below.
The following instructions assume that the GNU Cross Compiler has been already installed and the process of compiling, and running programs in the EV3 brick is well understood.
The Robot Navigation software uses C++ shared libraries that are not available in the EV3 Linux operating system. Therefore the compiler must be instructed to statically link the libraries during compilation time. This method creates quite large executable files as the external functions have to be embedded in the executable. I have provided instructions for Linux, Mac and Windows users. The software is been updated regularly, so it is advisable to check for updates.
Linux and Mac Instructions
Download all the program files from the Robonav Github repository using the following command:
git clone https://github.com/robotnav/robotnav.git
The Makefile file must have the -static flag set in order to link the libraries statically.
CFLAGS = -g -Wall -static
Move to the directory containing the source code and compile the program using:
This command will create the executable main file. Copy this program and telnet (or ssh) into the EV3 Brick, then execute the program from the terminal window. The robot can be now controlled using the arrow keys directly from the computer terminal. There will be a lot of information presented on the screen, which shows the full state of the robot, sensors, and time. We will be using this information in future projects.
A video of the system in action can be found below.
Download the programs from the Robonav Github repository. The best way to do this is by using a git client (e.g. git for Windows). Alternatively, the programs can be downloaded using the “Download Zip” button available in the Web interface. By default it will be saved in the Downloads directory with the name robotnav-master.zip. Uncompress the zip file in a working directory. This will show several C++ files (extension .cpp).
Go to the directory containing the source code, and run the following instruction:
If the make program for Windows is not available, the program can still be compiled using the compiler only as follows.
arm-none-linux-gnueabi-g++ *.cpp -o main
Both solutions (make or compiler only) will create the same result, but using make is more efficient as it only recompiles the programs that have been modified.
The main executable file can now be copied to and executed in the EV3 Brick using ssh for Windows tools.