How to: Extrinsic Calibration
to map correctly camera pixels to field coordinates.
In order to adjust the calibration of the visualization you can change the roll (offset_x
), pitch (offset_y
) and yaw (offset_z
) of the camera and the IMU.
The camera parameters change the camera direction and the IMU parameters change the orientation of the body.
Setup
Start the visualization launch-file including the necessary motion and vision nodes.
ros2 launch bitbots_extrinsic_calibration viz_extrinsic_calibration.launch
In Dynamic Reconfigure open the parameters (left panel) for the nodes:
bitbots_extrinsic_imu_calibration
andbitbots_extrinsic_camera_calibration
.
Do the calibration
Open config file in bitbots_misc > bitbots_extrinsic_calibration > config
Open rqt and navigate to Plugins > Configurations > Dynamic Reconfigure where you can configure the parameters.
Place the robot outside the field exactly in front of the middle line.
Use the
2D Pose Estimate
button in RViz to place the virtual robot in the corresponding pose.
Note
If you change the calibration first change all parameters to 0.0
.
Then start with the adjustment of the IMU parameters.
This is an interactive process and we might need to do a few alternating steps of imu and camera calibration to get a good solution
IMU Parameters
change if the lines are unequally distanced to the right/left (
offset_x
) or to the front / sides (offset_y
)
Camera Parameters
change (
offset_x
) if all lines are too far away or too closechange if the lines are not aligned equally on both sides / front (
offset_y
) due to the rotation of the head which leads to an error in the cameras frame of reference being present in all directionshas a camera coordinate system