px4_sim

[px4][slam] rtabmap 설치

정지홍 2025. 8. 18. 18:23

https://jihong.tistory.com/661

 

rtabmap ros 연습

sudo apt install ros-humble-rtabmap-rosros2 launch realsense2_camera rs_launch.pyros2 launch rtabmap_launch rtabmap.launch.py rtabmap_args:="--delete_db_on_start" rgb_topic:=/camera/camera/color/image_raw depth_topic:=/camera/camera/depth/image_rect_raw ca

jihong.tistory.com

ros2 run rqt_image_view rqt_image_view

 

ssh -Y quad@192.167.1.31

unset LIBGL_ALWAYS_INDIRECT
export LIBGL_ALWAYS_SOFTWARE=1
export MESA_LOADER_DRIVER_OVERRIDE=llvmpipe
export __GLX_VENDOR_LIBRARY_NAME=mesa
export LIBGL_DRI3_DISABLE=1
export QT_OPENGL=software
export QT_XCB_GL_INTEGRATION=none

rviz2

1. 설치

sudo apt install -y ros-foxy-rtabmap ros-foxy-rtabmap-ros ros-foxy-robot-localization

 

 

2.

ros2 launch realsense2_camera rs_launch.py \
  align_depth:=true enable_gyro:=true enable_accel:=true \
  unite_imu_method:=linear_interpolation enable_sync:=true publish_tf:=false

 

 

 

 

ros2 run tf2_ros static_transform_publisher 0 0 0 0 0 0 1 base_link_frd camera_link

 

 

ros2 run rtabmap_odom rgbd_odometry --ros-args \
  -p frame_id:=base_link_frd \
  -p subscribe_depth:=true \
  -p approx_sync:=true \
  -p publish_tf:=true \
  -p imu_topic:=/mavros/imu/data \
  -p odom_frame_id:=odom \
  -p wait_for_transform:=0.2 \
  -p qos_image:=2 \
  -p qos_imu:=2 \
  -r rgb/image:=/camera/color/image_raw \
  -r depth/image:=/camera/aligned_depth_to_color/image_raw \
  -r rgb/camera_info:=/camera/color/camera_info \
  -r odom:=/rtabmap/odom