radar-collision-warning

雷达防撞预警 — 调用树莓派上 ROS2 节点的雷达预警服务。当用户说"雷达防撞预警"、"开启雷达监控"、"检查障碍物"等时使用。通过 rosbridge WebSocket 向树莓派发送 ROS2 Service 请求,获取最近障碍物距离并给出预警。依赖 Node.js 18+(内置 WebSocket,无需安装任何包)。

3,891 stars

Best use case

radar-collision-warning is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

雷达防撞预警 — 调用树莓派上 ROS2 节点的雷达预警服务。当用户说"雷达防撞预警"、"开启雷达监控"、"检查障碍物"等时使用。通过 rosbridge WebSocket 向树莓派发送 ROS2 Service 请求,获取最近障碍物距离并给出预警。依赖 Node.js 18+(内置 WebSocket,无需安装任何包)。

Teams using radar-collision-warning should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/radar-collision-warning/SKILL.md --create-dirs "https://raw.githubusercontent.com/openclaw/skills/main/skills/33-code/radar-collision-warning/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/radar-collision-warning/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How radar-collision-warning Compares

Feature / Agentradar-collision-warningStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

雷达防撞预警 — 调用树莓派上 ROS2 节点的雷达预警服务。当用户说"雷达防撞预警"、"开启雷达监控"、"检查障碍物"等时使用。通过 rosbridge WebSocket 向树莓派发送 ROS2 Service 请求,获取最近障碍物距离并给出预警。依赖 Node.js 18+(内置 WebSocket,无需安装任何包)。

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# 雷达防撞预警 Skill

## 配置

在 `~/.openclaw/workspace/TOOLS.md` 中添加树莓派的 IP 地址:

```markdown
### 雷达预警
- 树莓派 IP: <你的树莓派IP>
- rosbridge 端口: 8080(默认)
```

或通过环境变量传入:
```bash
export RADAR_HOST=192.168.137.100  # 树莓派 IP
export RADAR_PORT=8080             # rosbridge 端口(默认)
```

## 架构概览

```
OpenClaw (本机)
  └── skill: call_radar_service.js
        └── rosbridge WebSocket (ws://<树莓派IP>:8080)
              └── 树莓派 rosbridge_server
                    └── ROS2 Service: /radar_collision_warning (std_srvs/Trigger)
                          └── radar_collision_warning_node
                                └── 订阅 /scan (LaserScan) ← 乐动激光雷达
```

**rosbridge WebSocket 端口**: `8080`
**ROS2 Service 名称**: `/radar_collision_warning`
**碰撞阈值**: 默认 0.05m(5cm),调用时可用 `-t/--threshold` 覆盖

## 使用方式

**依赖**: Node.js 18+(`globalThis.WebSocket` 为内置,无需安装任何包)

### 单次查询

当用户说"雷达防撞预警"、"检查障碍物距离"、"开启雷达监控"时,调用:

```bash
node ~/.openclaw/workspace/skills/radar-collision-warning/scripts/call_radar_service.js
```

可加参数覆盖阈值(单位:米):
```bash
node ~/.openclaw/workspace/skills/radar-collision-warning/scripts/call_radar_service.js --threshold 0.10
```

### 持续监控模式

当用户要求"持续监控"、"实时雷达监控"时,在 **后台** 启动轮询:

```bash
node ~/.openclaw/workspace/skills/radar-collision-warning/scripts/call_radar_service.js --monitor --interval 2.0
```

使用 `exec` 工具的 `background:true` 模式运行,后台运行时按 Ctrl+C 或发信号停止。

## 返回格式(JSON  stdout)

```json
{
  "success": true,
  "distance_m": 0.032,
  "distance_cm": 3.2,
  "warning": true,
  "message": "⚠️ 碰撞危险!距离仅 3.2cm",
  "threshold_m": 0.05
}
```

或安全状态:
```json
{
  "success": true,
  "distance_m": 1.234,
  "distance_cm": 123.4,
  "warning": false,
  "message": "✅ 安全,最近障碍物距离 1.23m",
  "threshold_m": 0.05
}
```

