1. isaac sim을 실행

2. robot_localization패키지의 ekf_node를 실행한다. ( odom --> base_link의 TF를 만들기 위해서 )
ros2 run robot_localization ekf_node --ros-args -r __node:=ekf_filter_node --params-file ~/fast_ws/config/ekf_carter1.yaml -p use_sim_time:=true
3. carter의 lidar points는 pointCloud2이다... 그래서 fast-livo2는 livox customMsg가 필요하니 변환노드를 실행한다.
ros2 run pointcloud2_to_livox_bridge pc2_to_livox --ros-args -p input:=/carter1/front_3d_lidar/lidar_points -p output:=/carter1/front_3d_lidar/livox_custom -p max_points:=5000 -p scan_period_ns:=27777777 -p use_sim_time:=true
4. FAST-LIVO2를 실행
ros2 launch fast_livo mapping_aviz.launch.py use_sim_time:=True use_rviz:=False
- 이는 map or camera_int기준으로 로봇pose와 3D map을 만든다.
5. 위에서 fast-livo2에 인자로 sim time := true를 넘겼으나, 안먹이는 경우도 있다. 그래서 아래 명령어로 파라미터를 셋팅한다.
ros2 param set /laserMapping use_sim_time true
6. bridge실행. ( map --> odom을 생성 )
- nav2가 원하는 TF는 map --> odom --> base_link이다.
- 현재 FAST-LIVO2의 출력은 camera_init --> aft_mapped이다.
- 그래서 camera_init를 map으로 취급해야한다.
다만, 이름은 nav2가 쓸수있게, map으로 맞춰서 publish해야한다.
- 그래서 camera_init를 map으로 취급해야한다.
- 즉, bridge는 map --> odom이 되어야한다. 그리고 EKF는 odom --> base_link가 되어야한다...
- https://jihong.tistory.com/818 를 참고해서 패키지 생성한다.
- 그리고 아래를 입력해서 실행
- ros2 run fast_livo_nav2_bridge fast_livo_map_odom_tf --ros-args -p fast_odom_topic:=/aft_mapped_to_init -p wheel_odom_topic:=/odometry/filtered -p map_frame:=map -p odom_frame:=odom -p use_sim_time:=true
7. 3D LiDAR를 /scan으로 변환한다.
ros2 run pointcloud_to_laserscan pointcloud_to_laserscan_node --ros-args -r cloud_in:=/carter1/front_3d_lidar/lidar_points -r scan:=/scan -p min_height:=-1.0 -p max_height:=1.0 -p angle_min:=-3.14159 -p angle_max:=3.14159 -p angle_increment:=0.0087 -p range_min:=0.20 -p range_max:=20.0 -p use_inf:=true -p queue_size:=50 -p use_sim_time:=true
8. TF트리를 발행
ros2 run tf2_ros static_transform_publisher -0.23169997334480286 0.0 0.5260000228881836 0 0 0 base_link front_3d_lidar
9. 현재까지 위의 과정으로 TF가 map --> odom --> base_link --> front_3d_lidar로 연결이 되었다.
- FAST-LIVO2로 3D slam pose를 생성.
- EKF로 odom --> base_link를 생성.
- bridge로 map --> odom 생성
- LiDAR로 /scan을 생성
- =====> 하지만 아직 nav2가 쓸수있는게 없다... 그래서 projector노드를 만들어야한다.
ros2 pkg create fast_livo_2d_mapper \
--build-type ament_python \
--dependencies rclpy sensor_msgs nav_msgs geometry_msgs tf2_ros
10.
ros2 run fast_livo_2d_mapper pointcloud_to_occupancy_grid --ros-args -p cloud_topic:=/carter1/front_3d_lidar/lidar_points -p map_topic:=/map -p map_frame:=map -p resolution:=0.05 -p width_m:=40.0 -p height_m:=40.0 -p origin_x:=-20.0 -p origin_y:=-20.0 -p min_z:=0.45 -p max_z:=1.2 -p max_range:=10.0 -p point_step:=6 -p publish_rate:=1.0 -p use_sim_time:=true
11. rviz2 --ros-args -p use_sim_time:=true로 확인


'gazebo > SLAM' 카테고리의 다른 글
| [issac sim] FAST-LIVO2 - 2 (0) | 2026.06.18 |
|---|---|
| FAST-LIVO2 (0) | 2026.06.08 |
| VINS-Fusion 이란? (0) | 2026.05.27 |
| [Slam] Vins-Fusion (0) | 2026.05.26 |
| pySLAM (1) | 2025.12.06 |