RDK X5 视频、扫描,建模,为什么显示满屏距离标识,没有物体识别呢?正常建模应该是怎么样的

版本分析结果

你的版本信息:

  • 系统版本: 3.5.0
  • hobot-stereonet: 2.5.5
  • mipi-cam: 2.5.2
  • 相机型号: 130W (SC132GS)

关键发现

问题 1:calib_method:=internal 不支持

你的 stereonet 2.5.5 版本不支持 internal 参数,只支持 none 和 custom:

[ERROR] [StereoNetNode]: => calib_method parameter invalid, should be one of [none, custom]

问题 2:软件包版本可能过旧

根据社区反馈,SC132GS 双目相机的推荐版本:

  • hobot-stereonet: ≥2.5.7
  • mipi-cam: ≥2.5.4

你当前的 2.5.5/2.5.2 版本可能存在已知 bug。


解决方案(按优先级)

方案 1:升级软件包(最推荐)

# 1. 更新软件源
sudo apt update

# 2. 升级 stereonet 和 mipi-cam
sudo apt install --reinstall tros-humble-hobot-stereonet tros-humble-mipi-cam

# 3. 确认升级后版本
dpkg -l | grep -E "stereonet|mipi"

目标版本:

  • hobot-stereonet: ≥2.5.7
  • mipi-cam: ≥2.5.4

方案 2:使用正确的参数重新测试(不升级的情况下)

# 使用 calib_method:=none + 正确分辨率
source /opt/tros/humble/setup.bash
ros2 launch hobot_stereonet stereonet_model_web_visual_v2.5_int16_544_448_96.launch.py \
  mipi_camera_calibration_file_path:=/opt/tros/humble/lib/mipi_cam/config/SC132gs_dual_calibration.yaml \
  mipi_image_width:=1280 \
  mipi_image_height:=1088 \
  mipi_image_framerate:=10.0 \
  mipi_gdc_enable:=True \
  mipi_rotation:=0.0 \
  mipi_cal_rotation:=0.0 \
  mipi_channel:=2 \
  mipi_channel2:=0 \
  calib_method:=none

启动后检查日志:

  • :white_check_mark: 不再出现 calib_method parameter invalid
  • :white_check_mark: 出现 sub rectified [fx, fy, cx, cy, baseline] 且值不为 0
  • :cross_mark: 如果仍出现 top is not left image,继续下一步

方案 3:单独测试相机输出(确认硬件)

# 1. 查看 mipi_cam 包的正确 launch 文件
ros2 pkg executables tros-humble-mipi-cam | grep launch

# 2. 或直接用以下命令测试相机
source /opt/tros/humble/setup.bash
ros2 run mipi_cam mipi_cam_node \
  --ros-args \
  -p camera_calibration_file_path:=/opt/tros/humble/lib/mipi_cam/config/SC132gs_dual_calibration.yaml \
  -p image_width:=1280 \
  -p image_height:=1088 \
  -p channel:=2 \
  -p channel2:=0 \
  -p gdc_enable:=true

在浏览器访问板子 IP 查看图像,确认:

  • 左右摄像头是否都有图像
  • 图像是否清晰
  • 交换通道后图像是否对应交换

方案 4:检查物理连接

# 1. 查看 MIPI 摄像头检测信息
dmesg | grep -i "sc132\|mipi\|EEPROM"

# 2. 查看设备树配置
ls /proc/device-tree/soc/cam/

# 3. 检查 I2C 通信
i2cdetect -y -r 6
i2cdetect -y -r 4

如果 I2C 地址检测不到,可能是:

  • MIPI 线缆松动
  • 相机模组供电问题
  • 主板 MIPI 接口损坏

关于"top is not left image"的深层解释

这个错误的本质是:立体节点通过图像内容特征判断左右相机,发现当前"左通道"的图像与标定文件中的左相机内参不匹配。

可能原因:

原因 概率 解决方法
标定文件与当前相机不匹配 高 重新标定或使用 EEPROM 参数
物理接线与标定假设相反 中 交换 MIPI 线缆
相机模组左右定义与软件相反 中 联系供应商确认
软件版本 bug 高 升级到 2.5.7+

下一步行动

请按以下顺序操作:

  1. 先升级软件包(方案 1)
  2. 重新测试(方案 2)
  3. 如果仍报错,提供以下信息:
    # 升级后的版本
    dpkg -l | grep -E "stereonet|mipi"
    
    # 完整的启动日志(前 100 行)
    ros2 launch ... 2>&1 | head -100
    
    # I2C 检测结果
    i2cdetect -y -r 6
    i2cdetect -y -r 4
    

参考帖子

升级后大概率能解决问题,有进展请更新帖子!