KISS-ICP快速上手

最近的项目中,要用到激光雷达SLAM,由于手头没有IMU,因此主要在测试纯激光的建图方案。主要测试了一下KISS-ICP,下面给出一些快速上手的Tips。

安装
1. 如果只测试不调整源码的话,直接创建个虚拟环境,pip安装就可以。

> conda create -n kissicp python=3.12
> conda activate kissicp
> pip install kiss-icp
> pip install polyscope==2.3.0 #官方的源对应的polyscope版本要降一下,否则无法运行

2. 如果需要修改代码测试,则需要编译安装。

> conda create -n kissicp python=3.12
> conda activate kissicp
> git clone https://github.com/PRBonn/kiss-icp.git
> cd kiss-icp
> make editable

rosbag准备

下载kitti数据集ROSBAG,解压出2011_09_30_0018.bag文件。

运行

生成config

> kiss_icp_dump_config #生成kiss_icp.yaml
> cat kiss_icp.yaml
adaptive_threshold:
  fixed_threshold: null
  initial_threshold: 2.0
  min_motion_th: 0.0
data:
  deskew: true             # 是否做运动补偿
  max_range: 350.0         #  local_voxel_map保存的点云范围  
  min_range: 0.0
mapping:
  max_points_per_voxel: 20 # 每一个voxel最多容纳多少点
  voxel_size: 0.3          # voxel的分辨率,默认为1m,如果场景较大,用默认值即可,如果雷达有xy轴的抖动,voxel 需要调小
out_dir: results
registration:
  convergence_criterion: 0.0001
  max_num_iterations: 500
  max_num_threads: 0

运行里程计程序:

> kiss_icp_pipeline --help

 Usage: kiss_icp_pipeline [OPTIONS] DATA

 💋 KISS-ICP, a simple yet effective LiDAR-Odometry estimation pipeline 💋


 Examples:
 # Process all pointclouds in the given <data-dir> [bin, pcd, ply, xyz, obj, ctm, off, stl]
 $ kiss_icp_pipeline --visualize <data-dir>📂

 # Process a given ROS1/ROS2 rosbag file (directory📂, ".bag"📄, or "metadata.yaml"📄)
 $ kiss_icp_pipeline --visualize <path-to-my-rosbag>[📂/📄]

 # Process mcap  recording
 $ kiss_icp_pipeline --visualize <path-to-file.mcap>📄

 # Process Ouster pcap recording (requires ouster-sdk Python package installed)
 $ kiss_icp_pipeline --visualize <path-to-ouster.pcap>📄 [--meta <path-to-metadata.json>📄]

 # Use a more specific dataloader: apollo, boreas, helipr, kitti, kitti_raw, mulran, ncd, nclt, nuscenes, tum
 $ kiss_icp_pipeline --dataloader kitti --sequence 07 --visualize <path-to-kitti-root>📂

 # To change single config parameters on-the-fly, you can export them beforehand:
 $ export kiss_icp_out_dir='<path-to-logs>📂'
 $ export kiss_icp_data='{"max_range": 50}'

╭─ Arguments ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ *    data      PATH  The data directory used by the specified dataloader [required]                                                                                                         │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Options ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ --dataloader        TEXT  [Optional] Use a specific dataloader from those supported by KISS-ICP                                                                                             │
│ --config            PATH  [Optional] Path to the configuration file                                                                                                                         │
│ --version                 Show the current version of KISS-ICP                                                                                                                              │
│ --help                    Show this message and exit.                                                                                                                                       │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Additional Options ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ --visualize  -v               [Optional] Open an online visualization of the KISS-ICP pipeline                                                                                              │
│ --sequence   -s      TEXT     [Optional] For some dataloaders, you need to specify a given sequence                                                                                         │
│ --topic      -t      TEXT     [Optional] Only valid when processing rosbag files                                                                                                            │
│ --n-scans    -n      INTEGER  [Optional] Specify the number of scans to process, default is the entire dataset                                                                              │
│ --jump       -j      INTEGER  [Optional] Specify if you want to start to process scans from a given starting point                                                                          │
│ --meta       -m      PATH     [Optional] For Ouster pcap dataloader, specify metadata json file path explicitly                                                                             │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

> kiss_icp_pipeline --config kiss_icp.yaml --visualize 2011_09_30_0018.bag
Running cmake --build & --install in /home/robot/ws/kiss-icp/python/build/cp312-cp312-linux_x86_64
ninja: no work to do.
-- Install configuration: "Release"


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值