首页 / 使用文档 / calib-snap
查看 Markdown 源文档

calib-snap

用于标定采集的图像 + 点云配对工具,也支持不带点云的纯图片采集。支持三种图像输入方式:

安装后可直接使用 calib-snap 命令。

依赖

安装

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

pip install https://pip.wgists.me/dist/calib-snap/calib_snap-0.1.3-py3-none-any.whl

如果要直接在仓库里用 uv 跑别名命令,建议先建一个可复用系统 ROS 包的环境:

cd /home/ww/pip-repo/code
uv venv --python "$(which python3)" --system-site-packages
source .venv/bin/activate
source /opt/ros/noetic/setup.bash
uv pip install .

纯图片采集

不指定 --pointcloud-topic 时,默认进入纯图片采集模式。

ROS 图像话题自动隔帧保存:

calib-snap \
  --input-mode dual_ros \
  --source-image-topic /camera/image_raw \
  --save-dir ./images \
  --image-save-mode interval \
  --image-interval 10 \
  --prefix img \
  --image-ext jpg

ROS 图像话题只手动保存:

calib-snap \
  --input-mode dual_ros \
  --source-image-topic /camera/image_raw \
  --save-dir ./images \
  --image-save-mode manual \
  --prefix img \
  --image-ext jpg

RTSP 视频流只手动保存:

calib-snap \
  --input-mode rtsp \
  --rtsp-uri rtsp://127.0.0.1:8554/test \
  --save-dir ./images \
  --image-save-mode manual \
  --prefix rtsp \
  --image-ext jpg

本地摄像头自动保存并允许手动补拍:

calib-snap \
  --input-mode camera \
  --camera-source 0 \
  --camera-mjpg \
  --camera-width 1280 \
  --camera-height 720 \
  --camera-fps 30 \
  --save-dir ./images \
  --image-save-mode both \
  --image-interval 5 \
  --prefix usb \
  --image-ext png

图像 + 点云配对采集

RTSP 模式:

calib-snap \
  --input-mode rtsp \
  --rtsp-uri rtsp://127.0.0.1:8554/test \
  --pointcloud-topic /livox/lidar

摄像头模式:

calib-snap \
  --input-mode camera \
  --camera-source 0 \
  --camera-mjpg \
  --camera-width 1280 \
  --camera-height 720 \
  --camera-fps 30 \
  --pointcloud-topic /livox/lidar

也可以直接传设备路径:

calib-snap \
  --input-mode camera \
  --camera-source /dev/video0 \
  --pointcloud-topic /livox/lidar

双 ROS 话题模式:

calib-snap \
  --input-mode dual_ros \
  --source-image-topic /g1/camera/0/color/image_raw \
  --pointcloud-topic /livox/lidar

热键

输出

配对模式默认输出目录为当前目录下的 data/

纯图片模式使用 --save-dir 指定保存目录,文件名格式为:

<prefix>_YYYYmmdd_HHMMSS_micro.<image-ext>

rtspcamera 模式下,图像还会额外发布到:

常用参数

版本新增内容

0.1.3

0.1.2

0.1.1