Monday, August 30, 2010

GUI dev for single robot.


A gist of what I have been developing for the past few days. Matlab had weird bugs. I never changed the code but it started running just today( waste of a week's hardwork on trying matlab to work for silly things ). 

Thursday, August 12, 2010

Driving to a point

Have been meddling with the driving to point business.
Wrote an algorithm that drives to any point in all the four quadrants with angle correction and distance correction. The encoder on the create is not very fine so dont be surprised if the robots turn back (while adjusting angle) or drive back ( while adjusting distance covered).

The entire code is in Drive2PointFB.m
:) Happy day.

Monday, June 28, 2010

travelDist

This function is perfect to make the robot go for a certain distance. 


My code:


% Program to make the robot run by setting specified distance.
comm = strcat('COM', num2str(8));
a = instrfind('port',comm);
[serialObject] = RoombaInit(8) ;
%initialize the port
pause (2)
%  Pause for 2 seconds
travelDist(serialObject,0.2,2)
% travel with speed of 0.2 m/s and distance of given mts.
[Distance] = DistanceSensorRoomba(serialObject);
% Read the distance traveled. 


The actual and experimental distance are almost equal. the error max is about 0.01 m and the actual distance is always higher. {but error is negligible}.
A few limitations: The speed could be set up using this function is in the range of 0.025m/s and 0.5m/s. If negative speed is entered, function uses absolute value. When this and turnAngle commands are used, they use the scripting from create Open Interface thus limiting to the fact tht until these commands are completed, it will not be able to accept any other commands. 


The travelDist function can be edited though!!












btw thanks to Dr.Joel Esposito. 
Citation: Esposito, Joel M., Barton, Owen, Koehler Joshua,  "Matlab Toolbox for the 
Create Robot", www.usna.edu/Users/weapsys/esposito/roomba.matlab/, 
Copyright 2008  




SetFwdVelocity

SetFwdVelocity

This is a function that comes with the Create tool box.  My code looks like this.



comm = strcat('COM', num2str(8));
a = instrfind('port',comm);
[serialObject] = RoombaInit(8) ;
%initialize the port
pause (10)
%wait for 10 sec --time to set the robot on the floor properly. just in case. :)
SetFwdVelRadiusRoomba(serialObject,0.1,1);
% setting the robot with fwd vel of 0.1m/s and turning radius of 2m/s
pause(10)
% wait for another 10 seconds ie run for 10 seconds
SetFwdVelRadiusRoomba(serialObject,0,2);
% setting the robot with fwd vel of 0m/s and turning radius of 2m/s..well ang vel doesnt matter anyway. 
% aka Stop
[Distance] = DistanceSensorRoomba(serialObject);
% reads the distance the robot has travelled since the last reading. 


The problems with this experiment is the distance read from the sensor never actually was in agreement with the expected results. There was always an error between the actual distance and expected distance and always, the actual distance is lesser. 


Also,  an interesting observation is that running this program over and over again, made the error lesser and lesser but it resets back to the same error after 5 or 6 runs. 


Could not find a solution for this except for using another function. 

Bluetooth Problems

Bluetooth connections were absolutely good without any hassle until I reached an infinte loop. When the infinite loop is executed, the robot started running continously when I opted to turn off the robot. And as expected, the power loss resulted in loss of bluettoth connection. At this point it became impossible to re-establish the bluetooth connection back even if the robot was turned on. At this point, the only solution that made things back to normal was the serial connection. { I gave the serial conenction, changed the port in the RoombaInit.m and ran. Luckily, this worked ;) }

Thursday, June 24, 2010

Simulations



Rectilinear Simulations
Both the wheel rotations are same and in the same direction.


Rotation Motion
Both these wheels have same rotations but in the opposite directions. 



Friday, May 28, 2010

Robot Dimensions

Create has a diameter of 13" 
Height: 3.75" : 95.25mm
Weight of robot: 8lbs: 3.62873896  
Radius of larger wheel : r :  1.216"
Radius of castor wheel: ro: 0.930"
Weight of larger wheel;
Wieght of castor wheel:
Weight of castor crank: 
Distance between wheels:l:10.469"
Castor offset  : 0.37625"


