The manipulator setup function is called lynx6_calibrate
and is what you should invoke to first get acquainted with the manipulator. If you prefer, there is a pdf file with this same content.
This function pops open a GUI that has sliders bars to control the manipulator servo motors. The servo motors are sent numerical commands that range in [500, 2500], where 500 specifies one extreme of rotation and 2500 represents the other extreme. The servo should be centered around 1500. Hence the setup function starts off with all settings at 1500. The manipulator should be plugged, powered-up, and connected to the computer via the serial cable prior to running the setup function. This is because the manipulator will be repeatedly sent the command to go to 1500 for all servos in order to activate the servo motors. If the servos do not activate, then hit the Goto button repeatedly until it does so (if this still fails, come see me).
There are some boxes to the right that specify the current servo command, plus the min and max values that can be commanded. The numerical limits are 500 and 2500, but some may be set conservatively within these limits to protect the servos. If you hit the max and you think that the servo can go more, then adjust the min/max values and move into these new limits slowly. The min and max are editable text boxes.
Only if you build the manipulator It is critical that those who have the new manipulators made mostly out of aluminum remove the gripper servo motor from the gripper and have it sitting off to the side prior to invoking the setup function (do NOT lose the screw). Please still have it be connected to the servo controller board, just not engaged in the gripper. If the servo is in the gripper when it starts up and the servo was improperly installed, then activation could destroy the servo. Once the servo is activated, you can put it back into the gripper making sure that the gripper itself is at the half-way position when the servo motor is installed.
Once the manipulator is powered-up and the servos are (safely) activated, then you can slide the bars around to test out the motion limits. You must hit Goto every time you change the slider, if you want the manipulator to actually move. Enabling the Continuous button will continuously update the manipulator after changing a slider bar.
When you adjust the slider bars to identify the limits, please be careful. The servos are dumb things that do what they are asked to do, even if it is incorrect or could break the manipulator. You will know you have done something wrong when a servo starting to make a nasty grinding sound. If you are close to doing something bad, the servo will start to whine louder, with the whine resembling a grinding noise as you get closer to the badness.
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.
The lynx6.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 lynx6.m
will need to be modified to reflect what you have found.
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 funny.
Basically, when the power is shut-off the servos deactivate and the manipulator arm may fall. Putting it into the sleep position allows for it to gently fall into a safe position, or moves it to a configuration where the manipulator won't really move much once powered off. Also, when powered on from sleep position, the code commands it back into sleep position which means it won't jerk so much as it moves to the sleep position.