Configuring Mavis

Physical Setup

Mavis assumes a certain physical arrangement consisting of one forward-facing camera. The camera should be well supported so it doesn't jiggle around or shift out of position.

Mavis currently doesn't support dual cameras (as in stereo). It assumes the robot has a front. It also assumes the camera is something along the lines of a webcam, which captures a fairly undistorted image. If your camera has a 360 degree view or does other strong image warping, mavis won't work for you without modification.

 

Resolution

We're using a 320 x 240 resolution. Mavis should work with other resolutions, but the parameters in mavis.ini may need to be tweaked if the resolution is very different.

 

Parameter File (mavis.ini)

All the parameters mavis uses are in mavis.ini. Most parameters are optional, and mavis can maintain some automatically. But there are a few you must set yourself because they specify physical dimensions for your setup:

  • robot#width: the robot's maximum left-to-right width, in mm.
  • camera#height: distance from the floor to the camera's optical center, in mm.
  • camera#fwdPosition: how far forward the camera's optical center is from the robot's center, in mm (see figure). If you have the camera rearward rather than forward, use a negative value.
  • homebase#whiteDiam: diameter of the white, inner portion of the homebase marker, in mm.
The picture below shows the camera-placement parameters. If you're not sure where the optical center of your camera is, you can estimate it as the shutter aperture, located just behind the lens.


 

The remaining parameters in mavis.ini are specific to various mavis capabilities. You can find these listed under each capability. For now, just leave these at their default values.

 

Camera Calibration

Before mavis can compute distances, it needs correct values for the camera's focal length and tiltAngle. Mavis can compute these for you, using its built-in Camera Calibration and the homebase marker.

 

Tweaking the Camera Driver

You can control your camera driver's settings with framecap. From the framecap menu, select Options > Settings to display your driver's configuration dialog. You'll want to use settings that are a good compromise between information content and repeatability. I can't tell you what those are, because they'll depend on your camera. They may not be the settings that are most visually pleasing. On my Logitech (Zoom model), I set the white balance to "Full Auto" mode, brightness and contrast at 50%, gamma at 25%, and saturation at 75%.

You can test your settings by locating homebase with MavisCtl under various lighting conditions, background types, and amidst clutter. Experiment until you find the settings that seem to work correctly most often. Save those settings as your driver's default.

 

Home | Mavis | Mavis Documentation