The DAO alternates between driving forwards and backwards every x seconds.
If there is an obstacle in range of one of its four ultrasonic sensors, DAO stops, waits till it is removed, and then proceeds driving along the predefined path.

This program was written due to the DAO being supposed to make an appearence at the “Wiener Forschungsfest 2013″. There it will have to interact with other traffic participants, notice them, and avoid crashs.


Read the rest of this entry »

The input parameters are Sensor Address and command.
The Sensor address is written in Hexadecimal on the Sensor.

 private int read_distance(int Sensor,byte cmd)
            //byte cmd;
            byte addr_h,addr_m, addr_l;
            byte distance_h, distance_l;
            byte data=0;
            byte checksum;
            int tmp_checksum;
            int distance;
            addr_l = (byte)Sensor;
            Sensor = Sensor >> 8;
            addr_m = (byte)Sensor;
            Sensor = Sensor >> 8;
            addr_h = (byte)Sensor;
            tmp_checksum = ~(cmd + addr_h + addr_l + addr_m + data);
            checksum = (byte)tmp_checksum;
            // Break for 1ms
            serialPort1.BreakState = true;
            serialPort1.BreakState = false;
            serialPort1.Write(new byte[6] { cmd, addr_h, addr_m, addr_l, data, checksum }, 0, 6);
            if (cmd == 94) //if reading command is given
                distance_h = (byte)serialPort1.ReadByte();
                distance_l = (byte)serialPort1.ReadByte();
                distance = distance_h;
                distance = distance << 8;
                distance = distance | distance_l;
                distance = 0;
            return distance;

First the distance needs to be measured.

read_distance(4643, 81);

After a waiting time of at least 70ms the measured distance can be read from the sensors.

sens1 = read_distance(4643, 94);

Follow And Hold Distance
A Program to follow and hold distance to an obstical was implemented in Microsoft Visual C#.
This Program reads Distance information from SRF485 Ultrasonic Rangers periodicaly.
And Controlls the Robots Movement through Robax1500.

X-Box Remote Controll
vb joystick
This Program Reads the Input from A X-Box Remote Controll, and sends this input through the Serial interface to the Robax1500 Controller.
It is implemented in Microsoft Visual Basic.
Prerequisites: DirectX SDK Download

Follow A Trajectory
This Program is Following a Predefined Trajectory.
The Trajectory is defined by Speed, Steering Angle, and Period.

What was done:

Better Steering:
The used Servo motors where not powerful enough,
A new steering concept with gearbox motor was made.

New Motor Controller was purchased:
Roboteq Robax1500

This is a 2 Channel Motor controller.
1. Channel in Speed Mode for Driving Motor
2. Channel in Positioning Mode for Steering Motor

Some Optical Changes:

New Ultrasonic Sensors where added:
SRF485 Ultra Sonic Range Finder

Lindy USB to Serial Converter

It should be quite simple:

Right Click on your Project, choose Export, choose Runnable JAR file, choose your Main Class and the destination JAR file.


In my case one Problem occured:

The Project worked properly from within the Eclipse Development Suite, but exported as jar file the rmi connection to the Robot could not be established.

Following Error Message occured:

java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is: unknown protocol: rsrc

Somehow the newest Eclipse versions use a preloader that messes things up.

