-
Notifications
You must be signed in to change notification settings - Fork 2
Calibration guide
AnthonyBreton edited this page Apr 11, 2021
·
16 revisions
In the include folder situated in the Arduino code, there is an array named compensationArrayMec in qd_hw_config.h to add small compensations to every joints and calibrate the initial position.
- Send the code to the Arduino as it is with PlatformIO (this line should be in the setup moveMotor(initPositions);)
- The robot should be in his initial position but with slight offsets (Hip and Tibia parallel to the body | Femur perpendicular to the body)
- Play with the values in compensationArrayMec to get rid of these offsets and get a straight initial position
This step should be done after the calibration of the initial position. In the same file as the previous step (qd_hw_config.h) there is a two dimensional array named jointLimit where the angle values are in degrees. Each joint as an upper and lower angle limit to set to protect the robot from colliding with itself.
- Add these two arrays as global variables in the main.cpp file of the Arduino code :
float configurableJointDefinition[12] = {0,0,0,0,0,0,0,0,0,0,0,0};
float position[12];
- Replace the setup with this one (keep the previous setup to restore it after the calibration) :
void setup() {
servoInit();
computeLimits();
for (int i = 0; i < 12; i++)
{
position[i] = initPositions[i] + configurableJointDefinition[i];
}
moveMotor(initPositions);
moveMotor(configurableJointDefinition);
rosInit();
}
S4H2021-QuadrUS