-
Notifications
You must be signed in to change notification settings - Fork 2
Kinematics Calibration
There are two types of calibration on the naos that are governed by kinematics: IMU offset calibration, and camera/joint offset calibration. Both of these are done via offnao, with kinematic offset values stored in nao config files.
Config files can be found in $RUNSWIFT_CHECKOUT_DIR/image/home/nao/data/configs
The forward and sideways balance of the robot is controlled by its IMU gyroscopes. These need to be calibrated for each robot to read zero when the robot has no angular velocity.
IMU Offset Values are determined by reading in the output from the IMU. If the values are significant enough, they are fed through a simple constant gain Kalman filter to then be used in the Walk2014Generator for Sagittal and Coronal balance (adjusting the ankle tilt/roll to keep foot parallel to the ground).
(21/02/17): [touch]
doesn't appear in any config files and so offset values are defaulted to 0 as in utils/options.cpp
. Most naos will often have zeroed graphs for AngleX
and AngleY
in the absence of recording offsets in the IMU, and so it seems this calibration is only necessary if an IMU is considerably defective/inaccurate.
To calibrate the IMU sensors of the robot:
- run: `runswift --kinematics.isCalibrating true'
- stiffen body and stand robot on flat surface
- connect offnao to robot and go to sensor tab
- copy values from:
InertialSensor/Gyr[X|Y], InertialSensor/Angle[X|Y]
- paste values into
\<robot-name\>.cfg
under[touch]
(must be added), such as:[touch]
gyrXOffset=-3.19481
gyrYOffset=-0.38147
angleXOffset=0.373519
angleYOffset=-2.10937
To test changes:
- run StandStraight skill:
runswift -s StandStraight
- go to graph tab on offnao and see if angleX/angleY read approximately 0.
Note: The actionType 'Body::MOTION_CALIBRATE' tells MotionAdapter to send raw sensor values to offnao, rather than calibrated values.
Kinematic transforms must be performed on the robots to reduce/prevent systematic errors caused by physical inaccuracies of a nao’s physical build. This is critical for vision when determining the distance and heading to objects. The offsets in the angle of the camera mount are determined in this camera/joint offset calibration.
Offset variables (measured in degrees) exist for both the top and bottom cameras as they must be considered separately. These variables exist for the yaw, pitch, and roll of the cameras, however the roll offset generally has a negligible effect.
The procedure of camera/joint calibration involves comparing projected field lines to actual field lines seen in the image to adjust offsets. These offsets are used in the determination of the kinematic chain (i.e. determining the D-H Parameters). This kinematic chain is then sent to offnao with the inverse taken to project a map of the field onto the image, offsets then accounted for with the process repeating until the projections match the image.
(20/03/17): The camera offset calibration currently is not perfect. Perhaps due to some inaccuracies in the transformation matrix used for determining the D-H Parameters. Some existing camera calibration for naos do not appear accurate - maybe camera shifts a bit over time. Also determining body pitch offset.
To calibrate camera and joint offsets:
- run:
runswift
- stiff body and place on penalty spot facing opposite goals
- run:
offnao
- switch to CameraPose tab & follow the following instructions (also present on tab):
- Place robot on penalty spot
- Face robot's feet and head towards far goal
- Check image to see if field lines match
- Adjust offset if they do not match
- Update config file for robot when they match
- copy values into
\<robot-name\>.cfg
under[kinematics]
, such as:[kinematics]
cameraYawBottom=0
cameraPitchBottom=3.2
cameraRollBottom=0.75
cameraYawTop=0
cameraPitchTop=0.4
cameraRollTop=-0.85
bodyPitch=3.5
Notes:
- hold the left foot and tap the chest twice to limp the head, which will allow you to rotate the nao's head and compared field line projections around the side of the field and behind the nao
- remember to turn the head up after doing the above to be able to calibrate the bottom camera. The same projections exist for this camera that exist for the top.