The process you need to go through is actually similar to the camera calibration procedure in OpenCV or other software. The chessboard is replaced by your robot, and you can skip the intrinsic estimation step. I would actually recommend you take a look https://github.com/hengli/camodocal a multi rig camera calibrator.
Anyways a high level overview.
The two steps you have to take are:
- Initial Pose Estimation
- Refinement via Bundle Adjustment.
Step 1:
You actually only need 1 frame for this. Probably take the synced images that has the most the most projected points in common. (Minimum is 3 points, but you really need each camera to see the 4 same points).
Define your reference frame/origin in your robot/object. You will be estimating the camera positions relative to this. You now also have the 3D bounding box corner positions relative to this frame. If you define it to be the center of the object then a point might look like $[\frac{width}{2},\frac{length}{2},\frac{height}{2}]$
Take your pick of PnP algorithm, and estimate the camera poses(Se3) individually. The 3D points are your bounding box corners relative to your origin. The projections are the 2D coordinates in your image. If you pick the origin to be the center of your robot then you now have calculated the pose of your camera with respect to the center of the robot.
Do some matrix multiplication to convert the camera poses in the object frame, to be relative to the first camera pose.
$$ T_{1,2}=T_{o,1}^{-1}*T_{o,2} $$
Should look like that. Here $o$ is your object coordinate frame, and $1,2$ refer to camera 1 and camera 2.
If your cameras only partially overlap(e.g. only cameras 1,2 and 2,3 have overlaps) then do the same steps for each pair, and then just chain the transforms.
$$T_{13} = T_{1,2}*T_{2,3} $$
Step 2:
I will say this step might be optional for you. You already have the camera positions from step 1, so this just helps refine the results.
Essentially you just need to set up a large Bundle Adjustment problem and solve it using something like Ceres.
- Build your 3D Pointcloud. This pointcloud is composed of your bounding box corners at every timestamp. So in total you should have maximum $8*100=800$ points(probably less because sometimes a point isn't visible).
How to exactly do this is tricky. If your robot has perfect odometry then you can just multiply your points by the odometry transform. You can run an object pose estimator algorithm for all timestamps in camera 1. You can use the PnP algorithm again. You just need all 800 3D corner positions in a common reference frame, and there are different ways of doing that.
Build your optimization problem in something like Ceres. Your cost function terms should link the 3D points and the cameras that observe it. See the camodocal code for examples of this.
Solve the bundle adjustment problem.