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.

Done

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:
java.net.MalformedURLException: unknown protocol: rsrc

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

As workaround i can recomend Fat Jar (http://fjep.sourceforge.net/) 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) {
              e1.printStackTrace();
         }
 
    System.out.println("Starting vlc with file: " + port);
    System.out.println(vlcpath + "\\vlc.exe -vvv ");
    pr_ = rt.exec("cmd /c START "+system.data.library.vlc + "\\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=192.168.1.10:1238}}");
    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) {
         e1.printStackTrace();
        }
 
    if(exitVal != 0)
    {
        System.out.println("");
        while ( (line = br.readLine()) != null)
             System.out.println(line);
        System.out.println("");
    }
 
    System.out.println("VLC should be started");
} catch (IOException e) {
    e.printStackTrace();
}

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.

Update:

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 )

With this small script the Servo degrees can be set by matlab.

 
% Define Serial Port for communication with the Kondo Robot
s=serial('COM1','Baud',115200,'DataBits',8,'StopBits',1,'Parity','none');
 
% Set RCB-1 Servo Position From Robot
cmd=hex2dec('FD');
% ID 0 means Channel 1:12
% ID 1 means Channel 13:24
ID=hex2dec('00');
% Servo Speed
Speed=hex2dec('07');
% Degrees in Hexadecimal representation
ch(1)=hex2dec('00');
ch(2)=hex2dec('07');
ch(3)=hex2dec('5A');
ch(4)=hex2dec('E1');
ch(5)=hex2dec('E1');
ch(6)=hex2dec('5A');
ch(7)=hex2dec('B4');
ch(8)=hex2dec('AD');
ch(9)=hex2dec('50');
ch(10)=hex2dec('E1');
ch(11)=hex2dec('E1');
ch(12)=hex2dec('E1');
 
% Calculate Checksum
TX_checksum=bitand(cmd+ID+Speed+sum(ch),hex2dec('7F'));
 
% Open Serial port and Send Data to the Kondo Robot
fopen(s);
fwrite(s, [cmd,ID,Speed,ch(1:end),TX_checksum], 'uint8');  
fclose(s);

RCB-1

Command Reference

2005.02 v1

For Blue Version servos

This is a partial translation of the Kondo Robot’s

“RCB –1 CommandVer1B.pdf”

Please email and additions or corrections to:

dan@sjrobotics.org

http://www.sjrobotics.org

translated by Daniel Albert

Set RCB-1 ID

[ T X ]

CMD1 CMD2   ID  CHKSUM

1                     2                 3                 4                      [byte]

[ R X ]                         30 mSec Timeout

ID    ACK

1                 2             [byte]

fangulaaa

Parameters

Possible Values

Description
CMD 1 FFh First part of command
CMD 2 5Ah Second part
ID 00h ~ 1Fh Board ID #
CHKSUM ** 00h ~ 7Fh (CMD1 + CMD2 + ID) & 7F
ACK 06h Acknowledgement

** & is a logical AND, + is an add

example chksum :  (FFh + 5Ah + 2h) & 7f = 5Bh

Get RCB-1 ID

[ T X ]

CMD    CHKSUM

1                     2                      [byte]

[ R X ]                         30 mSec Timeout

ID    CHKSUM

1                      2               [byte]

Parameters

Possible Values

Description
CMD FEh Command
TX CHKSUM 00h ~ 7Fh CMD & 7Fh
ID 00h ~ 1Fh Board ID #
RX CHKSUM 00h ~ 1Fh ID & 7Fh


Send RCB-1Servo Position To Robot

[ T X ]

CMD    ID    SPD CH1 … CH12 CHKSUM

1              2               3             4                      15                    16              [byte]

[ R X ]                         30 mSec Timeout

ID    ACK

1                 2             [byte]

Parameters

Possible Values

Description
CMD FDh Command
ID 00h ~ 1Fh Board ID #
SPD 00h ~ 07h Speed
CH1….CH12 00h ~ B4h * Servo degree  (90 = 5Ah)
CHKSUM 00h ~ 7Fh (CMD + ID + SPD + CH1 …+ CH12) &7Fh
ACK 06h Acknowledgement

* Red version additional values

  • DDh = free
  • DEh = 1
  • DFh = 2
  • E0h = 3
  • E1h = Low
  • E2h = High

Get RCB-1Servo Position From Robot

[ T X ]

CMD    ID  CHKSUM

1              2               3                     [byte]

[ R X ]                         30 mSec Timeout

