Both sides previous revisionPrevious revisionNext revision | Previous revision |
ece4560:piktul:calibrate [2015/02/26 10:07] – pvela | ece4560:piktul:calibrate [2024/08/20 21:38] (current) – external edit 127.0.0.1 |
---|
====== Lynx6 Calibration ====== | ====== Lynx6 Calibration ====== |
| |
The manipulator setup function is called ''piktul_calibrate'' and is what you should invoke to first get acquainted with the manipulator. If you prefer, there is a {{ECE4560:Piktul:Piktul_Calibrate.pdf|pdf file}} with this same content. | The manipulator setup function is called ''piktul_calibrate'' and is what you should invoke to first get acquainted with the manipulator. |
| |
The idea behind calibration is that the servo commands go from 500 to 2500, but as a user you'd like to be able to enter joint commands in more sensible units (like degrees or inches). Therefore a linear mapping is needed to go between the desired joint configuration (in degrees or inches) and the actual servo commands. The way it is done in the GUI is to create a mapping between three joint coordinate values and the corresponding three servo commands. There is then Matlab code that does the linear interpolation. The three values that will be selected should be the extremal values plus the center value. For a revolute joint, that would be the largest and smallest reasonable angles that are achievable plus some angle in between. For the most part, this will involve +/-90 and 0 degrees. | The idea behind calibration is that the servo commands go from 500 to 2500, but as a user you'd like to be able to enter joint commands in more sensible units (like degrees or inches). Therefore a linear mapping is needed to go between the desired joint configuration (in degrees or inches) and the actual servo commands. The way it is done in the GUI is to create a mapping between three joint coordinate values and the corresponding three servo commands. There is then Matlab code that does the linear interpolation. The three values that will be selected should be the extremal values plus the center value. For a revolute joint, that would be the largest and smallest reasonable angles that are achievable plus some angle in between. For the most part, this will involve +/-90 and 0 degrees. |
| |
| A summary of the procedure is packed into the following image. Use it as a guide when reading through the rest of the calibration page. |
| ;#; |
| {{ECE4560:Piktul:calib_Summary.png}} |
| ;#; |
| |
| |
===== Starting ===== | ===== Starting ===== |
Figure out what the servo command values are the get close to the limits, but do not hit them. When doing this, please move the slider bar little by little until you get a feel for the appropriate limits. Also make sure that the manipulator can move freely without hitting anything during this procedure. The associated angles, as measured by a protractor relative to the zero configuration, are the joint angle limits for your manipulator. Each manipulator has different limits based on how it was put together. | Figure out what the servo command values are the get close to the limits, but do not hit them. When doing this, please move the slider bar little by little until you get a feel for the appropriate limits. Also make sure that the manipulator can move freely without hitting anything during this procedure. The associated angles, as measured by a protractor relative to the zero configuration, are the joint angle limits for your manipulator. Each manipulator has different limits based on how it was put together. |
| |
| ===== Done Calibrating: Deliverable ====== |
| -------------------- |
| |
| Once all of the values are set and updated to reflect what works for the Piktul manipulator, take a screen capture of the calibration dialog box. Turn that in as evidence of calibration. Next week, the lab assignment will be to confirm that the calibration is correct by comparing with the forward kinematics. That will be the true test. |
| |
| Also, turn in what values were used for the sleep joint configuration. |
===== Manipulator Interface Code: Calibration File ===== | ===== Manipulator Interface Code: Calibration File ===== |
----------------- | ----------------- |
| |
The easiest way to have the piktul know what the calibration values should be is to have saved it as a Matlab file for passing to the ''piktul'' object. It is one of the optional arguments. Sending the name of the calibration means that the piktul object will load those Matlab variables and overwrite the default values with those from the file. Of course, you will still have to modify the code for the sleep joint configuration. The rest should be automatic. Since the piktul was built here in house and only one version exists, the coded link lengths should be correct. | The easiest way to have the piktul know what the calibration values should be is to have saved it as a Matlab file for passing to the ''piktul'' object. It is one of the optional arguments. Sending the name of the calibration means that the piktul object will load those Matlab variables and overwrite the default values with those from the file. Of course, you will still have to modify the code for the sleep joint configuration. The rest should be automatic. Since the piktul was built here in house and only one version exists, the coded link lengths should be correct. |
| |
| Once you have the calibration file, the ''piktul'' interface can be initialized with the parameters by loading and passing them as the argument to the ''piktul'' constructor: |
| <code> |
| arm = piktul(load('pikparms.mat')); |
| </code> |
| |
===== Manipulator Interface Code: Calibration ===== | ===== Manipulator Interface Code: Calibration ===== |
----------------- | ----------------- |
The ''piktul.m'' code stub is the main interface file for the manipulator. It is what you will be modifying to enhance the functionality of the manipulator as the course progresses. Prior to running the code, you will need to use the setup program to identify the operational limits and calibrate the manipulator. Calibration involves joint angle operational limits (in servo command units and degrees) plus link length measurement. Once these values have been found, the appropriate variables in ''piktul.m'' will need to be modified to reflect what you have found. | The ''piktul.m'' code stub is the main interface file for the manipulator. It is what you will be modifying to enhance the functionality of the manipulator as the course progresses. Prior to running the code, you will need to use the setup program to identify the operational limits and calibrate the manipulator. Calibration involves joint angle operational limits (in servo command units and degrees) plus link length measurement. Once these values have been found, the appropriate variables in ''piktul.m'' will need to be modified to reflect what you have found. **Note:** If you used the ''piktul_calibrate'' routine, then you do not need to be manually editing the fields here. |
| |
Below are some of the variables you'll need to modify. If you have any questions, feel free to ask. Again, please be careful when changing and modifying the values. Be prepared to turn the manipulator off if things go | Below are some of the variables you'll need to modify. If you have any questions, feel free to ask. Again, please be careful when changing and modifying the values. Be prepared to turn the manipulator off if things go |
* **alphaSleep:** Your sleep position as a joint configuration. | * **alphaSleep:** Your sleep position as a joint configuration. |
| |
| --------- |
| ;#; |
| [[ece4560:manicontrol | Back ]] |
| ;#; |