The Oculusprime Java Server Application includes the RED5 Streaming Media Server and the Apache Tomcat web server. The following project creation instructions are for the Eclipse IDE; instructions for IntelliJ IDEA are not included here, but are quite similar.
While the application itself is intended to run only on Linux, you can develop in Windows, OS X, or Linux, and copy the generated
.class files to Linux for testing.
Creating the Project In Eclipse
You need to be using the 64-bit version of Eclipse (so you’ll need a 64-bit JVM 7).
Download the Oculus Prime Server package from xaxxon.com/oculusprime/download, and unpack.
Go into the ‘
oculusPrime/webapps’ folder and delete the entire ‘
oculusPrime’ sub-folder. Then, from within the ‘
oculusPrime/webapps’ folder, do:
git clone https://github.com/xaxxontech/oculusPrime.git
Now open Eclipse, setting ‘
oculusPrime/webapps’ as the working directory, and go to the workbench. Create a new ‘Java Project’ and give it the project name ‘oculusPrime’ (case sensitive). Click ‘finish’.
Right click on the root of the project tree ‘oculusPrime’ in the Package Explorer, and go to ‘properties.’
Under the ‘Source’ tab, set the ‘default output folder’ to ‘
Under the ‘Libraries’ tab, click ‘Add External JARs’ then navigate to the root ‘
oculusPrime’ folder you downloaded, and link the files
'red5-service.jar'. Also link these files within the
Then, download the file servlet-api.jar, save it anywhere, and link that as an external jar as well.
Also, link all the files under
Highlights of the application class structure is as follows:
- oculusPrime.Application is the main entry point to the Server. The underlying Tomcat/Red5 structure launches this first on startup. This class uses Red5 methods to communicate with the Flash plugin via RTMP socket connection. The Flash plugin running in the robot web browser captures and compresses the live video stream, which is served up to Flash clients running in remote browsers (or Air clients on mobile devices). Text commands are also transmitted through this channel.
- oculusPrime.PlayerCommands enumerates all of the valid commands described in the Oculus Prime Command Reference
- oculusPrime.State enumerates the state variables as described in Oculus Prime State Variables
- oculusPrime.commport package contains classes that deal directly with serial port hardware commands and messages (specifically, the Xaxxon Power and MALG motor controller PCBs).
- oculusPrime.Settings including ‘
GuiSettings.java’ and ‘
ManualSettings.java’ contain default settings values and manipulation methods.
- developer – the various developer packages contain experimental code and tools, that are typically disabled in the application unless the setting ‘
developer’ is set to true.
NEXT: ROS and Auto Navigation