ITS FAIL test_sensor_fusion.py实时调试经验以及测试脚本修改

一:测试项内容

test_sensor_fusion

Tests the timestamp difference between the camera and the gyroscope for AR and VR applications. Phone is rotated 90 degrees 10 times in front of the checkerboard pattern. Motion is about 2 s round trip. This test is skipped if no gyroscope is included or if the REALTIME parameter is not enabled.

Pass: Camera and gyroscope timestamps' offset is less than 1 ms.

Impacted camera parameters:

  • CONTROL_AE_TARGET_FPS_RANGE
  • LENS_FOCUS_DISTANCE
  • SENSOR_EXPOSURE_TIME
  • SENSOR_FRAME_DURATION
  • SENSOR_ROLLING_SHUTTER_SKEW
  • SENSOR_TIMESTAMP

[ITS]sensor_fusion test_sensor_fusion.py Fail,

测试gyro senor和camera sensor看到同一点位的时间和位置的同步。如果是1ms以内则pass。

二:调试经验。

打印log,4350 android12 和845平台差不多:

enable3ADebugData=TRUE
logInfoMask=0xFFFFFFFF
logWarningMask=0xFFFFFFFF
logVerboseMask=0xFFFFFFFF
logCoreCfgMask=0xFFFFFFFF
logConfigMask=0xFFFFFFFF
logCoreCfgMask=0xFFFFFFFF
overrideLogLevels=0xFF

创建log 文本,push 到手机对应路径,然后修改权限重启手机就可以实时的获取手机不同size 预览时候的ADC 值,这样可以确认是否生效。

camxoverridesettings.txt

adb shell mkdir /vendor/etc/camera
adb shell chmod 777 -R /vendor/etc/camera
adb shell touch /vendor/etc/camera/camxoverridesettings.txt
adb push camxoverridesettings.txt /vendor/etc/camera

打印关键log 分析 ADC 数据值,有时候没有生效和size 有关。所以同步打印 camera的size。

 adb logcat | grep -Ei "ADCReadoutTime|FindBestSensorMode|chxsensorselectmode.cpp"

 adb logcat | grep -Ei "ADCReadoutTime|FindBestSensorMode|chxsensorselectmode.cpp|CamX"

这样就根据测试脚本输出的log,来修改camera xml 的配置即可,比如如下,则可以减去对应的值即可,比如默认 xml 配置中为0 ,就可以修改为 -12.5 即可。需要注意的是我们添加了log 可能就获取不到如下log信息,所以大家测试的时候可以关闭log。

Best shift without fitting is 12.5 ms

Best correlation of 0.000049 at shift of 12.87ms

三:修改ITS测试脚本,方便测试。

我们测试的时候用的旋转黑盒测试,需要修改配置 ITS 的脚本:

TestBeds:
  - Name: TEST_BED_MANUAL  # Need 'tablet' in name for tablet scenes
    # Use TEST_BED_MANUAL for manual testing and remove below lines:
    #     - serial <tablet_id>
    #       label: tablet
    # Test configuration for scenes[0:4, 6, _change]
    Controllers:
        AndroidDevice:
          - serial: SM22N1Y00040  # adb devices 获取手机serial 号
            label: dut

    TestParams:
      brightness: 96
      chart_distance: 31.0
      debug_mode: "False"  # quotes are needed here
      chart_loc_arg: ""
      camera: <camera-id>
      scene: <scene-name>  # if <scene-name> left as-is runs all scenes

  - Name: TEST_BED_SENSOR_FUSION  # Need 'sensor_fusion' in name for SF tests
    # Test configuration for sensor_fusion/test_sensor_fusion.py
    Controllers:
        AndroidDevice:
          - serial: SM22N1Y00040   # adb devices 获取手机serial 号
            label: dut
    TestParams:
      fps: 30
      img_size: 640,480
      test_length: 7
      debug_mode: "False"   # quotes are needed here
      chart_distance: 25
      rotator_cntl: arduino    # can be arduino or canakit 选择使用的测试机器类型
      rotator_ch: 1               #<controller-channel>  修改为1,表示通道1
      camera: <camera-id>

我们要根据具体的设备来配置测试文件脚本,sensor_fusion 测试配置的多2项就是:

rotator_cntl

rotator_ch

实际测试时候需要注意手机中心对着测试图中心最佳,否则会影响测试结果。

四:高通429 调试他人经验:

1.设备有Gyro sensor

2. Gyro sensor的GMS 测试都pass

issue1: assert abs(offset) < THRESH_MAX_SHIFT_MS*MSEC_TO_SEC。

这种issue最常见。

Best shift without fitting is 12.5 ms

Best correlation of 0.000049 at shift of 12.87ms

threshold是1ms, camera 与gyro看向同一个点的偏差大于1ms,这条case加就会fail。

解决办法:

调整camera frame timestamp,以将偏差减小。

对于高通平台,需要调整ADCReadoutTime这个值,这个是读frame的IO时间。

在4290平台下这个值是写死的,没有解析sensor驱动中的<ADCReadoutTime>。

在 camx/src/core/camximagesensordata.cpp:1113中,强制设置了

m_pSensorData->resolutionInfo->resolutionData[resolutionIndex].ADCReadoutTime = 2.5;

最终的frame的timestamp会要减去exProsure time,ADCReadoutTime。

所以要根据最终的offset的情况,调整ADCReadoutTime的值,来满足assert abs(offset) < 1ms的case要求。

在CT30设备上,需要将m_pSensorData->resolutionInfo->resolutionData[resolutionIndex].ADCReadoutTime = -10。这条case才能pass。

issue 2: 特征点不够。

解决办法: 很可能AF第一帧不够清晰,可以通过缩短对焦的距离,或者调整初始启动对焦位置。

比如4290平台,调整Scenario.Default\XML\STATS\chromatixHAF.xml下的初始对焦点位10.

<initialLensIdx type="int" range="[0,11]">10</initialLensIdx>
 

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值