ID    CH1 … CH12 CHKSUM

1                 2             [byte]

Parameters

Possible Values

Description
CMD FCh Command
ID 00h ~ 1Fh Board ID #
CH1….CH12 00h ~ B4h * Servo degree  (90 = 5Ah)
TX CHKSUM 00h ~ 7Fh (CMD + ID) & 7Fh
RX CHKSUM 00h ~ 7Fh (ID + CH1 + … + CH12) & 7Fh
  • Red version additional values
    • DDh = free
    • DEh = 1
    • DFh = 2
    • E0h = 3
    • E1h = Low
    • E2h = High


Set RCB-1 Home Position

[ T X ]

CMD   ID  CHKSUM

1            2                 3                       [byte]

[ R X ]                         10 mSec Timeout

ID    ACK

1                 2             [byte]

Parameters

Possible Values

Description
CMD FBh Command
ID 00h ~ 1Fh Board ID #
CHKSUM 00h ~ 7Fh (CMD + ID) & 7Fh
ACK 06h Acknowledgement

Get RCB-1Home Position From Robot

[ T X ]

CMD    ID  CHKSUM

1              2               3                     [byte]

[ R X ]                         30 mSec Timeout

ID    CH1 … CH12 CHKSUM

1                 2             [byte]

Parameters

Possible Values

Description
CMD FAh Command
ID 00h ~ 1Fh Board ID #
CH1….CH12 00h ~ B4h * Servo degree  (90 = 5Ah)
TX CHKSUM 00h ~ 7Fh (CMD + ID) & 7Fh
RX CHKSUM 00h ~ 7Fh (ID + CH1 + … + CH12) & 7Fh
  • Red version additional values
    • DDh = free
    • DEh = 1
    • DFh = 2
    • E0h = 3
    • E1h = Low
    • E2h = High


Set an RCB-1 Motion Position

[ T X ]

CMD   ID  MOTION# POS# SPD CH1 … CH12 CHKSUM

1            2                 3                         4                5            6                         17                18              [byte]

[ R X ]                         10 mSec Timeout

ID    ACK

1                 2             [byte]

Parameters

Possible Values

Description
CMD F9h Command
ID 00h ~ 1Fh Board ID #
MOTION# 00h ~ 27h One of 40 motions
POS# 00h ~ 63h One of 100 position in this motion
SPD 00h ~ 07h Relative Speed between positions
CH1…CH12 00h ~ B4h Servo degree where 5Ah = 90 degrees
CHKSUM 00h ~ 7Fh (CMD + ID+ MOTION# + POS# + SPD +

CH1 +… + CH12) & 7F

ACK 06h Acknowledgement


Get an RCB-1 Motion Position

[ T X ]

CMD   ID  MOTION# POS# CHKSUM

1            2                 3                         4                       5                [byte]

[ R X ]                         30 mSec Timeout

ID  SPD CH1 … CH12  CHKSUM

1            2             3                    14                         15           [byte]

Parameters

Possible Values

