用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/MIUAV/vibe-coding-ros2 --skill display-configuration命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | display-configuration |
| description | RViz2 显示配置技能 - 机器人模型、传感器显示、地图可视化配置 |
| argument-hint | rviz显示配置 OR 添加显示 OR 配置面板 |
| user-invocable | true |
用于 RViz2 显示面板和显示类型的配置
当需要以下帮助时使用此技能:
# 启动 RViz2
rviz2
# 加载配置文件
rviz2 -d /path/to/config.rviz
# RobotModel 配置
RobotModel:
Description Topic: /robot_description
TF Prefix: ''
Visual Enabled: True
Collision Enabled: False
Alpha: 1.0
Update Interval: 0
# TF 配置
TF:
Frame Timeout: 10
All Enabled: True
Frames:
Enabled: True
Tree:
base_link:
base_footprint:
map:
odom:
Markers:
All Enabled: True
Axes Scale: 1
Axis Length: 1
# LaserScan 配置
LaserScan:
Topic:
Name: /scan
Datatype: sensor_msgs/LaserScan
Size (m): 0.1
Color: 255; 255; 255; 255
Alpha: 1
Decay Time: 3
Position Transformer: XYZ
Intensity Transformer: ''
Min Color: 0; 0; 0; 255
Max Color: 255; 255; 255; 255
Min Intensity: 0
Max Intensity: 4.5
# PointCloud2 配置
PointCloud2:
Topic:
Name: /points
Datatype: sensor_msgs/PointCloud2
Color (r,g,b,a): 255; 255; 255; 255
Decay Time: 1
Decay Time (s): 1
Position Transformer: XYZ
Color Transformer: Intensity
Selectable: False
Billboard Size: 0.1
[Displays]
[+ add]
- RobotModel
- LaserScan
- PointCloud2
- Image
- Map
- Pose
- Path
- Odometry
- Marker
- MarkerArray
Fixed Frame: map
Frame Rate: 30
Background Color: 48; 48; 48
Grid:
Reference Frame: <Fixed Frame>
Plane Cell Count: 100
Cell Size: 1
[Time]
- Elapsed: 00:00:00.000
- Wall Clock: 0.000
- Use Simulation Time: False
# 发布 robot_description
ros2 run robot_state_publisher robot_state_publisher
# 或使用参数
ros2 param set /robot_state_publisher robot_description "$(xacro robot.urdf.xacro)"
RobotModel:
Description Topic: /robot_description
Description Source: Topic
Visual Enabled: ✓
Mesh Alpha: 1.0
Visual Ops:
- Offset: 0,0,0
Color: 255;255;255;255
Collision Enabled: ✓
Mesh Alpha: 1.0
Image:
Topic:
Name: /camera/image_raw
Datatype: sensor_msgs/Image
Transport Hint: raw
Max Value: 1
Min Value: 0
Median Window Size: 5
Depth Image:
Topic:
Name: /camera/depth/image_raw
Datatype: sensor_msgs/Image
Color Scheme: Turbo
Max Value: 10
Min Value: 0
Map:
Topic:
Name: /map
Datatype: nav_msgs/OccupancyGrid
Color Scheme: map
Draw Behind: False
Alpha: 0.7
Resolution: 0.05
Map Width: 100
Map Height: 100
PointCloudMap:
Topic:
Name: /points_map
Datatype: sensor_msgs/PointCloud2
Color Transformer: AxisY
Decay Time: 10
Odometry:
Topic:
Name: /odom
Datatype: nav_msgs/Oddometry
Shape: Arrow
Color: 255; 255; 0; 255
Alpha: 1.0
Scale:
Length: 1.0
Head Width: 0.2
Head Length: 0.2
Position Tolerance: 0.1
Angle Tolerance: 0.1
Keep: 100
Path:
Topic:
Name: /plan
Datatype: nav_msgs/Path
Color: 255; 255; 0; 255
Alpha: 1.0
Line Width: 0.1
Offset: 0; 0; 0
# 在 RViz2 GUI 中
# File -> Save Config As -> config.rviz
# 命令行
rviz2 -d config.rviz
rviz2 -d /path/to/config.rviz
Panels:
- Class: rviz2_common/Displays
Help Height: 78
Name: Displays
Property Tree Widget:
Expanded:
- /Global Options1
- /RobotModel1
Splitter Ratio: 0.5
Tree Height: 557
Visualization Manager:
Class: ""
Displays:
- Class: rviz_default_plugins/RobotModel
Description Topic:
Name: /robot_description
Name: RobotModel
Robot Description: robot_description
Visual Enabled: true
Property Tree Options:
Splitter Sizes: 150 481
解决方案:检查 robot_description 话题是否发布,确认 Fixed Frame 设置正确
解决方案:检查话题名称和消息类型,确认数据发布正常