Skip to content

IMUと3D-LiDARを使用したGLIMによる3次元地図の作成について #141

@Shuma-s58

Description

@Shuma-s58

IMUと3D-LiDARを使用してGLIMによる3次元地図の作成を行おうとしたときに生じた問題についてここに記す

DockerでのGLIMの使用 (With GPU)

公式ドキュメント
Dockerを使用した起動準備
https://koide3.github.io/glim/docker.html
起動方法
https://koide3.github.io/glim/quickstart.html

以下のコードでrosbagから起動 (公式ドキュメントと少し異なる)
xhost +local:root

docker run   -it   --rm   --net=host   --ipc=host   --pid=host   --gpus all   -e=DISPLAY   -e=ROS_DOMAIN_ID   -v /home/shuma/glim_rosbag/20250906_glim_ros2_retake:/data/rosbag   -v ./config:/glim/config   koide3/glim_ros2:humble_cuda12.2   ros2 run glim_ros glim_rosnode --ros-args -p config_path:=/glim/config

/home/shuma/glim_rosbag/20250906_glim_ros2_retake :ホストPC上のrosbagの保存場所(20250906_glim_ros2_retakeはrosbagの名前)
/data/rosbag :Dockerコンテナ上のrosbagの保存場所(ホストPCからrosbagをコピーされる)

./config :ホストPC上のGLIMパラメータの保管場所(この中でパラメータの編集を行う)
/glim/config :Dockerコンテナ上のGLIMパラメータの保管場所(./configの内容がコピーされる)


GLIMパラメータの編集

  • T_lidar_imuの値の確認方法
    ros2 topic echo /tf_static ### 3D-LiDARとIMUのframe_idを確認
    ros2 run tf2_ros tf2_echo imu surestar ### imu -> surestarの関係性を確認
    ー出力例ー
At time 0.0
- Translation: [-0.350, -0.000, 0.368]
- Rotation: in Quaternion [0.000, 0.000, 0.000, 1.000]
- Rotation: in RPY (radian) [0.000, -0.000, 0.000]
- Rotation: in RPY (degree) [0.000, -0.000, 0.000]
- Matrix:
  1.000  0.000  0.000 -0.350
  0.000  1.000  0.000 -0.000
  0.000  0.000  1.000  0.368
  0.000  0.000  0.000  1.000

ー出力に基づく値の決定ー

  • ./config/config_sensors.json:
  "T_lidar_imu": [-0.350, -0.000, 0.368, 0.000, 0.000, 0.000, 1.000],

ーその他の変更するパラメーター

  • ./config/config_ros.json:
 "imu_topic": "/imu/data_raw",
 "points_topic": "/surestar_points",
  • ./config/config_ros.json:
    // IMU config
    "imu_time_offset": 0.0,
    "points_time_offset": 0.0,
    "acc_scale": 0.25,  ### 変更するパラメータ (IMUの出力による変更)
    // TF config
    "imu_frame_id": "imu",   ### 変更するパラメータ
    "lidar_frame_id": "surestar",  ### 変更するパラメータ
    "base_frame_id": "base_link",  ### 変更するパラメータ
    "odom_frame_id": "odom",
    "map_frame_id": "map",
    "publish_imu2lidar": true,
    "tf_time_offset": 1e-6,

  • 上記の変更によって最初の挙動は以下の画像のようになったが, 現状は最後までは行かずに途中で止まってしまう

パラメータ変更前

Image

パラメータ変更後

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    box3Good for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions