소스 정보
- 저장소
- MIUAV/vibe-coding-ros2
- 최근 소스 활동
- 2026년 4월 3일 16:37
- 감지된 SKILL.md 언어
- 중국어
- 스타
- 26
- 포크
- 2
설치 방법
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
소스 파일 검토
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
메뉴
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
SOC 직업 분류 기준
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/MIUAV/vibe-coding-ros2 --skill laser-slam명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
SKILL.md 표시 중
| name | laser-slam |
| description | 激光 SLAM 技能 - Cartographer、FAST-LIO、Karto、ROS2 SLAM 节点 |
| argument-hint | 激光SLAM OR Cartographer OR FAST-LIO OR laser slam |
| user-invocable | true |
激光雷达 SLAM 算法与 ROS2 实现
当需要以下帮助时使用此技能:
# cartographer.lua
include "map_builder.lua"
include "trajectory_builder.lua"
MAP_BUILDER = {
num_background_threads = 4,
publish_batch_period = 0.001,
}
TRAJECTORY_BUILDER_2D = {
min_range = 0.1,
max_range = 30.0,
num_accumulated_range_data = 1,
scan_matcher = {
occupied_space_weight = 20.0,
resolution = 0.05,
},
adaptive_voxel_filter = {
max_range = 30.0,
min_num_points = 100,
},
}
POSE_GRAPH = {
optimize_every_n_nodes = 90,
global_constraint_search_after_n_seconds = 10,
}
# launch/slam.launch.py
from launch import LaunchDescription
from launch_ros.actions import Node
def generate_launch_description():
return LaunchDescription([
Node(
package='cartographer_ros',
executable='cartographer_node',
parameters=[{
'configuration_directory': '/path/to/config',
'configuration_basename': 'cartographer.lua',
}],
remappings=[
('scan', '/scan'),
('imu', '/imu'),
]
),
Node(
package='cartographer_ros',
executable='cartographer_occupancy_grid_node',
parameters=[{
'resolution': 0.05,
}]
)
])
import rclpy
from rclpy.node import Node
from sensor_msgs.msg import PointCloud2, Imu
from nav_msgs.msg import Odometry
import numpy as np
from scipy.spatial import cKDTree
class FASTLIONode(Node):
def __init__(self):
super().__init__('fast_lio')
self.scan_sub = self.create_subscription(
PointCloud2, '/lidar_points', self.scan_callback, 10)
self.imu_sub = self.create_subscription(
Imu, '/imu', self.imu_callback, 10)
self.odom_pub = self.create_publisher(Odometry, '/odom', 10)
self.map_pub = self.create_publisher(PointCloud2, '/map', 10)
# FAST-LIO 参数
self.declare_parameter('map_resolution', 0.1)
self.declare_parameter('max_iterations', 10)
# 状态
self.T = np.eye()
.map_points = []
.kdtree =
():
():
points = .parse_pointcloud(msg)
downsampled = .voxel_downsample(points, )
delta_T = .icp_match(downsampled)
.T = .T @ delta_T
.publish_odom()
():
np.eye()
():
idx = (points / voxel_size).astype()
_, unique_idx = np.unique(idx, axis=, return_index=)
points[unique_idx]
class LaserOdometry:
def __init__(self):
self.prev_cloud = None
self.prev_transform = np.eye(4)
def compute_odometry(self, current_cloud):
"""计算激光里程计"""
if self.prev_cloud is None:
self.prev_cloud = current_cloud
return np.eye(4)
# ICP 匹配
transform, fitness = self.icp(current_cloud, self.prev_cloud)
self.prev_cloud = current_cloud
return transform
def icp(self, source, target):
"""ICP 配准"""
# 使用 PCL 或 Open3D
# 返回变换矩阵和适应度分数
return np.eye(4), 1.0