a+b : 11.6205"/2 = 5.81025"

Wednesday, April 21, 2010

Dynamic equations

Dynamic equations could be found using the following paper. The paper title is Dynamics equations of a mobile robot provided with caster wheel. 


The dynamic equations will be provided in the next post.

Friday, April 9, 2010

Bluetooth

To initiate the bluetooth connections, I had to install "IVT BlueSoleil". The link to the download file is here. It definitely takes a few tries to actaully establish a proper connection via bluetooth and run the program. IVT BlueSoleli has a GUI and first the connection has to be established between the pc and the robot.

Even after the connection is established, the program might not run immediately and the it is definitely a wise choice to run "RoombaInit.m" file before any other file. This file for some reason immediately runs without any issues. Following it any other program would run very smooth. :)

Wednesday, March 24, 2010

Matlab setup and results

Could not connect with the Bluetooth setup. The incoming port of the Bluetooth setup is 5. When we run the RoombaInit.m file , we see that the Matlab stays busy by the end of "Setting Roomba to Control Mode..."statement. So connected with the serial cable. The com port is 1 and to send the data, just update the RoombaInit.m at line 21, which should look like "comm = strcat('COM', num2str(1));" and run the file. The two lights on the robot will turn on and stay on.

Monday, March 22, 2010

Matlab Toolbox features


The toolbox replaces the native low-level numerical commands, with a set of high level, intuitive, Matlab functions (aka "wrappers") that:   
  • Create a link between your PC and Create using your PC's serial port or Bluetooth connections.
  • Provide user-friendly drive commands, calibrated in SI units.
  • Read the bump and cliff sensors, determine distance driven, and battery life in SI units.
  • Use the Matlab command line or script files to control the robot.  Note that all code is developed, stored and executed on the PC base station -- not the Create. 

Friday, March 12, 2010

Manuals , Links and Other work done on iRobot

All Manuals from iRobot


Matlab Toolbox
Toolbox documentation is provided here along with toolbox to download. Matlab 2007 + versions should work.  Claims to solve the problems or working around the
  • Confusing Open interface commands 
  • Serial port communication problems.

Not tested on our robot till date.

Thursday, February 4, 2010

Radius

Changed the Radius values and the robot responds accordingly.
32768 = 2^(16-1).
16 is the number of the bits.so higher is the radius the path is straight.
// Drive radius special cases
#define RadStraight     32768// radius of the path the robot starts to move. 32768 is 2 ^15 = 2^(16-1). 16 because it can work on 16 bits

#define RadCCW          4 // Counter clockwise radius
#define RadCW           -1 // Clockwise radius
The robot moves CCW when hit on the left side and CW on the right side of the bumper. Behaviour shud be observed later on hitting at the center.

Wednesday, February 3, 2010

Hands on

The first hand on the create. This create package comes with the Create robot, a Remote control, 2 Virtual walls,a Command Module and a software disk. It also comes with a USB connector and a serial cable. Manuals are provided in the disk and I am including the most required steps for getting started.


  • Setup the create by installing the battery component and charge it completely before use. Once the robot is charged, it is ready to play and this robot comes with  inbuilt behaviors that run on hitting play button.There are 11 different behaviors that the robot comes with. To stop and particular behavior and to move on to the next, hit fwd button and play button respectively.The robot returns to the first behavior after the 11th one and the cycle continues. ( Basically it is written in an infinite loop). 
  • To get started on the programming, the command module must be installed and WinAVR must be installed on the pc you are going to work with. The manual provides everything and the examples give a really good start in programming them. 
  • It is very important to note that the program you downloaded onto the robot works on initiating the command module. So either hit soft button or the reset button ( depends on your program) to get started on the execution of the program you just downloaded. 
  • The robot has a 8 bit ATMega168 MicroController ( Command module's brain). So the maximum integer when using a 8 bit operation (unsigned) is 999. { 8 bits = 2^n-1; n = 3, the max integer value with 3 digits is 999}





    Introduction

    Hi,

    This blog is about my research that I am currently working towards my Master's thesis. My work is currently based on the research robot from iRobot by name Create. My advisor is Dr.Seddik M Djouadi from EECS department from Univeristy of Tennesse, Knoxville.