连接失败时:
```json
{
  "success": false,
  "error": "无法连接到 rosbridge 服务器",
  "message": "⚠️ 雷达服务不可用,请检查树莓派是否开机"
}
```

## 树莓派侧准备(首次配置时参考)

### 1. 安装 rosbridge

```bash
sudo apt install ros-jazzy-rosbridge-suite
```

### 2. ROS2 包配置

在树莓派上创建雷达预警包:

```bash
cd ~/ros_ws/src
ros2 pkg create radar_pkg --build-type ament_python
# 将 radar_collision_warning_node.py 复制到:
#   ~/ros_ws/src/radar_pkg/radar_pkg/
# 添加 setup.py 入口点:
#   'radar_collision_warning_node = radar_pkg.radar_collision_warning_node:main'
cd ~/ros_ws && colcon build && source install/setup.bash
```

### 3. 一键启动

```bash
bash ~/ros_ws/start_radar_rosbridge.sh
```

## 返回值解读

- `warning: true` → 距离 < 阈值,应提醒用户"注意防撞"
- `warning: false` → 距离正常
- `success: false` → 连接失败或服务异常

Related Skills

market-radar

3891
from openclaw/skills

Real-time market scanning and alert system. Monitors SPX, major indices, VIX, and key crypto prices. Generates alerts when significant levels are crossed.

Lead Radar

3891
from openclaw/skills

Every morning, scans Reddit, Hacker News, Indie Hackers, Stack Overflow, Quora, Hashnode, Dev.to, GitHub, and Lobsters for people actively asking for what you sell. Delivers the top 10 buying-intent leads to your Telegram with a pre-drafted reply. Powered by Gemini 2.5 Flash.

ai-layoff-radar

3891
from openclaw/skills

Detect AI-driven layoffs from global news and generate structured risk reports.

refund-radar

3891
from openclaw/skills

Scan bank statements to detect recurring charges, flag suspicious transactions, and draft refund requests with interactive HTML reports.

strikeradar

3891
from openclaw/skills

Monitor US-Iran strike probability using open-source indicators - news alerts, Iran internet connectivity, oil prices, flight traffic, military tanker detection, weather, Polymarket odds, and Pentagon activity. Use when user asks about "Iran strike probability", "strike radar", "Iran situation", "US attack Iran", "flights over Iran", "oil prices Iran", "Pentagon activity", "Polymarket Iran", "הסתברות תקיפה באיראן", "מצב איראן", "סטרייק ראדאר".

personal-deadline-radar

3891
from openclaw/skills

扫描个人待办、会议和消息摘要,找即将到期事项与时间冲突。;use for deadlines, calendar, tasks workflows;do not use for 自动改日历, 伪造截止时间.

meeting-risk-radar

3891
from openclaw/skills

会前识别高风险议题、模糊责任、缺失材料和可能失控的讨论点。;use for meeting-risk, preflight, facilitation workflows;do not use for 分析私密录音, 替代正式风险审查.

journal-submission-radar-all-types

3891
from openclaw/skills

统一检索国内外多类型期刊,输出投稿路径核验、定制写作建议、风险提示与可控广告插入的客户顾问型 Skill。

meme-risk-radar-skill

3891
from openclaw/skills

Bilingual meme token risk radar for Binance Web3 data. Scan newly launched or fast-rising meme tokens from Meme Rush, enrich with token audit and token info, produce a normalized risk report in Chinese or English, and support SkillPay billing hooks for paid scan and audit calls.

---

3891
from openclaw/skills

name: article-factory-wechat

Content & Documentation

humanizer

3891
from openclaw/skills

Remove signs of AI-generated writing from text. Use when editing or reviewing text to make it sound more natural and human-written. Based on Wikipedia's comprehensive "Signs of AI writing" guide. Detects and fixes patterns including: inflated symbolism, promotional language, superficial -ing analyses, vague attributions, em dash overuse, rule of three, AI vocabulary words, negative parallelisms, and excessive conjunctive phrases.

Content & Documentation

find-skills

3891
from openclaw/skills

Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.

General Utilities