Robot Simulator v1.0 
README
20.09.2000



*******************************************************************
*******                                                   *********
*******      WELCOME TO ROBOT SIMULATOR v1.0 !!!          *********
*******               written by Vladislav Belogroudov    *********
*******************************************************************



    This is small robotic cell simulation program.
It represents itself OpenGL model of robot KUKA KRC 15 and
tool exchange system. I worked with such real system 
at the Institute for Process Control, Robotics and Automation of the
University of Karlsruhe in Germany during my study and practice. 
This robot simulation was not commercial or whatever project 
and there were no special purposes to do it except _FUN_. 
It was my home exercise in programming with OpenGL, CORBA 
and TCL/TK. So it's rather free software and never was going 
to be sold for whatever money, you CAN CHANGE, COPY it or improve, 
but DON'T SELL (let me know if you are interested in future of it).
 
Any feedbacks are welcome, #:0) 
Any copylefts are reserved... #:0|


Installation procedure is described in 'robosim/INSTALL' file.
Release notes are in 'robosim/NOTES' file. 
TK client description is in 'robosim/README.TK' file.
Here and later it's assumed that main directory of this project 
is "robosim" - as after extracting from archive file.  



####################################################################
############### Starting programs ##################################
####################################################################


Binaries can be found in robosim/bin directory. 
To start robot server you'll need to know host name of computer
you are running the server on and define some kind of port number
available, for example 8888 or 7777 or 1234 .....
It should be in range 1000..65000. So, for example your machine
name is "fruitcake.anyplace.org".
To start server, type at a shell prompt :

	./robot_server 8888

This program should start OpenGL server.
To exit it (not now but later) - type "Ctrl-C" in that shell and 
say "yes" for any questions.

To start sample CORBA client program (or any client program)
type :
	./corba_client fruitcake.anyplace.org 8888

As you can guess parameters specify address and port number 
of the server. You can start clients wherever you want over
Internet. So now you can see some funny movements of modeled robot
in OpenGL window. Commands are sent from client to robot server
over network.

To start client with TK interface, go to directory robosim/tkclient
and type:
	./tk_client

You should look at documentation shipped with this client - 
in file 'robosim/README.TK'. You can get it with help of the client itself,
just press <help> button. By the way, look at installation notes
in 'robosim/INSTALL' if you cannot run it. You'll need very small correction
of the version of TCL/TK accordingly to your system.





####################################################################
############# OpenGL window hot keys ###############################
####################################################################


Actually, you can do a lot in that OpenGL window...
These are available commands( hot keys) :


	<<< VIEW COMMANDS >>>

	W	- maximize window
	w	- set initial size of window 
	cf 	- change color of the floor
	cb 	- change color of the cell background
	R	- modify red value of RGB color, after cf/cb 
	G 	- modify green value of RGB color, after cf/cb
	B	- modify blue value of RGB color, after cf/cb
	V	- initial point of view	
	v       - change mode to viewing
	+       - zoom out
	-	- zoom in
	F	- set maximum CPU usage by this program
	f	- set small CPU usage by this program
	q	- destroy window
	ESC	- destroy window

The best way to learn it is to try it.
Just type a letter from list and with pressed mouse button
(any button - if not specified later, #:0) ), move mouse
left - right, up - down...

For color modification type <cf> or <cb> and move mouse left-right.
It will change one of RGB values - you can specify last by pressing
<R>, <B> or <G>. To move or rotate view - type first <v> to
change mode of window to viewing modification and then with 
left button pressed you can rotate the scene in the window,
with right button pressed - move it, and if you have middle button -
you are lucky - you are able to scale the scene with up-down 
movements. If you don't have middle button try <+> and <->.	


	<<< ROBOT COMMANDS >>>

While trying these commands it's better not to run any clients,
for reason of confusing.


	1	- set joint 1 active for movement
	.
	.
	6	- set joint 6 active for movement
	7	- set attached gripper active for movement

To move specified joint - type a letter and move mouse
while holding button, left-right. Left - always decreasing
value (this time - joint), Right - increasing.

	g<N>	- take gripper N, where N is 1,2 or 3
	d	- detach any gripper
	x	- set linear movement along X axis
 	y	- set linear movement along Y axis
	z	- set linear movement along Z axis
	X	- set rotation of tool frame about X axis
	Y	- set rotation of tool frame about Y axis
	Z	- set rotation of tool frame about Z axis
	t<n>	- take object <n> (attach it to tool frame )
	r<n>	- release object <n> (detach it from tool frame)

<n> is number from 0 to 9 - all objects are numbered starting
from 0.

Just for study try to get bigger gripper on robot, move 
to box, grasp it and put on the floor....



###################################################################
############# Making clients ######################################
###################################################################


This section is an explanation of how to build you own clients.   

There is an excellent self explanatory files on how to build
your own CORBA clients or include client code into other programs.
Look into robosim/corbaclient folder for 'Sample_Calls.*',
'Corba_Client.*' and into robosim/include at 'Command_Type.h' files.
Also you will need IDL file 'Robot.idl'  in robosim/commoncorba,
you can include interface definition from it into existing projects.


Socket clients are organized differently. They are more like
HTTP clients. Firstly client sends one byte message which says
how much rest of command will be. Then goes just string with
numbers. The last is reassembled into command structure for GL server.
Communication is done with regards to not blocking work. Server won't 
hang up because of dummy clients. But I strongly recommend to use
CORBA - you will save time and money (on ASPIRIN...). The line consists
of numbers, separated by commas. First goes "long" command type,
then one "long" parameter and else 20 "double" parameters.
Because I define length of package by "byte" it should not be
more then 255 characters in the sent line... also serves against
clients trying to send very big packages. Probably you will rarely
use all parameters for a command - just send what you need, not
always all 22 numbers, #:0) , but keep in mind that restriction.



###################################################################
############# Have a lot of fun !!! ###############################
###################################################################


Vladislav Belogroudov, 15.09.2000, Karlsruhe, Deutschland  


###################################################################
*************   email : linux62i@yahoo.com  ***********************
*******  WWW :  wwwipr.ira.uka.de/~belogrou (if not closed) *******
###################################################################


