Holonomic Robot.doc

advertisement
Holonomic Robot
The modern world today very much depends on its technology. Technology is
found in every aspect of our life, from microchips to airplanes. Robots started to play
a big role in our society in the last few decades. Robots play big roles in our lives,
they are used in many different industries, from medicine to car factories. These
robots aid us in our progress of civilization. Our achievement means their progress,
whether that progress is in medicine or in Artificial Intelligence. And they have come a
long way, and further progress can only be imagined.
Robots come in all different shapes and sizes and with different intentions.
Some are small others are bulky, some have wheels, others have legs, some use
contact sensors while others use remote sensors. All of them help us to achieve our
goal whatever that goal may be.
In this case we are trying to construct a robot that is going to be used to teach
young programmers and robot enthusiasts how does a holonomic robot move. The
robot can also teach the basics of robot mechanics; easily visible parts can aid in
better seeing the mechanics of this robot. All parts of the robot can be easily
explained and understood.
So what does holonomic mean? In Oxford dictionary holonomic is described
as: Velocity constraints are holonomic if they force a curve in state space to stay in a
proper subspace. What does that mean? From the picture below you can see the
picture of a holonomic robot; you can notice that the robot has three omni-wheels
that are spaced equally. The omni-wheels have another set of wheels on top of the
regular wheel that enables the robot to move in any direction independent of the
wheel placement. The servos that drive the omni-wheels of the robots are able to
move in both directions.
So what does holonomic mean exactly? It means that the robot can move
360 without moving from its pivot center, it also implies that rotation is independent
of translation. The robot can make almost any turn as long the turn has the width of
the robot. This robot has an advantage over other robots because it can turn in very
tight spaces. This robot can be useful for industries where robots for example need to
examine air ducts. Most of them are used in research laboratories where scientists
are trying to understand Artificial Intelligence. We are going to use this robot to teach
students about movement and physics of the robot. The students will be able to send
instructions to the robot and watch its movement through a camera which is
mounted above the environment. The environment has obstacles around the robot
that can be navigated through. This can teach the students how to operate the robot.
The holonomic robot has few parts to be assembled; Acroname.com is one of
the suppliers of holonomic robots. The web site features robots that can be
purchased pre assembled and preprogrammed. They also have robot parts that you
can get and assemble the robot your self.
The robots have a 4cm Roller Wheel that
allows the robot to move in any direction, these omniwheels are extremely smooth and require a special
surface. The surface needs to be a little sticky for the
omni-wheels to grasp.
A Basic Stamp II
Controller from Parallax, Inc.
controls the servos; they are
programmed by the BASIC
Stamp which sends simple
impulses to the servos.
Continuous BB Servo then take
the impulses from the
processor that then turns the
omni-wheels at a velocity
proportional to the duration of
the pulse (“pulse width
modulation”). All the technical
information on what and how to
connect all the hardware can
be found at: http://www2.cs.cmu.edu/~reshko/PILOT.
The servos have one disadvantage. Their 8 bit value is not linearly proportional to the
speed. The graph below demonstrates this.
Some small differences between PPRK and our project made big changes in
the robot:
 PPRK uses Palms OS, while we are using Windows CE
 PPRK programmed in C while we used java’s RMI
 We are using javax.comm
 We are using wireless connection to talk to the RMI
 Our handheld is HP 5450
 We are using Basic Stamp II processor
 Setting up the working environment
