  Visual-inertial sensors have a wide range of applications in robotics.
However, good performance often requires different sophisticated motion
routines to accurately calibrate camera intrinsics and inter-sensor extrinsics.
This work presents a novel formulation to learn a motion policy to be executed
on a robot arm for automatic data collection for calibrating intrinsics and
extrinsics jointly. Our approach models the calibration process compactly using
model-free deep reinforcement learning to derive a policy that guides the
motions of a robotic arm holding the sensor to efficiently collect measurements
that can be used for both camera intrinsic calibration and camera-IMU extrinsic
calibration. Given the current pose and collected measurements, the learned
policy generates the subsequent transformation that optimizes sensor
calibration accuracy. The evaluations in simulation and on a real robotic
system show that our learned policy generates favorable motion trajectories and
collects enough measurements efficiently that yield the desired intrinsics and
extrinsics with short path lengths. In simulation we are able to perform
calibrations 10 times faster than hand-crafted policies, which transfers to a
real-world speed up of 3 times over a human expert.
