원클릭으로
ros2-perception
ROS2 感知技能。激光雷达、相机、点云处理、传感器融合、SLAM 输入。当用户提到激光雷达、LiDAR、点云、PCL、PointCloud2、相机标定、深度图、传感器融合时使用。
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
ROS2 感知技能。激光雷达、相机、点云处理、传感器融合、SLAM 输入。当用户提到激光雷达、LiDAR、点云、PCL、PointCloud2、相机标定、深度图、传感器融合时使用。
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
ROS2 上层应用集成域。Launch 编排、参数配置、RViz 可视化、Python 节点、Gazebo/Ignition 仿真。当用户提到 launch 文件、launch.py、参数 YAML、RViz、URDF 显示、Python 节点、rclpy、Gazebo、Ignition 仿真、机器人状态发布时使用。
CCG Skills - Quality gates, documentation generator, and multi-agent orchestration. Auto-installed by CCG workflow system.
开发语言能力索引。Python、Go、Rust、TypeScript、Java、C++、Shell。当用户提到编程、开发、代码、语言时路由到此。
DevOps 能力索引。Git、测试、DevSecOps、数据库。当用户提到 DevOps、CI/CD、Git、测试时路由到此。
协同编排知识域。多Agent协同、任务分解、并行执行、冲突解决。当魔尊需要多Agent协作、任务编排、并行处理时使用。
ROS2 控制技能。PID 控制、轨迹跟踪、电机驱动、ros2_control 框架、生命周期节点。当用户提到控制器、PID、MPC、LQR、轨迹跟踪、ros2_control、电机、伺服时使用。
| name | ros2-perception |
| description | ROS2 感知技能。激光雷达、相机、点云处理、传感器融合、SLAM 输入。当用户提到激光雷达、LiDAR、点云、PCL、PointCloud2、相机标定、深度图、传感器融合时使用。 |
| user-invocable | false |
| category | domain |
机器人感知层开发,处理传感器原始数据并提取语义信息。
| 厂商 | ROS2 包 | 默认 Topic |
|---|---|---|
| RPLidar | rplidar_ros | /scan (sensor_msgs/LaserScan) |
| Velodyne | velodyne_driver | /velodyne_points (sensor_msgs/PointCloud2) |
| Ouster | ouster_ros | /ouster/points |
| Livox | livox_ros_driver2 | /livox/lidar |
# launch/rplidar.launch.py
Node(
package='rplidar_ros',
executable='rplidar_node',
name='rplidar',
parameters=[{
'serial_port': '/dev/ttyUSB0',
'frame_id': 'laser_link',
'angle_compensate': True,
'scan_mode': 'Standard',
}],
)
#include <pcl/filters/voxel_grid.h>
#include <pcl_conversions/pcl_conversions.h>
void cloud_callback(const sensor_msgs::msg::PointCloud2::SharedPtr msg) {
pcl::PointCloud<pcl::PointXYZ>::Ptr cloud(new pcl::PointCloud<pcl::PointXYZ>);
pcl::fromROSMsg(*msg, *cloud);
pcl::VoxelGrid<pcl::PointXYZ> voxel;
voxel.setInputCloud(cloud);
voxel.setLeafSize(0.05f, 0.05f, 0.05f); // 5cm 体素
pcl::PointCloud<pcl::PointXYZ>::Ptr filtered(new pcl::PointCloud<pcl::PointXYZ>);
voxel.filter(*filtered);
sensor_msgs::msg::PointCloud2 output;
pcl::toROSMsg(*filtered, output);
output.header = msg->header;
pub_->publish(output);
}
#include <pcl/segmentation/sac_segmentation.h>
pcl::SACSegmentation<pcl::PointXYZ> seg;
seg.setOptimizeCoefficients(true);
seg.setModelType(pcl::SACMODEL_PLANE);
seg.setMethodType(pcl::SAC_RANSAC);
seg.setDistanceThreshold(0.01);
seg.setInputCloud(cloud);
pcl::ModelCoefficients::Ptr coefficients(new pcl::ModelCoefficients);
pcl::PointIndices::Ptr inliers(new pcl::PointIndices);
seg.segment(*inliers, *coefficients);
ros2 launch realsense2_camera rs_launch.py \
enable_color:=true \
enable_depth:=true \
align_depth.enable:=true \
pointcloud.enable:=true
// depth_image_proc 功能包提供
#include <depth_image_proc/point_cloud_xyz.hpp>
#include <message_filters/subscriber.h>
#include <message_filters/time_synchronizer.h>
#include <message_filters/sync_policies/approximate_time.h>
using SyncPolicy = message_filters::sync_policies::ApproximateTime<
sensor_msgs::msg::PointCloud2,
sensor_msgs::msg::Image>;
message_filters::Subscriber<sensor_msgs::msg::PointCloud2> cloud_sub_;
message_filters::Subscriber<sensor_msgs::msg::Image> image_sub_;
message_filters::Synchronizer<SyncPolicy> sync_(SyncPolicy(10), cloud_sub_, image_sub_);
sync_.registerCallback(&Node::fusion_callback, this);
| 数据类型 | Reliability | Durability | History | Depth |
|---|---|---|---|---|
| LaserScan | Best Effort | Volatile | Keep Last | 5 |
| PointCloud2 | Best Effort | Volatile | Keep Last | 1 |
| Image (高分辨率) | Best Effort | Volatile | Keep Last | 1 |
| 相机内参 | Reliable | Transient Local | Keep Last | 1 |
# 查看话题数据
ros2 topic echo /scan --no-arr
ros2 topic hz /velodyne_points
# RViz2 可视化
rviz2 -d perception.rviz
# 录制 rosbag
ros2 bag record /scan /velodyne_points /camera/image_raw
# 回放
ros2 bag play <bag_file>