Page MenuHomec4science

Oncilla - Calibration Procedures
Updated 2,428 Days AgoPublic

Calibration Procedures Overview

As the position control loop of the joint Q1 and Q2 are using relative encoders, there are two different calibration procedure.

  • The runtime calibration, that is runned each time the motordriver board are reseted. Its purpose is to match the current relative encoder position with an absolute recorded position. Since the relative position is lost at each electronic reset, this procedure has to be re-runned. The driver from liboncilla ensure this task is done every-time the robot is started.
  • The factory or mechanical calibration, whose purpose is to record in the motordriver memory the absolute position needed by the runtime calibration. This procedure should be performed every time:
    • a mechanical part as been repaired or changed
    • a leg is re-assembled,
    • the corresponding leg motordriver board is replaced or its firmware updated.
    • every few hours of robot use because of mechanical wearing. Sessions up to 5 or 6 hours are usually fine

In order to use the robot in a proper way, we have to calibrate the robot. You can find Tools to calibrate and debug oncilla here : Oncilla - Software Utilities for Hardware Management

Runtime Calibration

WARNING: This calibration has to be performed after every electronic reset. Security Routine in the motordriver board firmware will prevent any position/velocity or torque control if the runtime calibration has not been performed.

The runtime calibration state and start of the procedure is automatically checked and handled by the liboncilla driver.

During runtime calibration, the robot should not touch the ground. The knee will be first completely extended and then flexed a little bit to retrieve the exact point of full extension. If the legs are flexed during that procedure, the corresponding points will be miscalculated and thus the legs will always remains flexed until the next electronic reset.

Factory Calibration

First of all you should test, if the magnetic encoders working correctly by reading them out.

$ sudo oncilla-motor-reader

L1 and L2 Calibration [BLDC motors]

The calibration of the L1 and L2 motor is done using the oncilla-motor-calibrator program.
Before going into the calibration procedure, check if the knee cables are in the right setup (( Oncilla - Start Up Checklist )

Calibration of the motors connected to each motor board is done separately.
From the ssh terminal, go to ~/devel/oncilla-motor-calibrator and run:

$ sudo build/src/oncilla-motor-calibrator -h

This gives you a reminder of all required option needed by the calibration program. You need to provide :

  • the motor board ID
  • the leg calibration template, which can be left_fore, right_fore, left_hind or right_hind.

Once you are ready to calibrate a leg, run the command:

$ sudo build/src/oncilla-motor-calibrator -i <BOARD_ID> -t <LEG_TEMPLATE>

and the calibration procedure begins for the corresponding motorboard/leg.

  1. The program will first ask you to move the L1 joint. move the leg (sample video here ).
  2. Now put the leg back in the vertical standing posture, and proceed as the program says.
  3. Next you have to move the L2 motor. Flex the leg freely (sample video here).
  4. Put the leg back in the vertical standing posture. Make sure the cable is not loose and it can start to pull. Continue as the program says.

You should repeat this procedure for all motorboards/legs.
If the program stopped on an exception when calibrating (as for example the legs wasn't moved enough during the sampling period), just redo the whole calibration again for that join.

A full video of the calibration of one leg can be found here

L0 Calibration (abduction/ adduction) [Servo motor]

The calibration of the hip servo motors can be done with the program rbio-servo-calibrator. Please notice that the program does not provide a -h option. Before you start the calibration procedure, be sure to be in the right directory Oncilla - Software Utilities for Hardware Management
Now run the program and provide a new file to store the calibration values (e.g. here: servo-example-calibration.config):

$ sudo rbio-servo-calibrator servo-example-calibration.config

A new terminal with a grey background is opened. This program has its own prompt and command. Press TAB several times to get an overview of the existing commands.

In the beginning you have to check that the servos are connected to the right channel of the RB-110 (see Oncilla - Part Description . If it's not, select the servo motor (e.g left_fore servo):

$ select left_fore

and assign the new Channelnumber. (*Note:* You can only assign free channels!)

$ channel = x

where x denotes a number = [1 ... 15]

Now you can start to calibrate the servo.

IMPORTANT: Check that no moving parts touch each other during the calibration procedure and leave enough safety space. (e.g. link from servo to the hip joint!

Start with the max_position of the servo.

$ start_max_positon

Press + or ' to adjust the current position of the servo motor. You can increase/decrease the stepsize of the motor by setting the pulse length.

$ set_pulse_increment <value>
NOTE: The maximum value of the servo motor is always outside the robot. If it is reversed, you have to correct this by using the reversed command.
$  reversed = true

After setting the calibrating position, you have to use the command stop_moving, to save the new position value.

$ stop_moving

Now repeat the procedure for the minimum position of the servo with start_min_position

$  start_min_position

After calibrating the motor, stop moving to save the calibration value.

$ stop_moving

When you have placed the minimal reachable position for the leg, unselect the servomotor, and proceed with the remaining servos like above.

$ unselect
$ select [left-fore | right-fore | left-hind | right-hind]
NOTE: There is a default config file which is used by the robot, which is the file named rbio-servo-calibration.config in the current working directory where you run rbio-servo-calibrator or the program using liboncilla. If you want to use your new calibration values, please replace this default file by your own file created using rbio-servo-calibrator. If this file doesn't exist, then no servo will be defined in rbio-servo-calibrator and liboncilla will return an exception.
Last Author
tuleu
Last Edited
May 8 2018, 14:48

Event Timeline

tuleu created this document.May 8 2018, 14:24
tuleu edited the content of this document. (Show Details)
tuleu added a project: Oncilla.
tuleu edited the content of this document. (Show Details)
tuleu edited the content of this document. (Show Details)May 8 2018, 14:48