Skip to content
John Sabino edited this page Feb 21, 2015 · 3 revisions

The Joint Architecture for Unmanned Systems is used in the Interoperability Profiles Challenge (IOP Challenge) part of the IGVC. As of now, we are using the JAUS Toolset (JTS) for the IOP Challenge.

How To Install JTS, Build/Compile an example, and Run the example (on Ubuntu 14.04 LTS)


Downloading JTS

Download the binary version of the JTS from here. Make sure to download jaustoolset-binary-v2.2.1.zip. Unzip in the directory of your choice. I'll extract it to the desktop in a folder named jaustoolset-binary-v2.2.1 for this guide.

Note: The download comes with a helpful user guide that will give you familiarity with the tool.

Updating the .bashrc

Update your .bashrc file. This is required to successfully build and compile the example. From the terminal, open up your .bashrc file. You can use the text editor of your choice, I'll use gedit.

From the terminal,

gedit ~/.bashrc

Add the following lines to the end of your .bashrc file.

#export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:'./lib'

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:.

Save and close the file.

Then from the terminal

source ~/.bashrc

Install Dependancies

From the terminal,

sudo apt-get update

sudo apt-get install scons

Check your Java version,

java -version

If it says OpenJDK, you will have to uninstall it and install the Oracle JDK. Follow this 'Ask Ubuntu' forum to help you uninstall OpenJDK. Then follow this guide to help you install the Oracle JDK.

Building the Example

Navigate to the folder where you extracted the JTS, and go into the examples folder. We will be working with the PingComponent_120 example.

In the terminal,

cd Desktop/jaustoolset-binary-v2.2.1/examples/PingComponent_120

Before building you will have to edit the Sconstruct file.

In the terminal,

gedit Sconstuct

Add 'rt' to the following line in the Sconstruct file (line 39)

    env.Program('./bin/PingComponent_120', sources, LIBS=['PingServerService', 'PingClientService', 'Common', 'rt'])

Also add '-lrt' to this part of the code, (line 34)

Remove '-lrt' from this part of the code, (line 34)

    elif os.name == 'posix':

    env.Append( LINKFLAGS = ['-lpthread'] ) 

    env.Append( CPPFLAGS = ['-g', '-Wno-write-strings'])

    Export('env')

Save and close the Sconstruct file.

Now to build run the following in the terminal,

scons

(make sure you are in the PingComponent_120 directory when you run scons)

Run the Build

When it finishes building, a "bin" folder is created in the PingComponent_120 directory. Navigate to this folder and run the build.

cd bin

./PingComponent_120

You should see JAUS output the message hello world. This example uses the heartbeat pulse attribute. To understand the program you can look at the code inside the "src" folder in the PingComponent_120 directory.