So with all the servos how exactly does this robot move? The omni-wheels of
the robot allow the robot to move in any direction. Depending on the velocity, time
and which omni-wheel turns the robot can move in any direction. The robot can move
holonomically across a flat surface and control its rotational speed. The impulses
sent to the robot control how long, how fast and in which direction the omni-wheels
should turn. With this information the omni-wheels can move the robot straight, back,
left, right or backwards. If the robot is going straight only two omni-wheels are moved
by the servos while the third is being pushed. Going backwards would be the same
action only reversed. Rotating left or right can involve all the omni-wheels moving in
the same direction.
r -wheel radius
F0, F1, F2 -unit direction vectors
v - desired body velocity expressed in
body coordinate frame
w - angular velocity
b - wheel baseline
v0, v1, v2 - wheel linear velocities
w0, w1, w2 - wheel angular velocities
n - wheel number
pn - velocity of the body at a given
wheel n
F0 = [-1, 0]
F1 = [1/2, -sqrt(3)/2]
F2 = [1/2, sqrt(3)/2]
This allows the robot to change direction and be very maneuverable. The chart above
shows some relations between the omni-wheel velocity and the angular velocity. The
velocity depends on the wheel number and the wheel linear velocity. Detail
explanation of how the physics of the holonomic robot work can be found at:
http://euclid.nmu.edu/~ikruhak.
The diagram below shows us how the holonomic robot moved around very
tight spaces. In this experiment the holonomic robot is going around some obstacles.
The picture taken is the holonomic movement of the robot.
In this diagram you can see how the robot can navigate around the obstacles
and still preserve most of the environment. In other words the robot can transit very
tight spaces. This holonomic movement helps the robot to preserve a lot of energy by
turning tight corners. It also preserve time as the robot takes less time to navigate
through the obstacles.
We have created the environment to demonstrate the movements of the
holonomic robot to students. The environment about 6’ by 4’ it is created from 1”
metal pipes that are wrapped with 3” Styrofoam insulation. Artificial grass carpet is
used for the flooring, the back of the carpet is used. The surface is sticky and
therefore has better grip on the omni-wheels that would usually be sliding on other
surfaces. We also use random objects that the robot can navigate around. To show
the movements of the holonomic robot a camera is placed above the environment.
The camera feeds the web page where the project is hosted:
http://euclid.nmu.edu/~ikruhak. From there visitors are able to control the robot and
give it instructions in terms of velocity, time and which omni-wheel needs to be run.
To have PDA talk to the robot we are using the javax.comm library of port
drivers controlling the PDA through the serial port. An RMI server will accept
connection from the client and then take the variables which it will pass to the stamp
processor via javax.comm The client is going to run through a web page; actually the
web page is going to be sending data to the client; that is, it is going to be on the
server which is hosting the page. The client has a simple interface that takes the key
strokes from the keyboard and sends it to the server. The server takes few
arguments speed, time, and servo number. This information is fed to the RMI server
and the server sends the information to the stamp processor.
All the required java classes are on the PDA, the main class that runs the
robot is the RMI server. The server first created the registry on the local machine
which in this case is on the PDA. The server than rebinds to the static IP address that
has been assigned to the PDA.
java.rmi.registry.LocateRegistry.createRegistry(5001);
java.rmi.Naming.rebind("//204.38.16.199:5001/chat", server);
The server also takes the arguments for the control of the robot. The server
than then those arguments and gives them to StampTalker.java. This class takes the
arguments passed by the RMI server and opens the port on the robot.
The StampTalker.java opens the port using this technique:
{ // try to find the port named in comm
portId = CommPortIdentifier.getPortIdentifier(comm);
if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { // if the port we found
if(portId.getName().equals(comm) && !portId.isCurrentlyOwned()) { // the port we want and not in use
try { // try to open the port
port = (SerialPort) portId.open("STAMP", 20000); // set standard serial port parameters
try { port.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1,
SerialPort.PARITY_NONE); }
catch(Throwable t) { System.out.println("Failed to set/invalid parameters: "+t); }
// create an output stream for writing to port
try { outStream = port.getOutputStream(); }
catch(Throwable t) { System.out.println("Error creating output stream: "+t); }
// create an input stream for reading form port
try { inStream = port.getInputStream(); }
catch(Throwable t) { System.out.println("Error creating input stream: "+t); }
// attach an event listener to detect serial port changes
try {port.addEventListener(this); }
catch(Throwable t) { System.out.println("Error add Serial Listener: "+t); }
// make sure the port tells when it has data to give
port.notifyOnDataAvailable(true);}
catch(Throwable t) { System.out.println("Error opening port "+comm+": "+t); }
}
}
}
catch(Throwable t)
{
System.out.println("Error getting portId: "+t);
t.printStackTrace();
System.out.println("Serial Port not initialized. Exiting...");
System.exit(0);
}
The class also takes arguments from the server, the arguments are then
passed to the Stamp II which in turn talks to the servos. Stamp Talker takes the
information from the server and with time variable runs a while loop. Stamp II takes
in one byte at a time; the numeric bytes are sent to the stamp from user input. To
indicate the end of the numeric data non numeric character is send. The data
contains stream of bytes, which are then broken down by the Stamp II. Stamp II than
takes the data and sends the impulses to each of the servos and time variable. In
this case the port is only told what it needs, in case that the port looses connection,
or if the Stamp program produces error the application is notified. The class depends
on another class that is the interface to StampTalker and all the implantation has to
be done through this class, StampTalk.java.
public interface StampTalk
{
public void instruct(int speed, int time);
public String getData();
}
The robot itself needs to ran with simple program, this where BASIC comes in. The
program contains simple routines that pass the impulses to the servos.
if (Value > 79) L1
servo1 = Value
goto L4
L1:
if (Value > 159) L2
servo2 = Value - 80
goto L4
L2:
if (Value > 239) L3
servo3 = Value - 160
goto L4
L3:
time = Value - 240
goto L5
L4: GOTO LOOP
L5: time = time*100
for t=0 TO time STEP 1
pulsout 1, servo1
pulsout 2, servo2
pulsout 3, servo3
pause 10
NEXT
debug "2RightTurn"
GOTO LOOP
This snipped of the code shows how the Stamp II program has simple routines
and how one simple routine sends the impulses to the servos. The servos from this
information know which servo to turn and for how long.
The client on the other hand has its own class and it is very simple. The client
first looks for a registry and then it tries to bind to it.
r = LocateRegistry.getRegistry("204.38.16.199");
server = (SimpleServer)r.lookup("StampServer");
The client draws a simple applet that enables the user to connect to the RMI
server. Client also has four text boxes where the user can input the speed for the
servos and the time for how long the robot should run. The speed takes in the
integers from 0 to 80 and the time can be entered from 0 to 16 seconds. This
information is then sent to the server which in turn sends it to the robot. Client also
allows the user to enter already preset movements of the robot. These movements
are traveling in a straight line, turning left or right and spinning left or right.
Instructions of how to use this functionality can be found at:
http://euclid.nmu.edu/~ikruhak/Programming/instructions.htm
The web site is hosted on Euclid and all the information can be found at:
http://euclid.nmu.edu/~ikruhak. Under the documentation link you can find project
updates from week to week. This page is primarily made so anyone can see the
progression of the project from week to week. Under the links there are web sites
from which the information has been obtained. There one can find information about
the PPPRK, the physics of the robot, the java.sun download packages for
javax.comm, and others. On the page there is also some information about the code
and RMI collected. Information about the Pocket PC can also be found. The
programming link contains all the java and BASIC files that are used for the robot.
The RMI classes as well as BASIC Stamp program. The web site we hope can host the
camera where the students will be able to come and control the robot. The clients are
eventually are going to connect from the web site, the site will have a simple applet
that will connect to the client on the server. The students will not neccesseraly have
to be in the same room as the robot. The environment where the robot will operate
will be on fed live through the camera that is going to be mounted above. This will
allow the students to see the whole environment and immediate results of the
holonomic movement.
I have learned many things from doing this project. I learned about robots and
how they work, the mechanics and about the servos, processors and electronics. I
also have deeper understanding of WinCE, and operating JOEDE which runs java
programs. I have also learned about Pocket PC’s file structure and that the operating
environment is well hidden from user. The file structure was made to be similar to
Windows NT. The structure has the same folder names such as: windows, program
files, my documents and such. What it does not have is the command prompt for the
operating system. When writing arguments through third party software, the
environment can hardly find its own folders. To make things even more complicated
there is no known documentation out there about the working environment. The
environment was one of the key things we needed to install the javax.comm to
control the robot through the serial port. One person that we know has written
javax.comm for the PDA and was able to run it, could not give us detail instructions
on how to install its package. His site claims that package works but instructions on
installing it are very vague. There also isn’t that many experts out there do the fact
that the platform is fairly new. This surely made things little more complicated.
Another valuable lesson was to learn to ask the right questions. During the
time of searching for answers I have learned how to be specific about putting in
queries in the web search engines. I was also able to sign in many different forums
which has helped to get my self familiar with that resource. There is a lot people that
are willing to help, to any kind of questions, as long you are asking the right
questions.
This is a cool project but with time given there isn’t enough time. The majority
of the project has been finished, I hope that someone can continue where I have left
of and be able to give young students to learn about these fascinating robots. The
biggest problem we have encountered has been javax.comm and having it talk to the
Stamp II processor. Javax.comm has been very difficult to install due to the fact that
we could not set the WinCE environment. Maybe in the future Windows will document
their software and allow the public to work with their product more freely. Or to be
more realistic, for someone to explain an easy way to set environmental variables in
WinCE. The robot would be a great learning tool for the young enthusiast.
Download