Sensor Fusion Box Quick Start Guide

The sensor fusion test measures timestamp accuracy of camera and other sensors for Android phones. This page provides step-by-step directions on how to setup the Sensor Fusion test and Sensor Fusion Box for the first time.

Required tools

Before getting started, ensure you have the following components:

Sensor fusion test components
Figure 1. Components required for the sensor fusion test
  1. USB A to B cable
  2. USB A to C cable (for test phone)
  3. 12V 2A power cord (for servo control box)
  4. 12V power cord (for lighting, with switch)
  5. 5V male-male connection cable (for lighting)
  6. 5V male-female conversion cable (for lighting)

Step 1: Connect lights

To connect the lights:

  1. Use the male-male cable to connect the two lights on the bottom ends of the lights as shown in figure 2. Secure the cable to the bottom of the box to keep the cable from interfering with the operation.
  2. Connect the end of the light closer to the light cable exit hole to the conversion cable
    Connect lights
    Figure 2. Connecting the lights to each other and one light to the conversion cable
    1. Light cable exit hole
    2. USB cable exit hole
    3. 5V male-male conversion cable
  3. Thread the unconnected end of the conversion cable through the round hole that exits the box, then connect it to the power cable for lighting.
    Conversion and power cable
    Figure 3. Lighting conversion cable exiting the box and connecting to power cable
    1. Exit hole
    2. Conversion cable
    3. Power cable

Step 2: Attach servo

To attach the servo:

  1. Plug the servo connector into the servo control. Be sure to insert the connector oriented to the corresponding colors as labeled (Y = Yellow, R = Red, B = Black), as reversing the order could damage the motor. If the cord is too short, use a servo extension cable.
    Servo connecting to the servo control box
    Figure 4. Servo connecting to the servo control box
  2. Connect the servo control with its power cord (the lighting and servo control have independent, dedicated power supplies as shown in figure 5).
    Connecting servo control to power
    Figure 5. Connecting the servo control to its dedicated power cord
    1. Power for servo control
    2. Power for lighting
  3. Use the USB A to B cable to connect the servo control box to the host (machine that is running the test).
    Connect servo control box to host machine
    Figure 6. Connecting the servo control box to the host machine

Step 3: Attach phone

  1. Set the phone on the fixture and clamp it down.
    Attaching phone on fixture
    Figure 7. Placing and clamping the phone on the fixture
    1. Back support
    2. Tightness

    Phones should be placed in a manner where the USB cords are located at the periphery of the phone mount and the cameras are near the center of the mount.

    The upside-down thumb screw provides back support while the other screw tightens the grip by turning right. For more details, see video on how to attach the phone.

  2. Use a zip tie to hold the phone USB cord to the fixture plate and lead it outside the box through the exit hole. Plug the other end of the cord to the host running the test.
    Phone USB cord with zip ties
    Figure 8. Phone USB cord held to fixture with zip ties

Step 4: Run test script

The main python executable for the test script is:

python tools/run_all_tests.py device=ID camera=0 scenes=sensor_fusion rot_rig=default
    

You can modify the command to specify the actual rotator address by using:

rot_rig=VID:PID:CH
    
  • To determine the Vendor ID (VID) and Product ID (PID), use the Linux command lsusb.
  • By default, the VID and PID are set to 04d8 and fc73 with channel "1".

Multiple runs, different formats

To perform multiple runs with different formats, you can use a different script (however, the results will not be uploaded to CtsVerifier.apk). Sample test script:

python tools/run_sensor_fusion_box.py device=FA7831A00278 camera=0 rotator=default img_size=640,360 fps=30 test_length=7

Permission issues

To resolve permission issues related to controlling the motor through the USB port:

  1. Add the operator username to the dialout group using:
    sudo adduser USERNAME dialout
        
  2. Log out the operator.
  3. Log in the operator.

Adjusting the motor

You can adjust the speed of the motor and the distance the phone travels using the resistance ports (labeled A, B, and T) on the side of the controller box.

  1. Upon first receiving the box, power up the box and determine the initial position. If the initial position on power-up is not close to 12 o'clock, unscrew the phone fixture (single Philips head screw in mount hole) and rotate the phone fixture to 12 o'clock.
  2. Ensure the phone fixture travels a full 90 degrees (from 12 o'clock to 9 o'clock when looking at the phone) for each rotation.
    • To adjust the distance traveled, use the A and B screws (where A is the starting location and B is the final location).
  3. Adjust the rotation speed to travel a full rotation in 1.5s. Turning the resistor pot clockwise slows down the motion.
    Adjust position and speed of servo
    • A is the start position of the fixture.
    • B is the end position of the fixture.
    • T is the speed motor rotates.
    Figure 9. How to adjust the position and speed of servo and phone fixture

For more information, see video tutorials.

Video tutorials

Attaching phone to mount

Installing phones on a dual mount

Calibrating the controller

Adjusting the phone fixture