Description
CMD F8h Command
ID 00h ~ 1Fh Board ID #
MOTION# 00h ~ 27h One of 40 motions
POS# 00h ~ 63h One of 100 position in this motion
SPD 00h ~ 07h Relative Speed between positions
CH1…CH12 00h ~ B4h Servo degree where 5Ah = 90 degrees
TX CHKSUM 00h ~ 7Fh (CMD + ID + MOTION# + POS#) & 7Fh
RX CHKSUM 00h ~ 7Fh (ID+ SPD + CH1 +… + CH12) & 7F
ACK 06h Acknowledgement


Set RCB-1 Motion Position Count

[ T X ]

CMD    ID   MOTION#   COUNT CHKSUM

1               2                   3                                4                        5                [byte]

[ R X ]                         30 mSec Timeout

ID       ACK

1                    2          [byte]

fangula

Parameters

Possible Values

Description
CMD F7h Command
ID 00h ~ 1Fh Board ID #
MOTION# 00h ~ 27h(39) Motion #
COUNT 00h ~ 63h(99) Position Index Count
CHKSUM 0h ~ 7Fh (CMD + ID + MOTION# + COUNT) & 7F
ACK 06h Acknowledgement


Get RCB-1 Motion Position Count

[ T X ]

CMD    ID   MOTION#   CHKSUM

1              2                  3                                  4                   [byte]

[ R X ]                         30 mSec Timeout

ID    COUNT   CHKSUM

1                    2                             3             [byte]

Parameters

Possible Values

Description
CMD F6h Command
ID 00h ~ 1Fh Board ID #
MOTION# 00h ~ 27h(39) Motion # stored on RCB-1
COUNT 00h ~ 63h(99) The number of Positions in this Motion
TX CHKSUM 0h ~ 7Fh (CMD + ID + MOTION#) & 7Fh
RX CHKSUM 0h ~ 7Fh (ID + COUNT) & 7Fh


Set an RCB-1 Scenario Motion

[ T X ]

CMD   ID  SCENARIO    MOTIONIDX     MOTION#    CHKSUM

1              2                     3                                         4                                       5                                    6                 [byte]

[ R X ]                         30 mSec Timeout

ID    ACK

1                2        [byte]

Parameters

Possible Values

Description
CMD F5h Command
ID 00h ~ 1Fh Board ID #
SCENARIO 00h ~ 03h Bank number. One of four banks of motion sequences
MOTIONIDX 00h – C7h One of 200 Motion indexes in this scenario of motions
MOTION# 00h ~ 27h One of the 40 programmed motions
CHKSUM 00h ~ 7Fh (CMD + ID + SCENARIO + MOTIONIDX  + MOTION#) & 7Fh
ACK 06h Acknowledgement


Get an RCB-1 Scenario Motion

[ T X ]

CMD   ID  SCENARIO    MOTIONIDX      CHKSUM

1              2                     3                                         4                                        5               [byte]

[ R X ]                         30 mSec Timeout

ID   MOTION#    CHKSUM

1                    2                                    3              [byte]

Parameters

Possible Values

Description
CMD F4h Command
ID 00h ~ 1Fh Board ID #
SCENARIO 00h ~ 03h Bank number. One of four banks of motion sequences
MOTIONIDX 00h – C7h One of 200 Motion indexes in this scenario of motions
MOTION# 00h ~ 27h One of the 40 programmed motions
TX CHKSUM 00h ~ 7Fh (CMD + ID + SCENARIO + MOTIONIDX) & 7Fh
RX CHKSUM 00h ~ 7Fh (ID + MOTION#) & 7Fh


Set an RCB-1 Scenario’s Position Count

[ T X ]

CMD   ID  SCENARIO   COUNT   CHKSUM

1              2                     3                                4                             5                [byte]

[ R X ]                         30 mSec Timeout

ID    ACK

1                2        [byte]

Parameters

Possible Values

Description
CMD F3h Command
ID 00h ~ 1Fh Board ID #
COUNT 00h ~ C7h(200) Number of total positions in scenario
SCENARIO 00h ~ 03h Bank number. One of four banks of motion sequences
CHKSUM 00h ~ 7Fh (CMD + ID + SCENARIO + COUNT) & 7Fh
ACK 06h Acknowledgement


Get RCB-1 Scenario’s Motion Count

[ T X ]

CMD    ID   SCENARIO   CHKSUM

1               2                      3                                   4                  [byte]

[ R X ]                         30 mSec Timeout

ID    COUNT   CHKSUM

1                    2                             3              [byte]

Parameters

Possible Values

Description
CMD F2h Command
ID 00h ~ 1Fh Board ID #
SCENARIO 00h ~ 03h Bank number. One of four banks of motion sequences
COUNT 00h ~ C7h(200) Number of total positions in scenario
TX CHKSUM 0h ~ 7Fh (CMD + ID + SCENARIO) & 7Fh
RX CHKSUM 0h ~ 7Fh (ID + COUNT) & 7Fh


Set RCB-1 Software Switch Bits

[ T X ]

CMD   ID  SWITCH   CHKSUM

1              2               3                                4              [byte]

[ R X ]                         30 mSec Timeout

ID    ACK

1                2        [byte]

Parameters

Possible Values

Description
CMD F1h Command
ID 00h ~ 1Fh Board ID #
SWITCH 00h ~ 04h Bit 0 = SLEEP, Bit 1 = Motion

(bits 2-7 unused)

CHKSUM 00h ~ 7Fh (CMD + ID + SWITCH) & 7Fh
ACK 06h Acknowledgement


Get RCB-1 Software Switch Bits

[ T X ]

CMD    ID   CHKSUM

1               2                     3              [byte]

[ R X ]                         30 mSec Timeout

ID    SWITCH   CHKSUM

1                    2                                3             [byte]

Parameters

Possible Values

Description
CMD F0h Command
ID 00h ~ 1Fh Board ID #
SWITCH 00h ~ 03h Bit 0 = SLEEP, Bit 1 = Motion (bits 2-7 unused)
TX CHKSUM 0h ~ 7Fh (CMD + ID) &7Fh
RX CHKSUM 0h ~ 7Fh (ID + SWITCH) & 7Fh


Play an RCB-1 Motion

[ T X ]

CMD   ID  MOTION   CHKSUM

1             2                3                               4              [byte]

[ R X ]                         30 mSec Timeout

ID    ACK

1                2        [byte]

Parameters

Possible Values

Description
CMD EFh Command
ID 00h ~ 1Fh Board ID #
MOTION 00h ~ 27h One of the 40 programmed motions
CHKSUM 00h ~ 7Fh (CMD + ID + MOTION) & 7Fh
ACK 06h Acknowledgement


Play an RCB-1 Scenario

[ T X ]

CMD   ID  SCENARIO   CHKSUM

1              2                     3                                   4               [byte]

[ R X ]                         30 mSec Timeout

ID    ACK

1                2        [byte]

Parameters

Possible Values

Description
CMD EEh Command
ID 00h ~ 1Fh Board ID #
MOTION 00h ~ 27h One of the 40 programmed motions
CHKSUM 00h ~ 7Fh (CMD + ID + SCENARIO) & 7Fh
ACK 06h Acknowledgement


Set RCB-1 Remote Key Control Command?

[ T X ]

CMD   ID  ADDRESS  KEY1  KEY2  MOTION   CHKSUM

1              2                   3                         4                  5                        6                                7            [byte]

[ R X ]                         30 mSec Timeout

ID    ACK

1                2        [byte]

Parameters

Possible Values

Description
CMD EDh Command
ID 00h ~ 1Fh Board ID #
ADDRESS 00h ~ 9Fh See table below
KEY1 00h ~ 0Fh
KEY2 00h ~ 0Fh
MOTION 00h ~ 27h One of the 40 programmed motions
CHKSUM 00h ~ 7Fh (CMD + ID + ADDRESS + KEY1 + KEY2 + MOTION) & 7F
ADDRESS
1 Shiftkey (nashi) #00h ~ #1Fh
2 Shiftkey 1 #20h ~ #3Fh
3 Shiftkey 2 #40h ~ #5Fh
4 Shiftkey 3 #60h ~ #7Fh
5 Shiftkey 4 #80h ~ #9Fh

Get RCB-1 Remote Key Control Command

[ T X ]

CMD   ID  ADDRESS  CHKSUM

1              2                   3                                4                [byte]

[ R X ]                         30 mSec Timeout

ID    KEY1  KEY2  MOTION CHKSUM

1                2                  3                        4                          5              [byte]

Parameters

Possible Values

Description
CMD ECh Command
ID 00h ~ 1Fh Board ID #
ADDRESS 00h ~ 9Fh See table below
KEY1 00h ~ 0Fh
KEY2 00h ~ 0Fh
MOTION 00h ~ 27h One of the 40 programmed motions
TX CHKSUM 00h ~ 7Fh (CMD + ID + ADDRESS) &7Fh
RX CHKSUM 00h ~ 7Fh (ID + KEY1 + KEY2 + MOTION) &7Fh


Set RCB-1 Servo Trim

[ T X ]

CMD   ID    CH1 … CH12 CHKSUM

1             2               3                      14                   18              [byte]

[ R X ]                         30 mSec Timeout

ID    ACK

1               2             [byte]

Parameters

Possible Values

Description
CMD E9h Command
ID 00h ~ 1Fh Board ID #
CH1…CH12 00h ~ 27h Servo degree trim (00h = -20) (27h = +20)
CHKSUM 00h ~ 7Fh (CMD + ID + CH1 +…+ CH12) &7Fh
ACK 06h Acknowledgement


Get RCB-1 Servo Trim

[ T X ]

CMD   ID  CHKSUM

1            2                 3                [byte]

[ R X ]                         30 mSec Timeout

ID  CH1 … CH12  CHKSUM

1            2                      13                    14             [byte]

Parameters

Possible Values

Description
CMD E8h Command
ID 00h ~ 1Fh Board ID #
CH1…CH12 00h ~ 27h Servo degree trim (00h = -20) (27h = +20)
TX CHKSUM 00h ~ 7Fh (CMD + ID) &7Fh
RX CHKSUM 00h ~ 7Fh (ID + CH1 +…+ CH12) &7Fh