Академический Документы
Профессиональный Документы
Культура Документы
..
Supervised by
..
University of Tripoli
Term Year(Fall 2013)
Table of Contents
Table of Contents .................................................................................................................................... 2
Abstract ................................................................................................................................................... 3
Acknowledgement .................................................................................................................................. 3
Chapter 1 Introduction ........................................................................................................................... 3
Chapter 2 Background ............................................................................................................................ 3
Microcontrollers ................................................................................................................................. 3
Sensors and Switches .......................................................................................................................... 3
Programming Languages..................................................................................................................... 3
Chapter 3 Related Work.......................................................................................................................... 3
Chapter 4 Your Project ............................................................................. Error! Bookmark not defined.
Experiments ......................................................................................... Error! Bookmark not defined.
Testing & Evaluation ............................................................................ Error! Bookmark not defined.
Results and Discussion ......................................................................... Error! Bookmark not defined.
Chapter 5 Conclusion ............................................................................................................................ 10
Chapter 6 Future Work ............................................................................ Error! Bookmark not defined.
Reference .............................................................................................................................................. 16
Appendices............................................................................................................................................ 16
Abstract
One paragraph long (Have a words limit, e.g., maximum 500 words)
Acknowledgement
-
Chapter 1 Introduction
Should briefly stat and explain:
-
Chapter 2 Background
-
Present some background information on the key equipment and tools and WHY this was tools
was chosen.
Microcontrollers
Sensors and Switches
Programming Languages
Should focus on closely related work which have been developed and introduced in the recent
years (last 5 years).
-Buadrate.
-Data packet size and speed and end bit.
-Type of flow control.
Once determined data can be successfully monitored and exported to a file for decoding and
analysis.
The official signals that control the RACD were determined by monitoring the communication port
between the RACD and the Computer while the official software is running and active. When the
official software sends a movement signal for example the monitoring software acquires the sent
code and exports it to a text file.
The received data at first glance looked like a scrambled set of code, this code was analysed by
locating at the commonalities and recursions while testing and repeating the different commands
using the official software. The assumption was that a movement function for example will always
result in the same code combination once called again by the official software. This method proved
to be successful when interfacing in general unless some form of encryption was used to obscure the
control commands.
it was later determined that this was true only for the case of commands being sent to the RACD.
When commands are received by the Computer from the RACD the ending byte was determined as
0A instead.
The Carriage return character was an indicator for the RACD ability to understand ASCII and it was
assumed that the HEX data was actually ASCII code and commands. By transforming the
Hexadecimal code to its ASCII equivalent the monitored code immediately became understandable
easier to decode with assembly like programming characteristics proving the recursive code
assumption. For example, the command 4d 4f 56 45 50 05 01 0D becomes MOVE 50 05 01 0D
which is easier to decode and understand.
More commands for the different functions and modes in the official software were successfully
found and noted by repeating the steps mentioned previously.
The Robotic Arm was successfully controlled by setting up a COM port session using the previously
mentioned settings and sending the noted commands and code combinations trough the COM port
to the RACD without the need for the official software.
For successful control the commands must be sent precisely as found in the decoded file, if a part
was missed or added buffer overflow might occur and the RACD will crash and require manual
reboot.
COMMAND: REMOTE 0D
Check for the states of the Robotic Arm
RETURNS:
OK Robotic Arm is ready for commands
BUSY Robotic Arm is executing a movement or not connected.
ERR An error occurred or Robotic Arm is not connected.
COMMAND: HARDHOME 0D
Calibrate the Robotic Arm and the RACD by testing the Arms physical limit setting the Arm
position and checking the arm states.
RETURNS:
The command keeps returning the feedback position of the Robotic Arm while conducting
the different boundary tests. In the end the RACD returns the final calibrated position
closing with an END message.
COMMAND: MOVE 50 Y X 0D
Move one selected joint of the robot until a stop order is initiated or arm reaches its physical
limit.
INPUT:
Y Identifies which servo motor is targeted for movement
X Identifies the direction
RETURN:
None
Y=0
Move Gripper until physical limit is reached or a stop command is ordered.
X = 1 Grippers motor conducts an opening movement
X =-1 Grippers motor conducts a closing movement
Y=1
Rotate gripper physical limit is reach or a stop command is ordered
X = 1 Grippers rotates to the right
X =-1 Grippers rotates to the left
Y=2
Move wrist until physical limit is reached or a stop command is ordered.
Y=3
Move arm until physical limit is reached or a stop command is ordered.
X = 1 Arm motor conducts an ascending movement
X =-1 Arm motor conducts a descending movement
Y=4
Move shoulder until physical limit is reached or a stop command is ordered.
X = 1 Shoulder motor conducts an ascending movement
X =-1 Shoulder motor conducts a descending movement
Y=5
Move shoulder until physical limit is reached or a stop command is ordered.
X = 1 Shoulder motor conducts an ascending movement
X =-1 Shoulder motor conducts a descending movement
COMMAND: STOP 0D
Override any order and immediately stop the Robotic Arm
RETURN:
None
COMMAND: FREE 0D
Free servo motors if torqued.
RETURN:
none
COMMAND: TORQUE 0D
Torque servo motors if free
RETURN:
None
COMMAND RUN 50 0 A B C D E F 0 0 1 0D
Go to required articulate position, in this command all the servo motors work together in
parallel to reach the designated location.
INPUT:
A Gripper, B Rotation, C Wrist, D Arm, E Shoulder, F Base
The 50 separates the command from the coordinates and the 0 0 1 0D are end bits
Example:
RUN 50 0 50000 50691 44054 -3195 -4660 7000 0 0 1 0D
Moves the arm to the specified coordinates where all motors run in parallel to reach
destination
RETURN:
The robotic arm returns its position while moving to the designated location until the final
position is reached.
The RACD uses a special articulate coordinate system that only uses integers to define degrees and
angles. For example, 64995 in RACD articulate coordinates equal 89.9 degrees in world articulate
coordinates.
To Transform from RACD articulate coordinates to world articulate coordinates a number Linear
equations must be used. Each joint has its own linear transform equation based on its position and
characteristics. The equations were derived by using three point values as a reference.
= 0.001699 1 (1.1)
= 666.66667
1 (1.2)
666.667
(1.4)
The Robotic Arm Control Library functions are stored in a directory with separate .m files for each
function, because Matlab only allows functions to call other functions that are in a .m file that has
the same name.
The following sections will introduce the Library, its different aspects and how to use it.
After finishing with the Robotic Arm, the serial port COM connected with the RACD must be shut
down by releasing the COM port object and initiating an end signal. The RACD will keep on waiting
for signals even after shutdown until shut physically from the power button.
The following function is used to terminate Matlabs connection with the COM port and release it for
final shutdown or use by another software
States = Close_Robot(Obj)
Release COM port and initiate shutdown with the RACD
INPUT: Obj COM port object
RETURN: The states of the Port
Pos= Calib_Robot(Obj)
Calibrate Robot
INPUT: Obj COM port object
RETURN: The location of the arm after calibration ideally 0,0,0,0,0
2- Articulate System:
Position = Grade(Obj)
Get position in world articulate coordinates.
INPUT: Object connected to the RACD COM port
OUTPUT: Regular articulate coordinates
Position = Go_Robot(Obj,Gripper,Wrist_Rotate,Wrist,Arn,Shoulder,Base)
Move Robotic Arm to designated position.
INPUT:
Obj: Object connected to the RACD COM port
Gripper: Size of gripper
Wrist_Rotate, Wrist ,Arm ,Shoulder , Base: World articulate angles for the destination
RETURN: The final position after movement.
Position = Go_Robot_Lock(Obj,Gripper,Wrist_Rotate,Wrist,Arn,Shoulder,Base)
Move Robotic Arm to designated position, lock Matlab and wait until arm reaches
designated position.
INPUT:
Obj: Object connected to the RACD COM port
Gripper: Size of gripper
Wrist_Rotate, Wrist ,Arm ,Shoulder , Base: World articulate angles for the destination
RETURN: The final position after movement.
Stop_Robot(Obj)
Stop any current movement the Robotic Arm is conduction
INPUT: Object connected to the RACD COM port
OUTPUT: Regular articulate coordinates
Wait_Robot(Obj)
Check if arm is moving and lock Matlab and force user to wait until arm finishes conducting
its movement.
INPUT: Object connected to the RACD COM port
OUTPUT: Regular articulate coordinates
mJoint_Robot(Obj)
Move one joint of the robot until a stop order is initiated or arm reaches its physical limit
INPUT: Object connected to the RACD COM port
OUTPUT: Regular articulate coordinates
The RACD has a number of other options that can help enhance the experience of using the Robotic
Arm. The emergency button available as a separate unit can be used as a safety measure when
pressed however the RACD remains locked until it is release by a specific order.
In addition, the servo motors in the Robotic Arm can be torqued or freed based on the application
used, for example if the application needed deals with weight it is better to set the Robotic Arm in
torque mode to give sustained power to the Robotic Arm.
The following functions represent the different modes
Emergency_Robot(Obj)
Move one joint of the robot until a stop order is initiated or arm reaches its physical limit
INPUT: Obj COM port object
RETURN: Message from the RACD stating the action performed
Release_Robot(Obj)
Release servo motors
INPUT: Obj COM port object
RETURN: Message from the RACD stating the action performed
Torque_Robot(Obj)
Torque servo motors
INPUT: Obj COM port object
RETURN: Message from the RACD stating the action performed
By trial it was found that Matlab cannot change between terminators in the middle so a better
solution to check if data is received is by looking into the Input Buffer.
When busy the robotic arm usually sends a busy signal however there is a chance that the RACD will
crash if data is sent while busy or unknown commands are sent.
If the gripper in the Robotic Arm is not moving, make sure that the gripper is set manually to SERVO
mode using the physical manual controller provided with the RACD.
4.3 Conclusion
The Robotic Arm Controller Device was successfully interfaced and the Robotic Arm now can be used
independently without the Original Software.
Using the provided low level commands, the RACD can be interfaced in any system required with
any programming language specified for example C++. The only requirement is to setup a successful
connection with the parameters mentioned in the previous sections and send the commands
exactly.
For this project A Matlab library was developed and ready for use. the functions in the library handle
all the low level tasks and give the user the opportunity to focus on higher level problems.
Mention any restrictions, limits or weak points related to the use of the results.
Suggest as a future work what the next step(s) in the study should be to overcome the limitation
or advance the study further
Reference
-
Ccommon knowledge in the field does not need to be referenced such as PI=3.14159 or F=ma.
References from books, essays, journals, World Wide Web, and personal communications must
be clearly stated here.
Appendices
-
Includes extra information and any other supporting information such as code, maps