2
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

ROS 2でLIO-SAMを動かす

Posted at

概要

ROS 2 Humble環境でサンプルのrosbagデータを使ってLIO-SAMを動かしてみた

インストール

ROS2の依存パッケージのインストール

sudo apt install ros-humble-perception-pcl \
  	   ros-humble-pcl-msgs \
  	   ros-humble-vision-opencv \
  	   ros-humble-xacro

gtsamのインストール

sudo add-apt-repository ppa:borglab/gtsam-release-4.1
sudo apt install libgtsam-dev libgtsam-unstable-dev

LIO-SAMのインストール

mkdir -p ~/slam_ws/src
cd ~/slam_ws/src
git clone https://github.com/TixiaoShan/LIO-SAM.git -b ros2
cd ..
colcon build --symlink-install --packages-select lio_sam 

サンプルのrosbag のダウンロード

master ブランチのSample datasetsから適当なサンプルのrosbagデータをダウンロードする

サンプルのrosbagファイルをROS2用のrosbag に変換

以下の記事を参考にrosbagsをインストールして使用する

rosbags-convert walking_dataset.bag

実行

/src/LIO-SAM/config/param.yamlの入力トピックを以下のように書き換える(walking_datasetの場合)

param.yaml
    # Topics
    pointCloudTopic: "/points_raw"                   # Point cloud data
    imuTopic: "/imu_correct"                        # IMU data
    odomTopic: "odometry/imu"                    # IMU pre-preintegration odometry, same frequency as IMU
    gpsTopic: "odometry/gpsz"                    # GPS odometry topic from navsat, see module_navsat.launch file

LIO-SAMの実行

ros2 launch lio_sam run.launch.py

ダウンロードして変換したrosbagの実行

ros2 bag play walking_dataset

なんかうまくいかない

rviz_screenshot_2023_05_23-20_10_20.png

rqt_graph

rosgraph.png

参考

2
6
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?