As workaround i can recomend Fat Jar ( to build the Jar file. It worked for me.

Due to the fact that the jvlc library does not work properly, I decided to use VLC externaly for streaming the video from the Robot to the Controlling PC.

With the jvlc library it would have been possible to hit any button within the VLC player to change options like the Video size or source.

With an external VLC player there is no possibility to change propertys remotly. VLC must be always restarted, with new command line options, to change propertys. The following Code snippets show how to start and how to stop the VLC player.  In this case there should only be one VLC instance be running. Therefore all VLC instances are killed before starting a new one.

The following code shows how an external program like the VLC player can be killed and started.
The exitVal is 0 if no error was returned by the called programm.
If it is not 0 the input stream contains the error message.

Runtime rt = Runtime.getRuntime();
try {
Process pr1=rt.exec("cmd /c TASKKILL /F /im vlc.exe");
int exitVal =0;
    try {
              exitVal = pr1.waitFor();
              System.out.println("Process exitValue: " + exitVal);
         } catch (InterruptedException e1) {
    System.out.println("Starting vlc with file: " + port);
    System.out.println(vlcpath + "\\vlc.exe -vvv ");
    pr_ = rt.exec("cmd /c START " + "\\vlc.exe -vvv dshow:// :dshow-vdev=\""+cam+"\" :dshow-adev=\"\"  :dshow-size=\"320\" :dshow-caching=50 :dshow-chroma=\"\" :dshow-fps=15.000000 :no-dshow-config :no-dshow-tuner :dshow-tuner-channel=0 :dshow-tuner-country=0 :dshow-tuner-input=0 :dshow-video-input=-1 :dshow-audio-input=-1 :dshow-video-output=-1 :dshow-audio-output=-1 :sout=#transcode{vcodec=mp4v,vb=256,scale=1}:duplicate{dst=std{access=udp,mux=ts,dst=}}");
    this.started_ = true;	
    InputStream stderr = pr_.getErrorStream();
    InputStreamReader isr = new InputStreamReader(stderr);
    BufferedReader br = new BufferedReader(isr);
    tring line = null;
    try {
         exitVal = pr_.waitFor();
         System.out.println("Process exitValue: " + exitVal);
        } catch (InterruptedException e1) {
    if(exitVal != 0)
        while ( (line = br.readLine()) != null)
    System.out.println("VLC should be started");
} catch (IOException e) {

Following Hardware Is used for the DAO Robot.

A ARK-3382 embedded industrial PC is used as controller.

Through USB a Microcontroller is fed with controll signals for the steering angle and the vehicle driving speed. This microcontroller, a PIC18F4455,  is generating the acording PWM signals for the Servo Engines and FET Driver Bridge.

For the PWM controlled FET Bridge a HIP4081A is usedas FET driver.

For Steering 2 Servo Engines, RHINO digi4, are used. It has a gearbox made of  Metal, and a Torque: @ 4,8/6,0 V: 200/250 Ncm. Its dimensions are 59x29x55 mm.

A 24V DC Engine with a Power of 250W is used as vehicle drive.

Is a  Bachelor Thesis  about remote Controlling the DAO over Wireless LAN with multiple Video Streams for seeing the environment around the robot.

You can download it here.

The Sourcecode is also available, but i couldnt manage to run the program yet.

There is some problem regarding the combination of the java programm and the VLC player.  (jvlc.jar)

I first thought it is an compatibility problem regarding jvlc.jar and the current VLC player, but an older version of the VLC player did not fix the problem.

I am hoping to find a solution soon.


The remote controlling of the Robot works now. Some methods where missing in the code.

The JVLC library doesnot work yet, but manual streaming is possible. (starting VLC with batchfile or Java  Runtime exec )

This is a guide howto Stream the Video with VLC from the DAO Robot to some Computer.

The Dao Robot has a WLAN Bridge.
Its Current IP Adress is

Use the same Adress Range on your Laptop (for example
run VLC on the Robot.
The following example *.bat file opens a stream for camera2
Just add lines to open multiple streams for multiple cameras.

cd C:\Progra~1\VideoLAN\VLC\

start vlc -vvv dshow:// :dshow-vdev=”cam2″ :dshow-adev=”” :dshow-size=”160″ :dshow-caching=50 :dshow-chroma=”” :dshow-fps=15.000000 :no-dshow-config :no-dshow-tuner :dshow-tuner-channel=0 :dshow-tuner-country=0 :dshow-tuner-input=0 :dshow-video-input=-1 :dshow-audio-input=-1 :dshow-video-output=-1 :dshow-audio-output=-1 :sout=#transcode{vcodec=mp4v,vb=256,scale=1}:duplicate{dst=std{access=udp,mux=ts,dst=}}

On the laptop with the IP Adress open a VLC UDP Stream on Port 1236, either with the “Open Network Stream” Wizzard. or with a *.bat file with following commands:

cd C:\Programme\VideoLAN\VLC\
start vlc -vvv udp://@:1236

Now you can see on your screen what the robot is seeing.

The Unikluni Project started a few years Ago with the DAO robot. A completely self designed robot controlled by a embeded PC (ARK-3382).

Here are some Pictures of its birth.