Thursday, February 26, 2015

stereo-cam: odometry simulation

There were some delays in getting started on the visual odometry - but the data seems better than the first round of data collection. Obviously the optical rotation is totally wrong below.


After I rotated the transforms between base and camera, by roughly the correct estimates for the test platform, the second pass on the data looks much more promising. At least the nodes are upright and moving in the right directions.


The above is with no IMU data - that's obviously the next step. I have to say, not too bad for just a visual odometer from an 'okay' first pass calibrated camera that was build for under $20. It is about a 3m loop with lots of bumpy camera data in the mix. The camera bounced a little (as you can see) on mount to the test platform (which could use improvement).

EKF helps a little

Wednesday, February 11, 2015

stereo-cam: disparity test after calib.

stereo-cam: stereo disparity

Excellent. This is much better than that last dubious calibration param set. Whoa are all who wander in disparity.


stereo-cam: mounted on test platform

After a little fine-tuning of the aluminum brackets on the mount I was able to attach the stereo cameras to the test platform. It is now time to go gather some data at the local park and get the visual odometry working with the new stabilized mount. The calibration should be much more consistent with a rigid mount. The two camera's frame clocks are hardware linked via some soldering from 'vsync' to 'fsin'... not show in photo, as it is inside the case.


Sunday, February 8, 2015

stereo-cam: cad, 3D printed rigid mount design


The ps3 eye specs elude to resolution at up to 640x480 at 120fps. The mode of the driver seems to be bootable with about 10 or so configurations. So, it seems like a worthwhile experiment to build a ROS node out of it and see how it performs.

To properly calibrate and use the stereo camera configuration we're going to need a rigid case and camera assembly support. I chose to play with my 3D printer for this fun project. I modeled the case in a cad design program and printed the parts on a lulzbot taz4 in ABS. It looks like my tolerance is about 0.5mm for everything to fit snug.




It seems worthwhile to note that opening the ps3 eye is not challenging, but soldering the 1mm via on the board is going to need a really small tip, a lot of flux and patience. In the end, you will need cable strain relief for any sort of effective mounting strategy. I modeled a relief cup for the usb cable into the face plate of the camera mount. When the top is added it closes around the rubber relief guide very well.



Luckily, I did plan on leaving some space to mount the camera's angle adjustment. My strategy is to use the middle screw above to attach the adjustable base. Meanwhile, the aluminum frame should improve the rigidity from our last trial run. Moving cameras in the frame do not lend well to dense point clouds.


The four holes are the back are designed to be for longer machine screw which pressure fit the camera forward, on the mic backings just above the pcb inside the ps3 eye. The one wire solder from 'vsync' to 'fsin' for frame syncing the two camera clocks will be adequately protected with lots of strain relief by epoxying the wires to the pcb.

The for the angle adjustment, I'm going the sec route (simple-easy-cheap). I have an old mic stand lying around collecting dust, and it has two adjustment screws (one for the boom arm length and one for the boom arm angle). By attaching two aluminum L-brackets (such as used above on the outside of the case), it is possible to both mount the angle adjustment to the top plate of the robot and to the camera base. The base will take advantage of the length set screw (with a washer). The robot top plate will take advantage of the angle adjustment screw (with a washer) - while the 1/2 bottom of the neck can be used for additional lateral support when inset through the top plate on the robot (next to the where the L-bracket meets the top plate).