首页 / 使用文档 / Projection Tools
查看 Markdown 源文档

Projection Tools

用于 LiDAR-相机投影检查的 Rerun 工作台。

安装

建议在已 source ROS 环境后安装 wheel:

uv pip install /home/ww/pip-repo/dist/Projection/projection_tools-0.1.0-py3-none-any.whl

启动

最简单的使用方式:

source /opt/ros/noetic/setup.bash
projection-rerun \
  --bag /path/to/input.bag \
  --yaml /path/to/camera.yaml

默认会启动本地 Web 服务:

如果需要,也可以额外覆盖 topic:

projection-rerun \
  --bag /path/to/input.bag \
  --yaml /path/to/camera.yaml \
  --image-topic /camera/image_semantic \
  --overlay-image-topic /camera/image_raw \
  --cloud-topic /lidar/points

配置文件格式

程序会从 YAML 中读取以下字段:

顶层字段

语义图像 topic

叠加显示图像 topic

点云 topic

说明:

semantic_camera 字段

图像宽度

图像高度

相机内参 fx

相机内参 fy

相机内参 cx

相机内参 cy

畸变参数数组

4 x 4 外参矩阵,含旋转和平移

示例配置

下面是一份可直接参考的 YAML 示例:

semantic_image_topic: /usb_cam/image_semantic_id
overlay_image_topic: /usb_cam/image_raw
pointcloud_topic: /mfla/frame_cloud

semantic_camera:
  image_width: 1280
  image_height: 720

  camera_matrix:
    fx: 923.128
    fy: 921.447
    cx: 640.0
    cy: 360.0

  distortion_coeffs:
    - 0.0123
    - -0.0345
    - 0.0001
    - -0.0002
    - 0.0

  lidar_to_camera_transform:
    - [0.0, -1.0, 0.0, 0.12]
    - [0.0, 0.0, -1.0, 0.03]
    - [1.0, 0.0, 0.0, 0.25]
    - [0.0, 0.0, 0.0, 1.0]

启动示例

source /opt/ros/noetic/setup.bash
projection-rerun \
  --bag /home/ww/bags/demo.bag \
  --yaml /home/ww/config/minimal_semantic_robot.yaml

运行前提